Re: Trying to pass NetworkCredential to WebService
- From: stcheng@xxxxxxxxxxxxxxxxxxxx (Steven Cheng[MSFT])
- Date: Fri, 15 Jul 2005 07:30:55 GMT
Hi Marshall,
When your webservice's virtual dir requires Authentication(disabled
anomymous), the clientside need to provide a certain credential for
authentication. For your scenario, that's the ASP.NET webapp. So in your
ASP.NET's webservice calling code, we need to attach a NetworkCredential to
the webservice proxy instance.
As for the further problem you mentioned,
==================
So this still is a problem because my web service needs to run in
its own pool because I tie Sql Server permissions to its identity.
===================
would you provide some further description on this? Based on my
understanding, your ASP.NET webservice can surely to running in its own
application pool (with its own identity) different from the ASP.NET
webapp's.
Looking forward to your response.
Thanks,
Steven Cheng
Microsoft Online Support
Get Secure! www.microsoft.com/security
(This posting is provided "AS IS", with no warranties, and confers no
rights.)
--------------------
| From: "Marshall" <marshall@xxxxxxxxxxxxxxxx>
| References: <OqRQFA9hFHA.2904@xxxxxxxxxxxxxxxxxxxx>
<JUjsKACiFHA.2800@xxxxxxxxxxxxxxxxxxxxx>
<#GmyXSGiFHA.2180@xxxxxxxxxxxxxxxxxxxx>
| Subject: Re: Trying to pass NetworkCredential to WebService
| Date: Thu, 14 Jul 2005 07:52:46 -0400
| Lines: 34
| X-Priority: 3
| X-MSMail-Priority: Normal
| X-Newsreader: Microsoft Outlook Express 6.00.3790.1830
| X-MimeOLE: Produced By Microsoft MimeOLE V6.00.3790.1830
| X-RFC2646: Format=Flowed; Response
| Message-ID: <u7BlPqGiFHA.4000@xxxxxxxxxxxxxxxxxxxx>
| Newsgroups: microsoft.public.dotnet.framework.aspnet.webservices
| NNTP-Posting-Host: 66-195-172-195.gen.twtelecom.net 66.195.172.195
| Path: TK2MSFTNGXA01.phx.gbl!TK2MSFTNGP08.phx.gbl!TK2MSFTNGP12.phx.gbl
| Xref: TK2MSFTNGXA01.phx.gbl
microsoft.public.dotnet.framework.aspnet.webservices:7405
| X-Tomcat-NG: microsoft.public.dotnet.framework.aspnet.webservices
|
| Actually, my statement was incorrect. The problem was that my web
service
| was running in its own application pool with an identity of a domain
| account. So this still is a problem because my web service needs to run
in
| its own pool because I tie Sql Server permissions to its identity.
|
| "Marshall" <marshall@xxxxxxxxxxxxxxxx> wrote in message
| news:%23GmyXSGiFHA.2180@xxxxxxxxxxxxxxxxxxxxxxx
| > Thanks Luke,
| >
| > Yes, the web service is set to use Integrated authentication and
anonymous
| > access is disabled.
| >
| > My code was passing credientials like you illustrated. The link you
| > attached guided me to another kb article which solved my problem.
| >
| > http://support.microsoft.com/kb/811318/EN-US/
| >
| > I changed my code to use the CredentialCache class and it worked like
| > this:
| > localhost.Service ws = new localhost.Service();
| >
| > System.Net.CredentialCache cache = new System.Net.CredentialCache();
| > cache.Add( new Uri(ws.Url), "Negotiate", new
| > System.Net.NetworkCredential("userName", "password", "domain"));
| > ws.Credentials = cache;
| >
| > Response.Write(ws.HelloWorld());
| >
| > Thanks,
| >
| > Marshall
| >
|
|
|
.
- References:
- Trying to pass NetworkCredential to WebService
- From: Marshall
- RE: Trying to pass NetworkCredential to WebService
- From: [MSFT]
- Re: Trying to pass NetworkCredential to WebService
- From: Marshall
- Re: Trying to pass NetworkCredential to WebService
- From: Marshall
- Trying to pass NetworkCredential to WebService
- Prev by Date: RE: Error Consuming Webservice
- Next by Date: Keeping server-side object alive
- Previous by thread: Re: Trying to pass NetworkCredential to WebService
- Next by thread: WebService Behavior problem (Service unavailable on localhost)
- Index(es):
Relevant Pages
|