Search code examples
asp.netiis-7.5windows-authenticationapplication-pool

ASP.net web app calling asp.net web service returning error code 401 even with System.Net.CredentialCache.DefaultCredentials


We have a .net web application that is running in IIS7.5 on an application pool that is set to run with a domain level AD account instead of the default account.

It has been configured according to these instructions: http://support.microsoft.com/kb/813834 to use

myProxy.Credentials = System.Net.CredentialCache.DefaultCredentials;

so that the credentials the pool is running on are passed to the web service. This works in my test VM (which may have had other settings modified in the past)

Deployed on our Dev Server, the same code does not work.

I know the Web Service isn't the culprit because the IIS log shows no Account info passed to the webservice call, but if I point my test VM to the webservice on the server it works and does.

Is there a configuration/permission thing I'm missing somewhere? Any pointers?

Edit: Learned some more. Event Viewer is showing audit failures with NULL SID for this account, even though from the VM the SID comes through correctly.

Thanks!


Solution

  • Got it! So the NULL SID led me to the right place: This is because of a "working as designed" feature with windows.
    read was MS has to say about it here: http://support.microsoft.com/kb/896861

    Registry change option #1 fixed it.