none
Using integrated Windows authentication to access a .Net 2.0 web service RRS feed

  • Question

  • I set up the web application in IIS 7.5 for Windows Authentication only and am trying to access it from an ASP.NET client I'm writing in VS 2012.

    After referencing the web service from VS, I do the following:

                SA.SessionAnalysisSoapClient sa = new SA.SessionAnalysisSoapClient();
                sa.ClientCredentials.Windows.AllowNtlm = true;
                SA.Site[] sites = sa.GetAllSites();
                DataList1.DataSource = sites;

    The result is this error: "The HTTP request is unauthorized with client authentication scheme 'Anonymous'. The authentication header received from the server was 'Negotiate,NTLM'."

    What am I missing?


    Cheers, Metaphore

    Wednesday, February 13, 2013 8:03 PM

Answers

All replies

  • Hi,

    Try set the proxy class to allow impersonation and set up security suggested in this post.

    If it cannot work, what are the config files of service and client like?

    Best Regards.


    Haixia
    MSDN Community Support | Feedback to us
    Develop and promote your apps in Windows Store
    Please remember to mark the replies as answers if they help and unmark them if they provide no help.

    Thursday, February 14, 2013 8:51 AM
    Moderator
  • Hi,

    Publish your service & set for 'Anonymous'. after that try to consume this service from your application. hope it will work.

    Happy Coding.

    Thanks


    Knight Data Access Layer - .NET ORM, LINQ Provider, and more https://www.kellermansoftware.com/p-47-net-data-access-layer.aspx

    Monday, February 18, 2013 12:35 PM