locked
"The user authentication failed!" when debugging the portal RRS feed

  • Question

  • Hi Guys, I managed to get to the debugging step on the installation process. I have an environment where crm use "https" instead of "http", although there isn't a single reference to this on the guide so i pressume is the same process. I changed the connection string to match my environment: add name="Xrm" connectionString="ServiceUri=https://tscrm.touchstone.co.uk:443; Domain=TOUCHSTONE; Username=mscrm_portal; Password=******"/> add name="Live" connectionString="Application Id=000000004805352D; Secret=kKIDv1uiLjTfdSTYfl7MRMyB7GWzxkb8"/> But when i debug it, gives me the following error. I have tried changing the user to the installation one, but the same result: The user authentication failed! 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.InvalidOperationException: The user authentication failed! 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: [InvalidOperationException: The user authentication failed!] Microsoft.Xrm.Client.Services.OrganizationService.Assert(Boolean condition, String message) +65 Microsoft.Xrm.Client.Services.OrganizationService.ToOrganizationServiceProxy(CrmConnection connection) +491 Microsoft.Xrm.Client.Services.OrganizationService.ToOrganizationService(CrmConnection connection) +44 Microsoft.Xrm.Client.Services.<>c__DisplayClass2.<.ctor>b__0() +42 System.Lazy`1.CreateValue() +361 System.Lazy`1.LazyInitValue() +104 System.Lazy`1.get_Value() +89 Microsoft.Xrm.Client.Services.InnerOrganizationService.UsingService(Func`2 action) +171 Microsoft.Xrm.Client.Services.OrganizationService.Execute(OrganizationRequest request) +130 Microsoft.Xrm.Client.Services.CachedOrganizationService.InnerExecute(OrganizationRequest request) +177 Microsoft.Xrm.Client.Services.OrganizationServiceCache.InnerExecute(TRequest query, Func`2 execute, Func`2 selector) +45 Microsoft.Xrm.Client.Services.<>c__DisplayClass6`3.<LookupAndInsert>b__4(ObjectCache cache) +198 Microsoft.Xrm.Client.Caching.<>c__DisplayClass9`1.<Get>b__8(String key) +50 Microsoft.Xrm.Client.Threading.<>c__DisplayClass5`1.<Get>b__3(Mutex _) +85 Microsoft.Xrm.Client.Threading.MutexExtensions.Lock(String key, Int32 millisecondsTimeout, Action`1 action) +252 Microsoft.Xrm.Client.Threading.MutexExtensions.Get(String key, Int32 millisecondsTimeout, Func`2 loadFromCache, Func`2 loadFromService) +332 Microsoft.Xrm.Client.Threading.MutexExtensions.Get(String key, Func`2 loadFromCache, Func`2 loadFromService) +86 Microsoft.Xrm.Client.Caching.ObjectCacheManager.Get(ObjectCache cache, String cacheKey, Func`2 load, Action`2 insert, String regionName) +337 Microsoft.Xrm.Client.Services.OrganizationServiceCache.LookupAndInsert(TRequest query, Func`2 execute, Func`2 selector, String selectorCacheKey) +439 Microsoft.Xrm.Client.Services.OrganizationServiceCache.Get(TRequest query, Func`2 execute, Func`2 selector, String selectorCacheKey) +107 Microsoft.Xrm.Client.Services.OrganizationServiceCache.InnerExecute(TRequest request, Func`2 execute, Func`2 selector, String selectorCacheKey) +195 Microsoft.Xrm.Client.Services.OrganizationServiceCache.Execute(OrganizationRequest request, Func`2 execute, Func`2 selector, String selectorCacheKey) +89 Microsoft.Xrm.Client.Services.CachedOrganizationService.Execute(OrganizationRequest request, Func`5 execute, Func`2 selector, String selectorCacheKey) +131 Microsoft.Xrm.Client.Services.CachedOrganizationService.Execute(OrganizationRequest request, Func`2 selector, String selectorCacheKey) +255 Microsoft.Xrm.Client.Services.CachedOrganizationService.Execute(OrganizationRequest request) +178 Microsoft.Xrm.Client.Services.CachedOrganizationService.Execute(OrganizationRequest request) +42 Microsoft.Xrm.Sdk.Client.OrganizationServiceContext.Execute(OrganizationRequest request) +180 Microsoft.Xrm.Sdk.Linq.QueryProvider.RetrieveEntityCollection(OrganizationRequest request, NavigationSource source) +420 Microsoft.Xrm.Sdk.Linq.QueryProvider.Execute(QueryExpression qe, Boolean throwIfSequenceIsEmpty, Boolean throwIfSequenceNotSingle, Projection projection, NavigationSource source, List`1 linkLookups, String& pagingCookie, Boolean& moreRecords) +694 Microsoft.Xrm.Sdk.Linq.QueryProvider.Execute(QueryExpression qe, Boolean throwIfSequenceIsEmpty, Boolean throwIfSequenceNotSingle, Projection projection, NavigationSource source, List`1 linkLookups) +93 Microsoft.Xrm.Sdk.Linq.QueryProvider.Execute(Expression expression) +178 Microsoft.Xrm.Sdk.Linq.QueryProvider.GetEnumerator(Expression expression) +80 Microsoft.Xrm.Sdk.Linq.Query`1.GetEnumerator() +159 System.Linq.Enumerable.FirstOrDefault(IEnumerable`1 source) +182 Microsoft.Xrm.Portal.Cms.WebsiteSelectors.NameWebsiteSelector.GetWebsite(OrganizationServiceContext context, RequestContext request) +132 Microsoft.Xrm.Portal.PortalContext.GetWebsite(OrganizationServiceContext context, RequestContext request, IWebsiteSelector websiteSelector) +40 Microsoft.Xrm.Portal.PortalContext.<.ctor>b__0() +62 System.Lazy`1.CreateValue() +361 System.Lazy`1.LazyInitValue() +104 System.Lazy`1.get_Value() +89 Microsoft.Xrm.Portal.PortalContext.get_Website() +35 Microsoft.Xrm.Portal.Web.CrmSiteMapProvider.FindSiteMapNode(String rawUrl) +434 Microsoft.Xrm.Portal.PortalContext.GetNode(RequestContext request) +235 Microsoft.Xrm.Portal.PortalContext.<.ctor>b__2() +43 System.Lazy`1.CreateValue() +361 System.Lazy`1.LazyInitValue() +104 System.Lazy`1.get_Value() +89 Microsoft.Xrm.Portal.PortalContext.get_Entity() +35 Microsoft.Xrm.Portal.Web.Routing.PortalRouteHandler.GetHttpHandler(RequestContext requestContext) +154 System.Web.Routing.UrlRoutingModule.PostResolveRequestCache(HttpContextBase context) +8890312 System.Web.Routing.UrlRoutingModule.OnApplicationPostResolveRequestCache(Object sender, EventArgs e) +86 System.Web.SyncEventExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() +148 System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) +75
    Monday, June 6, 2011 9:12 AM

