locked
CRM2011 w/IFD- Customer Portal Connection String RRS feed

  • Question

  • Hey All,

    We have an on-premise install of CRM2011 with the Customer Portal installed.  I keep getting the ever popular "The user authentication failed!" when attempting to wire up the portal site to CRM.

    Here is our connection string:     <add name="Xrm" connectionString="ServiceUri=https://techcrm.lbmctech.com:443/LBMC; UserName=[domain]\[user]; Password=****;" />

    and here is the trace:

    [InvalidOperationException: The user authentication failed!]
       Microsoft.Xrm.Client.Services.OrganizationService.ToOrganizationServiceProxy(CrmConnection connection) +510
       Microsoft.Xrm.Client.Services.OrganizationService.ToOrganizationService(CrmConnection connection) +10
       Microsoft.Xrm.Client.Services.<>c__DisplayClass2.<.ctor>b__0() +18
       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) +83
       Microsoft.Xrm.Client.Services.OrganizationService.Execute(OrganizationRequest request) +77
       Microsoft.Xrm.Client.Services.CachedOrganizationService.InnerExecute(OrganizationRequest request) +77
       Microsoft.Xrm.Client.Services.OrganizationServiceCache.InnerExecute(TRequest query, Func`2 execute, Func`2 selector) +12
       Microsoft.Xrm.Client.Services.<>c__DisplayClass6`3.<LookupAndInsert>b__4(ObjectCache cache) +118
       Microsoft.Xrm.Client.Caching.<>c__DisplayClass9`1.<Get>b__8(String key) +20
       Microsoft.Xrm.Client.Threading.<>c__DisplayClass5`1.<Get>b__3(Mutex _) +39
       Microsoft.Xrm.Client.Threading.MutexExtensions.Lock(String key, Int32 millisecondsTimeout, Action`1 action) +100
       Microsoft.Xrm.Client.Threading.MutexExtensions.Get(String key, Int32 millisecondsTimeout, Func`2 loadFromCache, Func`2 loadFromService) +192
       Microsoft.Xrm.Client.Threading.MutexExtensions.Get(String key, Func`2 loadFromCache, Func`2 loadFromService) +51
       Microsoft.Xrm.Client.Caching.ObjectCacheManager.Get(ObjectCache cache, String cacheKey, Func`2 load, Action`2 insert, String regionName) +250
       Microsoft.Xrm.Client.Services.OrganizationServiceCache.LookupAndInsert(TRequest query, Func`2 execute, Func`2 selector, String selectorCacheKey) +322
       Microsoft.Xrm.Client.Services.OrganizationServiceCache.Get(TRequest query, Func`2 execute, Func`2 selector, String selectorCacheKey) +68
       Microsoft.Xrm.Client.Services.OrganizationServiceCache.InnerExecute(TRequest request, Func`2 execute, Func`2 selector, String selectorCacheKey) +124
       Microsoft.Xrm.Client.Services.OrganizationServiceCache.Execute(OrganizationRequest request, Func`2 execute, Func`2 selector, String selectorCacheKey) +58
       Microsoft.Xrm.Client.Services.CachedOrganizationService.Execute(OrganizationRequest request, Func`5 execute, Func`2 selector, String selectorCacheKey) +104
       Microsoft.Xrm.Client.Services.CachedOrganizationService.Execute(OrganizationRequest request, Func`2 selector, String selectorCacheKey) +185
       Microsoft.Xrm.Client.Services.CachedOrganizationService.Execute(OrganizationRequest request) +128
       Microsoft.Xrm.Client.Services.CachedOrganizationService.Execute(OrganizationRequest request) +10
       Microsoft.Xrm.Sdk.Client.OrganizationServiceContext.Execute(OrganizationRequest request) +89
       Microsoft.Xrm.Sdk.Linq.QueryProvider.RetrieveEntityCollection(OrganizationRequest request, NavigationSource source) +284
       Microsoft.Xrm.Sdk.Linq.QueryProvider.Execute(QueryExpression qe, Boolean throwIfSequenceIsEmpty, Boolean throwIfSequenceNotSingle, Projection projection, NavigationSource source, List`1 linkLookups, String& pagingCookie, Boolean& moreRecords) +344
       Microsoft.Xrm.Sdk.Linq.QueryProvider.Execute(QueryExpression qe, Boolean throwIfSequenceIsEmpty, Boolean throwIfSequenceNotSingle, Projection projection, NavigationSource source, List`1 linkLookups) +67
       Microsoft.Xrm.Sdk.Linq.QueryProvider.Execute(Expression expression) +129
       Microsoft.Xrm.Sdk.Linq.QueryProvider.GetEnumerator(Expression expression) +59
       Microsoft.Xrm.Sdk.Linq.Query`1.GetEnumerator() +72
       System.Linq.Enumerable.FirstOrDefault(IEnumerable`1 source) +182
       Microsoft.Xrm.Portal.Cms.WebsiteSelectors.NameWebsiteSelector.GetWebsite(OrganizationServiceContext context, RequestContext request) +33
       Microsoft.Xrm.Portal.PortalContext.<.ctor>b__0() +19
       System.Lazy`1.CreateValue() +361
       System.Lazy`1.LazyInitValue() +104
       System.Lazy`1.get_Value() +89
       Microsoft.Xrm.Portal.PortalContext.get_Website() +11
       Microsoft.Xrm.Portal.Web.CrmSiteMapProvider.FindSiteMapNode(String rawUrl) +193
       Microsoft.Xrm.Portal.PortalContext.GetNode(RequestContext request) +155
       Microsoft.Xrm.Portal.PortalContext.<.ctor>b__2() +10
       System.Lazy`1.CreateValue() +361
       System.Lazy`1.LazyInitValue() +104
       System.Lazy`1.get_Value() +89
       Microsoft.Xrm.Portal.PortalContext.get_Entity() +15
       Microsoft.Xrm.Portal.Web.Routing.PortalRouteHandler.GetHttpHandler(RequestContext requestContext) +74
       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

    Many thanks in Advance!

    -Michael

    Monday, September 19, 2011 5:25 PM

Answers

  • Thanks for the reply. The issue was with the first version of the Microsoft.Xrm.Client dll which had a bug in logic by trying to authenticate using AD creds when its using IFD. Cheers
    http://nzcrmguy.blogspot.com/ http://nzspguy.blogspot.com/
    Tuesday, October 11, 2011 7:53 PM

All replies

  • Am I asking the wrong kind of question here?  Does anybody actually respond to these questions?

    Just let me know and I'll ask somewhere else.

     

    -Michael

    Wednesday, September 21, 2011 1:16 PM
  • lol hey michael, did you get this issue sorted???im having a similar issue and im guessing its because of the IFD and the fact that my dev box is on a different domain to the dest CRM!!cant figure it out though
    http://nzcrmguy.blogspot.com/ http://nzspguy.blogspot.com/
    Monday, October 10, 2011 10:14 PM
  • Fortunately, our problem went away when we moved from our virtual QA environment to the live environment.  I could not get it to work even though our QA is an EXACT replica or production.  Who knows.  Sorry I couldn't be any more help, and good luck!
    Tuesday, October 11, 2011 12:40 PM
  • Thanks for the reply. The issue was with the first version of the Microsoft.Xrm.Client dll which had a bug in logic by trying to authenticate using AD creds when its using IFD. Cheers
    http://nzcrmguy.blogspot.com/ http://nzspguy.blogspot.com/
    Tuesday, October 11, 2011 7:53 PM
  • Well, that would make sense, because I downloaded the portal again instead of transfering the files.

    THANK YOU SIR.

    -Michael

    Wednesday, October 12, 2011 2:29 AM
  • Make sure you compile it with the latest SDK assemblies.
    Shan McArthur www.shanmcarthur.net Check out the commercial edition of xRM portals @ www.adxstudio.com
    Monday, October 17, 2011 10:34 PM
    Moderator
  • Hi Shan,

    Slightly unrelated - but with your 'updated' portal files from http://www.shanmcarthur.net/crm/crm2011-articles/customer-portal-modifications , how do you connect to an IFD crm org when running the CrmSvc tool??I see the dll's are the latest version but I still get a 'unauthorized user' exception? I havent implemented the work around suggested previously as I thought that this would be fixed with the newest dll's??


    http://nzcrmguy.blogspot.com/ http://nzspguy.blogspot.com/
    Tuesday, October 18, 2011 8:55 PM
  • I published that before they released the UR4 SDK - I should probably update the files again.  The bug with using CrmSvcUtil in a claims environment was fixed in CRM SDK UR4.  You can download the SDK and drop the new assemblies into your project as well as use the CrmSvcUtil from that drop to resolve your problems.
    Shan McArthur www.shanmcarthur.net Check out the commercial edition of xRM portals @ www.adxstudio.com
    Tuesday, October 18, 2011 9:12 PM
    Moderator
  • Thanks Shan, although there is no UR4 Sdk released yet is there??I know the rollup has been released but I cant find the updated sdk? In the 5.0.6 sdk (http://www.microsoft.com/download/en/details.aspx?id=24004) it says:

     

    Feature Area Known Issues
    Using CrmSvcUtil.exe with an IFD server results an error. (20175)
    
    Issue: Using CrmSvcUtil.exe with an IFD server results in the error “The logon attempt failed”.
    
    Workaround: A fix is scheduled for the Update Rollup 4 release of the SDK. There is no workaround at this time.
    
    

    Great! :)


    http://nzcrmguy.blogspot.com/ http://nzspguy.blogspot.com/
    Tuesday, October 18, 2011 9:52 PM