none
Exchange web service Resolve name Error 401 RRS feed

  • Question

  • Hello everybody!

    I have a problem with a connection with an exchange server. I'm trying to use the ResolveName method to get the e-mail of a user from active directory. After creating the ExchangeServiceBinding object and set the url from the server, I call the method and it's returns a 401 Error, not authorized.

    If I copy the url to a Internet explorer page and set the same credentials as I use on the code, I can access to the web service.

    This is my code

               esb.RequestServerVersionValue = new RequestServerVersion();
               esb.RequestServerVersionValue.Version = ExchangeVersionType.Exchange2010;
               esb.Credentials = new NetworkCredential("user", "pass");
               
                esb.Url = "https://myserver/ews/Exchange.asmx";

                ResolveNamesType rnType = new ResolveNamesType();
                rnType.ReturnFullContactData = true;
                rnType.UnresolvedEntry = "nameToResolve";

               // Resolve names.
                ResolveNamesResponseType resolveNamesResponse = esb.ResolveNames(rnType);

    I'm stuck with this problem too much time, I appreciate your help.

    Thanks in advance!!

    Wednesday, July 11, 2012 6:52 AM

Answers

  • Hi,
    I recommend that you ask this in the Exchange Dev Forum
    Topics discussed include: Web services, APIs, application conversion and apps in general


    Martina Miskovic

    Wednesday, July 11, 2012 9:17 AM

All replies

  • Hi,
    I recommend that you ask this in the Exchange Dev Forum
    Topics discussed include: Web services, APIs, application conversion and apps in general


    Martina Miskovic

    Wednesday, July 11, 2012 9:17 AM
  • Thanks Martina, I have asked on that Forum, I hope to get any clue about my problem
    Wednesday, July 11, 2012 10:16 AM
  • Did you ever get any response to this? I'm having exact same issue.
    Wednesday, January 25, 2017 5:24 PM