Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > ASP .Net Web Services > WebService Credentials

Thread Tools

WebService Credentials
Posts: n/a
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;

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"/>
<allow users="MyDomain\SomeoneElse"/>
<allow users="MyDomain\Me"/>
<deny users="*"/>

Where "MyDomain\Me" is only for this test.

Reply With Quote
Posts: n/a
It took a day for this post to show up so that is why there are two of

Reply With Quote

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
WebService Credentials Steve B. ASP .Net 1 09-11-2006 03:09 PM
"The credentials supplied conflict with an existing set of credentials" -=rjh=- NZ Computing 2 07-15-2006 11:09 PM
When must set Credentials with webservice? ad ASP .Net 1 03-18-2006 12:12 PM
Call to webservice doesn't pass in credentials ASP .Net 2 11-18-2005 05:31 PM
Send Credentials to IIS (webservice) Nenad Java 2 07-14-2004 11:05 AM