0

I have a Web API project that makes a remote SOAP call. This works fine in IIS Express (win 7) but it does not work in either IIS 7.5 (win 7) or IIS 8.5 (wind server 2012 R2).

Here's the response in IIS Express

{
Content-Length: 429
Cache-Control: private, max-age=0
Content-Type: text/xml; charset=utf-8
Date: Wed, 16 Mar 2016 23:00:52 GMT
Server: Microsoft-IIS/7.0
X-AspNet-Version: 4.0.30319
X-Powered-By: ASP.NET
}

And here is the response in IIS 7.5

{Content-Type: text/html
Server: Microsoft-IIS/7.0
WWW-Authenticate: Negotiate,NTLM
X-Powered-By: ASP.NET
Date: Wed, 16 Mar 2016 22:13:10 GMT
Content-Length: 1293

}

I've disabled Windows Authentication and enabled only Anonymous authentication in IIS 7.5

In fact, I've also done a WinDiff of applicationHost.config and copied over settings that are different (and applicable) from IIS Express to IIS 7.

Web.Config has <Authentication mode ="None">

I'm not sure what I have to do to get this working.

EDIT SOLVED ALREADY

This SO post lead me to the answer. And this SO post is how I am passing the credentials.

Community
  • 1
  • 1

1 Answers1

0

The response from IIS clearly indicates that Windows authentication is enabled. Check the IIS configuration carefully please.

Lex Li
  • 60,503
  • 9
  • 116
  • 147
  • Well yes that's what it is but I've disabled all Authentcation in IIS except Anonumous Extension not just for the application but at machine level. –  Mar 18 '16 at 00:51
  • @Chookoos unfortunately you didn't. Either you configured the wrong machine, or you configured it in a wrong way. – Lex Li Mar 18 '16 at 01:33
  • Could it be proxy preventing this? It works just fine in IIS Express. I've gone into IIS management console and disabled all authentications except anonymous. –  Mar 18 '16 at 03:02
  • Turns out I was not specifying authentication when making a HttpWebRequest. http://stackoverflow.com/questions/13517323/exchange-web-service-api-and-401-unauthorized-exception?rq=1 What threw me off was it was working in IIS Express. –  Mar 18 '16 at 03:25