Passing Credentials to a Web Service

From: Ramjee Tangutur (anonymous_at_discussions.microsoft.com)
Date: 02/19/04


Date: Thu, 19 Feb 2004 05:41:07 -0800

Hi All
        We have a web service (developed in C#). This web service is hosted in an extranet domain. 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 this reply to ramjee_t@infosys.com and austin_angel@infosys.com ***

Thanks & Regards,
Ramjee Tangutur
Microsoft India Community Star (.NET)
 



Relevant Pages

  • Re: Passing Credentials to a Web Service
    ... need to use it with SSL to prevent exposure of credentials). ... This web service is hosted in the ... is the client can be a part of the Corporate Intranet or the client can be ...
    (microsoft.public.dotnet.framework.aspnet.webservices)
  • Re: Windows authentication for web service client??
    ... If you are posting to WEBDAV it is my understanding that you cannot use Integrated authentication since you HAVE to pass it the username and the password in the network credentials. ... I must put together a sample example, but for some reason the users credentials are lost when making the WebDAV request. ... web service is running ASPNET account. ...
    (microsoft.public.dotnet.framework.aspnet.webservices)
  • Re: Calling Web Service that calls other Web Service with Windows Authentication
    ... You are passing credentials (by ... services - then you do not need to pass token remotely and windows can ... Given a windows application client that's calling a web service (using ...
    (microsoft.public.dotnet.framework.aspnet.webservices)
  • Passing credentials from ASP.NET website to webservice
    ... I have a problem with passing the default credentials from an ASP.NET web ... The EMM web applications access the MSCRM ... Web services which is part of the MS CRM server setup. ... since both the EMM web application and the web service reside on the same IIS ...
    (microsoft.public.inetserver.iis.security)
  • Passing Credentials to a Web Service
    ... 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. ... The following is the IIS configuration which hosts the Web Service. ...
    (microsoft.public.dotnet.framework.aspnet.webservices)