Velocity Reviews - Computer Hardware Reviews

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

Reply
Thread Tools

WebService Authentication

 
 
mail747097@fificorp.net
Guest
Posts: n/a
 
      04-25-2007
I'm trying to call a web service with a different user than the one I
have logged in with. I'm using the web server built into VS.NET 2005.

I have the following code to call the web service using a proxy class:
MyWebService webService = new MyWebService.MyClass();
webService.Credentials = new NetworkCredential("MyDomain\
\SomeOneElse", "HisPassword");
webService.UseDefaultCredentials = false;
webService.HelloWorld();

However if I in the web service HelloWorld() function check
User.Identity.Name I am stil getting "MyDomain\\Me" and not "MyDomain\
\SomeOneElse".

 
Reply With Quote
 
 
 
 
ganesh
Guest
Posts: n/a
 
      05-09-2007
Please get clue from following questions.
Do the other users have access to the web service?
See the security permissions for the web service directory?
Is that user in the network and have access to the web server?



"" wrote:

> I'm trying to call a web service with a different user than the one I
> have logged in with. I'm using the web server built into VS.NET 2005.
>
> I have the following code to call the web service using a proxy class:
> MyWebService webService = new MyWebService.MyClass();
> webService.Credentials = new NetworkCredential("MyDomain\
> \SomeOneElse", "HisPassword");
> webService.UseDefaultCredentials = false;
> webService.HelloWorld();
>
> However if I in the web service HelloWorld() function check
> User.Identity.Name I am stil getting "MyDomain\\Me" and not "MyDomain\
> \SomeOneElse".
>
>

 
Reply With Quote
 
 
 
 
mail747097@fificorp.net
Guest
Posts: n/a
 
      05-11-2007
On 9 Maj, 07:48, ganesh <gan...@discussions.microsoft.com> wrote:
> Please get clue from following questions.
> Do the other users have access to the web service?
> See the security permissions for the web service directory?
> Is that user in the network and have access to the web server?
>
>
>
> "mail747...@fificorp.net" wrote:
> > I'm trying to call a web service with a different user than the one I
> > have logged in with. I'm using the web server built into VS.NET 2005.

>
> > I have the following code to call the web service using a proxy class:
> > MyWebService webService = new MyWebService.MyClass();
> > webService.Credentials = new NetworkCredential("MyDomain\
> > \SomeOneElse", "HisPassword");
> > webService.UseDefaultCredentials = false;
> > webService.HelloWorld();

>
> > However if I in the web service HelloWorld() function check
> > User.Identity.Name I am stil getting "MyDomain\\Me" and not "MyDomain\
> > \SomeOneElse".- Dölj citerad text -

>
> - Visa citerad text -


My other post contains more information:

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.

Your questions:
Do the other users have access to the web service? - See
<authorization> above.
See the security permissions for the web service directory? - See
<authorization> above.
Is that user in the network and have access to the web server? - All
users are in ActiveDirectory and members of the domain.

I have discovered now that this only is a problem with the web server
built into VS.NET 2005 and that it works in IIS.

 
Reply With Quote
 
 
 
Reply

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
Problem to call a WEBSERVICE in another WEBSERVICE (AXIS/ TOMCAT) Cyril Java 2 06-01-2006 06:07 PM
Problem! webservice.htc calling nonsecure webservice from a secured ssl https webpage batista ASP .Net 1 01-26-2006 12:05 PM
Problem! webservice.htc calling nonsecure webservice from a secured ssl https webpage batista ASP .Net 0 01-26-2006 08:13 AM
WebService on Java server versus WebService on .NET Mr. x Java 2 10-09-2003 11:21 PM
use another webservice in a webservice Mr. x ASP .Net Web Services 0 09-26-2003 10:59 PM



Advertisments
 



1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57