Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > ASP .Net Web Services > Passing Credentials to a Web Service

Reply
Thread Tools

Passing Credentials to a Web Service

 
 
Ramjee Tangutur
Guest
Posts: n/a
 
      02-19-2004
Hi Al
We have a web service (developed in C#). This web service is hosted in the Partners domain of Microsoft. A Windows Forms application is the consumer of this web service. The client can call the web service in two scenarios that is the client can be a part of the Corporate Intranet or the client can be in some remote location and access the web service over RAS.

We pass the credentials to the Web Service call as belowâ€

1. WebServiceObject.Credentials = Credentials.DefaultCredentials(); --> This will be used if the client is in Intrane

2. WebServiceObject.Credentials = new NetworkCredentials(“UserID”,”Password”,” Domain”); --> This will be used if the client is in extranet

Our Application has proper logic to determine if the client app is in Intranet or in Extranet

Now the problem that we face is, the credentials are not getting passed if we use the statement 2. We looked at the IIS Log from (C:\Windows\System32\LogFiles\...). Here from the log we saw that NULL credentials are getting passed.

The following is the IIS configuration which hosts the Web Service

1. OS --> Windows Server 200
2. IIS Ver --> 6.
3. Uses Application Pool
4. App Pool Identity --> “Local Systemâ€
5. Authentication on the Vir Dir --> “Integrated Windows” and “Digestâ€

Any pointers on what could be going wrong will be of great help. Please let us know, if we are missing some extra settings

*** Please mark a cc of the reply to http://www.velocityreviews.com/forums/(E-Mail Removed) and (E-Mail Removed) ***

Thanks & Regards
Ramjee Tangutu
Microsoft India Community Star (.NET


 
Reply With Quote
 
 
 
 
Jan Tielens
Guest
Posts: n/a
 
      02-20-2004
Do you use following line too?

WebServiceObject.PreAuthenticate = true;

--
Greetz

Jan Tielens
________________________________
Read my weblog: http://weblogs.asp.net/jan


"Ramjee Tangutur" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> Hi All
> We have a web service (developed in C#). This web service is hosted in the

Partners domain of Microsoft. A Windows Forms application is the consumer of
this web service. The client can call the web service in two scenarios that
is the client can be a part of the Corporate Intranet or the client can be
in some remote location and access the web service over RAS.
>
> We pass the credentials to the Web Service call as below.
>
> 1. WebServiceObject.Credentials = Credentials.DefaultCredentials(); -->

This will be used if the client is in Intranet
>
> 2. WebServiceObject.Credentials = new NetworkCredentials("UserID","

Password","Domain"); --> This will be used if the client is in extranet.
>
> Our Application has proper logic to determine if the client app is in

Intranet or in Extranet.
>
> Now the problem that we face is, the credentials are not getting passed if

we use the statement 2. We looked at the IIS Log from
(C:\Windows\System32\LogFiles\...). Here from the log we saw that NULL
credentials are getting passed.
>
> The following is the IIS configuration which hosts the Web Service.
>
> 1. OS --> Windows Server 2003
> 2. IIS Ver --> 6.0
> 3. Uses Application Pools
> 4. App Pool Identity --> "Local System"
> 5. Authentication on the Vir Dir --> "Integrated Windows" and "Digest"
>
> Any pointers on what could be going wrong will be of great help. Please

let us know, if we are missing some extra settings.
>
> *** Please mark a cc of the reply to (E-Mail Removed) and

(E-Mail Removed) ***
>
>
> Thanks & Regards,
> Ramjee Tangutur
> Microsoft India Community Star (.NET)
>
>



 
Reply With Quote
 
 
 
 
Alek Davis
Guest
Posts: n/a
 
      03-01-2004
Ramjee,

Not sure if this will help but try enabling basic authentication (you will
need to use it with SSL to prevent exposure of credentials). By the way, how
do you distinguish between intranet and extranet users (if this is not a
secret)? Thanks.

Alek

"Ramjee Tangutur" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> Hi All
> We have a web service (developed in C#). This web service is hosted in the

Partners domain of Microsoft. A Windows Forms application is the consumer of
this web service. The client can call the web service in two scenarios that
is the client can be a part of the Corporate Intranet or the client can be
in some remote location and access the web service over RAS.
>
> We pass the credentials to the Web Service call as below:
>
> 1. WebServiceObject.Credentials = Credentials.DefaultCredentials(); -->

This will be used if the client is in Intranet
>
> 2. WebServiceObject.Credentials = new NetworkCredentials("UserID","

Password","Domain"); --> This will be used if the client is in extranet.
>
> Our Application has proper logic to determine if the client app is in

Intranet or in Extranet.
>
> Now the problem that we face is, the credentials are not getting passed if

we use the statement 2. We looked at the IIS Log from
(C:\Windows\System32\LogFiles\...). Here from the log we saw that NULL
credentials are getting passed.
>
> The following is the IIS configuration which hosts the Web Service.
>
> 1. OS --> Windows Server 2003
> 2. IIS Ver --> 6.0
> 3. Uses Application Pools
> 4. App Pool Identity --> "Local System"
> 5. Authentication on the Vir Dir --> "Integrated Windows" and "Digest"
>
> Any pointers on what could be going wrong will be of great help. Please

let us know, if we are missing some extra settings.
>
> *** Please mark a cc of the reply to (E-Mail Removed) and

(E-Mail Removed) ***
>
>
> Thanks & Regards,
> Ramjee Tangutur
> Microsoft India Community Star (.NET)
>
>



 
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
"The credentials supplied conflict with an existing set of credentials" -=rjh=- NZ Computing 2 07-15-2006 11:09 PM
InvocationTargetException when calling "new Service()" in Axis web service to call another web service Michael Averstegge Java 0 01-10-2006 11:05 PM
Credentials for web service Web Team @ Borough of Poole ASP .Net 2 05-09-2005 12:58 PM
Pass through credentials to web service cmueller@online.nospam ASP .Net 3 12-21-2004 02:43 PM
Passing user credentials from ASP.NET to Web Service Mark D. ASP .Net Security 0 08-11-2004 08:25 PM



Advertisments