We’ve developed some resources to help you work effectively from home during COVID-19 Click to learn more

UserAgent - WCF Method Failed on server

Hi,

I am getting 'WCF Method Failed on server' when I call any function from the UserAgent. All my other calls to Agents are working as expected.

I have tested it on my local installation and the calls to the UserAgent work fine. 

Is there any reason why this is only occuring when using On-line?

Cheers

Rich

 

RE: UserAgent - WCF Method Failed on server

The useragent is restricted in Online, so you will not get access to it: https://community.superoffice.com/documentation/sdk/SO.NetServer.Web.Services/html/Reference-SOAP-Services86-User-User.htm

Av: Margrethe Romnes 5. nov 2019

RE: UserAgent - WCF Method Failed on server

Margrethe,

Our application needs to load a list of User Groups (Name and Id) - Is this possbile via a different method?

Cheers

Rich

 

Av: Rich Hacker 5. nov 2019

RE: UserAgent - WCF Method Failed on server

Hi Rich, that should be possible using either MDOAgent or ListAgent. Probably the latter. Think there is a SimpleList method on it, where you can specify you want "usergroup" list as a string.

Av: Frode Lillerud 5. nov 2019

RE: UserAgent - WCF Method Failed on server

Hi Rich,

This will get you what you want:

using (MDOAgent ma = new MDOAgent())
{
    var listResults = ma.GetSimpleList("usergroup");

    foreach (var listItem in listResults)
    {
        Console.WriteLine($"Id: {listItem.Id}, Name: {listItem.Name}");
    }
}

Hope this helps!

Av: Tony Yates 6. nov 2019

RE: UserAgent - WCF Method Failed on server

Frode/Tony,

Brilliant, this is working a treat - many thanks as always!

Cheers

Rich

 

Av: Rich Hacker 6. nov 2019