Answers

  • Your connection string does not appear to have your orgname in it.  Please add your orgname to your url.
    Shan McArthur www.shanmcarthur.net Check out the commercial edition of xRM portals @ www.adxstudio.com
    • Marked as answer by Jim Glass Jr Wednesday, August 17, 2011 4:39 PM
    Saturday, June 25, 2011 6:02 PM
    Moderator

All replies

  • Your connection string does not appear to have your orgname in it.  Please add your orgname to your url.
    Shan McArthur www.shanmcarthur.net Check out the commercial edition of xRM portals @ www.adxstudio.com
    • Marked as answer by Jim Glass Jr Wednesday, August 17, 2011 4:39 PM
    Saturday, June 25, 2011 6:02 PM
    Moderator
  • Hi,

    I am facing the same problem. My crm url is https://orgName.domain.com:444.

    What should i pass in web config connection string as shown in below.

      <connectionStrings>
        <add name="Xrm" connectionString="Server=https://orgName.domain.com:444; Domain=domain; Username=Uname; Password=Password" />
      </connectionStrings>
    
    

    Wednesday, September 5, 2012 12:58 PM
  • I got the solution, used below connection string and it worked seamlessly...:)

    <add name="Xrm" connectionString="ServiceUri=https://orgName.domain.com:444/XRMServices/2011/Organization.svc; UserName=Uname; Password=Password;"/>

    Best!

    Thursday, September 6, 2012 9:13 AM