B
Brad
I'm setting up my new pc with all my VS.net projects and I'm missing
something.....something I've done many times before without problem. I
have several asp.net apps accessing secure .net web services (secure meaning
windows authentication credentials must be used to access the web services).
The problem is that when the web apps attempt to access a web service they
are receiving 401: unathorized.
- The apps are all running on web sites on my pc.
- I have created the local user accounts
- Set up the web services to require windows authentication (both in the
web.cofnig and in the iis settings..anonymous is turn off) and to allow only
me and the user for app authentication.
- Required user is included in the folder level access permissions.
- I have accessed several of the service asmx files via web browser and I
authenticate successfully (I even removed my access in the web.config to
confirm that authentication would fail without)
In the web app that accesses the service I am using credential caching and
pre authenticating
Dim cache As New CredentialCache
Dim user As String = "myuser"
Dim password As String = "mypassword"
cache.Add(New Uri(ws.Url), "Negotiate", New NetworkCredential(user,
password, domain))
ws.Credentials = cache
ws.PreAuthenticate = True
In the web service configs
<authentication mode="Windows"/>
<authorization>
<allow users="mypc\wsuser, companydomain\myuser"/>
<deny users="*"></deny>
</authorization>
When I look at the security event logs I can see a Success event for NETWORK
SERVICE using the credentials, followed immediately by a Failure event for
SYSTEM using the same user name "Reason: An error occurred during logon".
On my old pc it works and the security event logs correctly shows the
supplied user name logging on instead of the SYSTEM user failure. I have
event changed the web apps to use my personal login information and the same
problem occurs.
Since these same apps work on my old pc and for others here. What the heck
am I missing?
Brad
something.....something I've done many times before without problem. I
have several asp.net apps accessing secure .net web services (secure meaning
windows authentication credentials must be used to access the web services).
The problem is that when the web apps attempt to access a web service they
are receiving 401: unathorized.
- The apps are all running on web sites on my pc.
- I have created the local user accounts
- Set up the web services to require windows authentication (both in the
web.cofnig and in the iis settings..anonymous is turn off) and to allow only
me and the user for app authentication.
- Required user is included in the folder level access permissions.
- I have accessed several of the service asmx files via web browser and I
authenticate successfully (I even removed my access in the web.config to
confirm that authentication would fail without)
In the web app that accesses the service I am using credential caching and
pre authenticating
Dim cache As New CredentialCache
Dim user As String = "myuser"
Dim password As String = "mypassword"
cache.Add(New Uri(ws.Url), "Negotiate", New NetworkCredential(user,
password, domain))
ws.Credentials = cache
ws.PreAuthenticate = True
In the web service configs
<authentication mode="Windows"/>
<authorization>
<allow users="mypc\wsuser, companydomain\myuser"/>
<deny users="*"></deny>
</authorization>
When I look at the security event logs I can see a Success event for NETWORK
SERVICE using the credentials, followed immediately by a Failure event for
SYSTEM using the same user name "Reason: An error occurred during logon".
On my old pc it works and the security event logs correctly shows the
supplied user name logging on instead of the SYSTEM user failure. I have
event changed the web apps to use my personal login information and the same
problem occurs.
Since these same apps work on my old pc and for others here. What the heck
am I missing?
Brad