Options

Use Windows Credentials to consume a Web Service in ASP.NET

KlappstuhlKlappstuhl Member Posts: 9
Hello Mibuso,

I have created a Codeunit Web Service which I want to use in an ASP.NET Web Site. I followed the steps from MSDN and my project builds as expected. With the integrated Visual Studio IIS Express I can consume the Web Service without any flaws.
But when I publish my Web Site and run it unser IIS 10 the authentication fails. The Web Site asks me for my credentials, which is fine, but after submitting my credentials I get an HTTP-401 'Unauthorized' error.

In the IIS Manager I enabled the Windows Login for my Site and disabled all other options.
My Web.Config file contains these lines which should be correct.
  <system.web>
    ...
    <authentication mode="Windows" />
    <identity impersonate="false" />
    ...
  </system.web>

Do you experts have any suggestions?

Kind regards.

Comments

  • Options
    NavNabNavNab Member Posts: 181
    Hello,

    I think you should enable "impersonate" and check "anonymous" is disabled on your web server.

    You can have more precise answers on IIS forums ;)
  • Options
    KlappstuhlKlappstuhl Member Posts: 9
    Thank you, I always disabled the impersonate attribute. How ever it works fine now. Additionally I had to set the applicationpool's pipelinemode from integrated to classic.
Sign In or Register to comment.