Question

I have two applications running on my webserver. The webserver is run locally by me on my computer.

The web server is running IIS 7.5

I have two applications. One is a WCF and the other is a MVC application.

The MVC application is asking the WCF for data to present.

However. Having Windows authentication enabled on both applications, with providers NTLM and Negotiate activated.

The mvc client web.config is set like this:

<security mode="Transport">
    <transport clientCredentialType="Ntlm" />
</security>

When i send a request i get this:

InnerExceptionMessage: "The remote server returned an error: (401) Unauthorized."

along with

ExceptionMessage: "The HTTP request is unauthorized with client authentication scheme 'Ntlm'. The authentication header received from the server was 'Negotiate,NTLM'."

I have googled/stackoverflowed alot for this. I've even gone so far to edit machine.config and even the IIS metabase config file. Nothing seems to work.

Short:

I'm trying to get my two applications running on the same IIS (7.5) to communicate. They're on my local computer and yet i can't seem to authenticate myself.

Was it helpful?

Solution

You could maybe try this out:

Make sure that you have this set in your WCF applications web.config instead of your current:

<security mode="Transport">
   <transport clientCredentialType="Windows"/>
</security>

And if the MVC application and WCF Application is hosted on the same web server make sure that you use the web servers ip-address and not the external DNS-address in the binding section in your MVC application.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top