Answered by:
Problem with Authentication against a custom website - Puzzling the greatest minds

Question
-
Dear All,
On customer site trying to implement a vendor's dashboard into MS CRM which is implemented via a custom website. I run an install routine supplied by the vendor and it installs the asp code and other supporting files into a virtual directly. MS CRM works great but when I click on the Dashboard menu option I receive the following error;
The request failed with HTTP status 401: Unauthorized.
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.
Exception Details: System.Net.WebException: The request failed with HTTP status 401: Unauthorized.
Source Error:
An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.
Stack Trace:
[WebException: The request failed with HTTP status 401: Unauthorized.] System.Web.Services.Protocols.SoapHttpClientProtocol.ReadResponse(SoapClientMessage message, WebResponse response, Stream responseStream, Boolean asyncCall) +551137 System.Web.Services.Protocols.SoapHttpClientProtocol.Invoke(String methodName, Object[] parameters) +204 Microsoft.Crm.Metadata.MetadataWebService.GetDataSet() +31 Microsoft.Crm.Metadata.DynamicMetadataCacheLoader.LoadDataSetFromWebService(Guid orgId) +301 Microsoft.Crm.Metadata.DynamicMetadataCacheLoader.LoadCacheFromWebService(LoadMasks masks, Guid organizationId) +40 Microsoft.Crm.Metadata.DynamicMetadataCacheFactory.LoadMetadataCache(LoadMethod method, CacheType type, IOrganizationContext context) +418 Microsoft.Crm.Metadata.MetadataCache.LoadCache(IOrganizationContext context) +324 Microsoft.Crm.Metadata.MetadataCache.GetInstance(IOrganizationContext context) +386 Microsoft.Crm.BusinessEntities.BusinessEntityMoniker..ctor(Guid id, String entityName, Guid organizationId) +115 Microsoft.Crm.Caching.UserDataCacheLoader.LoadCacheData(Guid key, ExecutionContext context) +323 Microsoft.Crm.Caching.ObjectModelCacheLoader`2.LoadCacheData(TKey key, IOrganizationContext context) +389 Microsoft.Crm.Caching.BasicCrmCache`2.CreateEntry(TKey key, IOrganizationContext context) +82 Microsoft.Crm.Caching.BasicCrmCache`2.LookupEntry(TKey key, IOrganizationContext context) +108 Microsoft.Crm.BusinessEntities.SecurityLibrary.GetUserInfoInternal(WindowsIdentity identity, IOrganizationContext context, UserAuth& userInfo) +344 Microsoft.Crm.BusinessEntities.SecurityLibrary.GetCallerAndBusinessGuidsFromThread(WindowsIdentity identity, Guid organizationId) +194 Microsoft.Crm.Authentication.CrmWindowsIdentity..ctor(WindowsIdentity innerIdentity, Boolean publishCrmUser, Guid organizationId) +279 Microsoft.Crm.Authentication.WindowsAuthenticationProvider.Authenticate(HttpApplication application) +605 Microsoft.Crm.Authentication.AuthenticationStep.Authenticate(HttpApplication application) +125 Microsoft.Crm.Authentication.AuthenticationPipeline.Authenticate(HttpApplication application) +66 Microsoft.Crm.Authentication.AuthenticationEngine.Execute(Object sender, EventArgs e) +513 System.Web.SyncEventExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() +92 System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) +64
Version Information: Microsoft .NET Framework Version:2.0.50727.1873; ASP.NET Version:2.0.50727.1433
This has so far eluded some large brains and the customer is getting a tad frustrated. Any thoughts gratefully receivedFriday, December 4, 2009 11:41 AM
Answers
-
You say custom web site. Is the site running under CRM or is it completely separate web site? Or under /ISV?
If it’s a completely different web site how does the user connect on-prem or IFD?
Also it looks like it connects to CRM but fails on a SOAP call. Did you test with an admin user ID? Might be the id you are using does not have enough rights to execute the request. This is the first thing I would try is executing with a user that has admin rights.
There should be no issues with a dashboard. We have a free dashboard we give our customers. http://www.powerobjects.com/powerdashboard.aspx
Dean- Marked as answer by Jim Glass Jr Thursday, April 1, 2010 6:15 PM
Friday, December 4, 2009 3:17 PM
All replies
-
"other supporting files into a virtual directly"
Ensure the necessary privelegdes for the Parent and Child folders are set so that everyone can read from the virtual directory.
Best Regards, DonnaFriday, December 4, 2009 1:13 PM -
Hi Donna,
Thanks for the reply. Can you be a bit more specific around 'necessary privileges'. Is this via IIS and Directory Security or through Windows Explorer and Security?
Thanks
ShaunFriday, December 4, 2009 1:55 PM -
Hi Shaun,
Try Windows Explorer and Security. Open WE and go to the Parent folder where the files are stored and for starters, give Everyone Read rights on the Parent and all subfolders. I'm surprised the Vendor is not able to resolve the issue. I would probably be hesitant to install a 3rd Party product where the 'Owning' company could not get the install to work.
Once you get the access error resolved you can further tweak the security to something different so you don't leave the directory open to everyone.
Best Regards, DonnaFriday, December 4, 2009 2:12 PM -
Hi Shaun
Does the dashboard application you are trying to integrate with CRM (4?) use impersonation? I am assuming the Dashboard is launched via /ISV
RegardsFriday, December 4, 2009 3:15 PM -
You say custom web site. Is the site running under CRM or is it completely separate web site? Or under /ISV?
If it’s a completely different web site how does the user connect on-prem or IFD?
Also it looks like it connects to CRM but fails on a SOAP call. Did you test with an admin user ID? Might be the id you are using does not have enough rights to execute the request. This is the first thing I would try is executing with a user that has admin rights.
There should be no issues with a dashboard. We have a free dashboard we give our customers. http://www.powerobjects.com/powerdashboard.aspx
Dean- Marked as answer by Jim Glass Jr Thursday, April 1, 2010 6:15 PM
Friday, December 4, 2009 3:17 PM