M
mail747097
I'm trying to access a web service with another user running under the
built in web server in VS.NET 2005. I have the following code to
access the web service:
MyWebService webService = new MyWebService.MyClass();
webService.Credentials = new NetworkCredential("MyDomain\
\SomeoneElse", "HisPassword");
webService.UseDefaultCredentials = false;
webService.HelloWorld();
However if I check User.Identity.Name in the web service I get
"MyDomain\\Me" insead of "MyDomain\\SomeoneElse".
I would like to use this to only allow "MyDomain\\SomeoneElse" to
access the web service so I have the following in web.config:
<authentication mode="Windows"/>
<authorization>
<allow users="MyDomain\SomeoneElse"/>
<allow users="MyDomain\Me"/>
<deny users="*"/>
</authorization>
Where "MyDomain\Me" is only for this test.
built in web server in VS.NET 2005. I have the following code to
access the web service:
MyWebService webService = new MyWebService.MyClass();
webService.Credentials = new NetworkCredential("MyDomain\
\SomeoneElse", "HisPassword");
webService.UseDefaultCredentials = false;
webService.HelloWorld();
However if I check User.Identity.Name in the web service I get
"MyDomain\\Me" insead of "MyDomain\\SomeoneElse".
I would like to use this to only allow "MyDomain\\SomeoneElse" to
access the web service so I have the following in web.config:
<authentication mode="Windows"/>
<authorization>
<allow users="MyDomain\SomeoneElse"/>
<allow users="MyDomain\Me"/>
<deny users="*"/>
</authorization>
Where "MyDomain\Me" is only for this test.