Re: Passing credentials from ASP.NET website to webservice



is the computer account for the web server trusted for delegation?


"Adarsh" <Adarsh@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
news:64961808-97D4-4961-B12F-4D31A1FC544A@xxxxxxxxxxxxxxxx
Hi,

I have a problem with passing the default credentials from an ASP.NET web
application residing on 1 web server(IIS) to a web service residing on
another server(IIS). Below is the complete description.

The problem statement for the double hop issue in our product Email
Manager
Maintenance (EMM) is as follows:

Description: The current implementation of the EMM is that the EMM web
applications (ASP.NET) are installed on the same web server which has
Microsoft CRM (1.2/3.0) installed. The EMM web applications access the
MSCRM
Web services which is part of the MS CRM server setup. This setup works
fine
since both the EMM web application and the web service reside on the same
IIS
server.

Problem statement: The new implementation of the EMM web application
requires that the application be installed on a separate standard Windows
2000/2003 Server having IIS 6.0.
In such a case, the EMM web application needs to communicate to the MS CRM
web service on another web server. In order to consume the web service,
the
web application will pass windows credentials to the web service proxy for
authentication. The credentials to be passed have to be the default
credentials. However, this involves passing credentials across servers
from
one IIS server to another IIS server. The main problem lies here as the
credentials need to "hop" across from 1 site to another. The following is
the
details of the environment setup for this implementation.

Server A (Domain controller) has the following installed:
1. Windows 2003 Server
2. Microsoft CRM 1.2
3. SQL Server 2000
4. IIS 6.0
5. MSCRMServices running in IIS.
6. Active Directory
7. Exchange Server 2003

Server B (Web server) has the following installed:
1. Windows 2003 Server
2. IIS 6.0 (default website set to integrated windows authentication)
3. EMM web site is installed in this web server

Below is the code where the credentials are being passed to the MSCRM web
service proxy.

using System;
using System.Data;
using System.Net;
using System.Xml;

namespace CrmHelperClass
{
public class CrmHelperClass
{
System.Net.ICredentials userCredentials;
string crmServicesUrl;
private System.Net.ICredentials adminCredentials;
//Constructor
public CrmHelperClass(string crmServiceUrl, string adminUsername, string
adminPwd)
{
try
{
crmServiceUrl = "http://10.200.167.250:80/MSCRMServices";;
adminUsername = encrypObj.Decryptedvalue(adminUsername);
adminPwd=encrypObj.Decryptedvalue(adminPwd);
//Get the admin credentials for MS CRM
adminCredentials=new
System.Net.NetworkCredential(adminUsername,adminPwd,domainname);
//Get the User credentials
userCredentials = System.Net.CredentialCache.DefaultCredentials;
//Get the BizUser CRM proxy object
oBizUser = new Microsoft.CRM.Proxy.BizUser();
oBizUser.Credentials = userCredentials;
oBizUser.Url = crmServicesUrl + CrmHelperConstants.CRMBizUserUrl; //
BizUserUrl = BizUser.srf
//Authenticate the logged in user credentials against the CRM web service
oUserAuth = oBizUser.WhoAmI();
}
catch(System.Web.Services.SoapException err)
{
throw;
}
catch(Exception ex)
{
throw ex;
}
}

}
}

If anybody has a solution to fix the issue, it will be highly appreciated.

Cheers,
Adarsh


.



Relevant Pages

  • 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)
  • Re: Server Time Out
    ... could be not passing user credentials to the web service from the client. ... calling a remote server from a web server due to not being able to forward ...
    (microsoft.public.dotnet.framework.aspnet.webservices)
  • Re: Pass through credentials to web service
    ... It is the double-hop' limitation of NTLM authentication. ... application server, the server cannot then use those credentials to ... >I have a client application that calls a web service. ...
    (microsoft.public.dotnet.framework.aspnet)
  • Re: RWW
    ... "normal" Windows Server 2003 way... ... that this worked before trying RWW in this environment. ... enable Remote Desktop first and to add to the local Remote Desktop Users ... as well as entering credentials on the FBA logon page. ...
    (microsoft.public.windows.server.sbs)
  • Re: Sharing/Forwarding website credentials programatically
    ... What you are wanting is not really delegation of credentials from the portal ... can directly contact that server). ... authentication over SSL against a standard Active Directory account. ... essentially in the request-headers or URI itself. ...
    (microsoft.public.inetserver.iis.security)