locked
CRM 2011 IFD - Email Router org URL RRS feed

  • Question

  • I recently got IFD working on my CRM 2011 deployment.  Once that was up and running the Email Router stopped working.  So I figured I needed to change the Microsoft Dynamics CRM Server under the Deployments tab.  If I keep the deployment option as 'My Company' I couldn't get any URL's to work.  So I tried changing it to online service provider and used https://dev.domain.com:444/orgname.   That seemed to work, I was able to test access and publish and didn't see any errors in the event log shortly after.  However, the next day, my server had slowed to a crawl.  Checked it and the CPU was pegged at 100% with the email router throwing errors 15 times a second.  Below is the error.  I've turned the service off until I can verify what my settings should be.  Can someone verify what the Deployment type should be, along with the correct IFD URL, and the required permissions for the user?

    #26234 - The E-mail Router service could not process a provider work item using assembly: Microsoft.Crm.Tools.EmailProviders.dll and class: Microsoft.Crm.Tools.Email.Providers.SmtpPollingSendEmailProvider. System.NotSupportedException: The authentication endpoint Username was not found on the configured Secure Token Service!

       at Microsoft.Crm.ServiceProxyCache`1.BuildServiceProxy(Uri serviceUrl, Credential credentials, Uri homeRealmUrl, String passportEnvironment, IServiceConfiguration`1 serviceConfiguration)

       at Microsoft.Crm.ServiceProxyCache`1.GetNewServiceProxy(Uri serviceUrl, Credential credentials, Uri homeRealmUrl, String passportEnvironment)

       at Microsoft.Crm.Tools.Email.Providers.Utility.GetOrganizationUrl(Uri discoveryServiceUrl, Credential credentials, String organizationName)

       at Microsoft.Crm.Tools.Email.Providers.Utility.GetCrmService(Uri discoveryUri, String authMode, String userName, String password)

       at Microsoft.Crm.Tools.Email.Providers.CrmPollingSendEmailProvider.Run()

       at Microsoft.Crm.Tools.Email.Agent.ServiceCore.ExecuteProviderWork(Object providerQueueRequestObject)


    Liz
    Thursday, March 24, 2011 4:07 PM

All replies

  • Hi Liz,

    I had the same issue a few weeks ago. Under ADFS\Service\Endpoints, check if the 'Username' endpoint is enabled - example. The problem went away after I enabled it on my system.

    Neil.


    Neil - My CRM Blog
    • Proposed as answer by Bugs_Oli Friday, March 25, 2011 11:51 AM
    • Marked as answer by Jim Glass Jr Monday, March 28, 2011 8:18 PM
    • Unmarked as answer by Donna EdwardsMVP Friday, September 7, 2012 1:59 PM
    Thursday, March 24, 2011 9:47 PM
  • Thanks Neil,

     

    That did the trick for me!


    Currently blogging @ www.furnemont.eu
    Currently twittering @bugsoli
    Currently restoring my Mustang @www.mustangpassion.com
    Friday, March 25, 2011 11:51 AM
  • Thanks Neil.  It was not enabled, so I went ahead and enabled it.  Started up the email router service again and I'll keep a close eye on it. 


    Liz
    Monday, March 28, 2011 4:46 PM
  • Darn.  Made that change and have been watching the event logs for about an hour or so.  At first it seemed to be processing emails fine.  But now its throwing tons of errors again, so I've stopped the service.  Below is the error:

    #6511 - An error occurred while checking the e-mail message with subject "Sample Subject" in mailbox crmmail@domain.com for delivery to https://dev.domain.com:444/ORG. System.ServiceModel.Security.MessageSecurityException: An unsecured or incorrectly secured fault was received from the other party. See the inner FaultException for the fault code and detail. ---> System.ServiceModel.FaultException: ID3242: The security token could not be authenticated or authorized.

    --- End of inner exception stack trace ---

    Server stack trace:

    at System.ServiceModel.Channels.SecurityChannelFactory`1.SecurityRequestChannel.ProcessReply(Message reply, SecurityProtocolCorrelationState correlationState, TimeSpan timeout)

    at System.ServiceModel.Channels.SecurityChannelFactory`1.SecurityRequestChannel.Request(Message message, TimeSpan timeout)

    at System.ServiceModel.Channels.ServiceChannel.Call(String action, Boolean oneway, ProxyOperationRuntime operation, Object[] ins, Object[] outs, TimeSpan timeout)

    at System.ServiceModel.Channels.ServiceChannelProxy.InvokeService(IMethodCallMessage methodCall, ProxyOperationRuntime operation)

    at System.ServiceModel.Channels.ServiceChannelProxy.Invoke(IMessage message)

    Exception rethrown at [0]:

    at System.Runtime.Remoting.Proxies.RealProxy.HandleReturnMessage(IMessage reqMsg, IMessage retMsg)

    at System.Runtime.Remoting.Proxies.RealProxy.PrivateInvoke(MessageData& msgData, Int32 type)

    at Microsoft.Xrm.Sdk.IOrganizationService.Execute(OrganizationRequest request)

    at Microsoft.Xrm.Sdk.Client.OrganizationServiceProxy.ExecuteCore(OrganizationRequest request)

    at Microsoft.Crm.Tools.Email.Providers.CrmServiceClient.<>c__DisplayClass1.<Execute>b__0(IOrganizationService service)

    at Microsoft.Crm.Tools.Email.Providers.CrmServiceClient.Execute(OrganizationRequest request)

    at Microsoft.Crm.Tools.Email.Providers.CrmPollingMailboxProvider.AcceptMessageInternal(EmailMessage emailMessage)

    at Microsoft.Crm.Tools.Email.Providers.ExchangePollingMailboxProvider.AcceptMessageInternal(EmailMessage emailMessage)

    at Microsoft.Crm.Tools.Email.Providers.CrmPollingMailboxProvider.Run()


    Liz
    Monday, March 28, 2011 6:12 PM
  • Liz,

    I am seeing the exact error message as you except mine is being thrown from the CRM E-Mail Router service.  See below: 

     

    #26234 - The E-mail Router service could not process a provider work item using assembly: Microsoft.Crm.Tools.EmailProviders.dll and class: Microsoft.Crm.Tools.Email.Providers.ExchangePollingMailboxProvider. System.ServiceModel.Security.MessageSecurityException: An unsecured or incorrectly secured fault was received from the other party. See the inner FaultException for the fault code and detail. ---> System.ServiceModel.FaultException: ID3242: The security token could not be authenticated or authorized.

       --- End of inner exception stack trace ---

     

    Have you been able to resolve this error?

    Wednesday, July 20, 2011 12:12 PM
  • Hi Liz,

    I had the same issue a few weeks ago. Under ADFS\Service\Endpoints, check if the 'Username' endpoint is enabled - example. The problem went away after I enabled it on my system.

    Neil.


    Neil - My CRM Blog

    Cautionary tale -- I attemted to follow this advice by enabling the "adfs/services/trust/13/username" endpoint and it took down all external outlook access for CRM. Do not start messing with these end points if you do not know what you're doing.
    Phil Edry – Altriva Solutions – http://www.altriva.com/AltrivaBlog.aspx
    Thursday, August 4, 2011 4:55 PM
  • Additional cautions on enabling that endpoint: http://social.microsoft.com/Forums/en-US/crmdeployment/thread/a357d28f-72a7-472b-b592-07e54cc0fd6f/ still working on a final recommendation with Microsoft.
    Phil Edry – Altriva Solutions – http://www.altriva.com/AltrivaBlog.aspx
    • Edited by Phil Edry Thursday, August 11, 2011 6:09 PM typo
    Thursday, August 11, 2011 6:09 PM
  • Hi all,

    We are experiencing the same problem.  We if you stop and restart the email router service say 15 minutes later it behaves for a while then starts throwin errors again.  We have made some changes to the email router configuration and will report back but in light of Phil's comments, I'm not going to go down the path of enabling these endpoints.

     

    Has anyone had any luck solving this issue?

     

    Jason.

     

    Sunday, August 14, 2011 10:10 AM
  • Same issue, I either have external outlook working or email router, not best and am running with UR5 installed (server, email router and client).

    Anyone have a proper fix for this yet?

    Wednesday, November 9, 2011 12:16 PM
  • double check the username & password that the email router is using to login into CRM (it's on the Deployment tab of the E-Mail Router Configuration Manager).   

    NOTE: there are at two places that username/passwords are entered; one is on the first tab and that is used to access exchange and the other is on the 2nd tab (Deployment) to control access to CRM.

    Thursday, January 5, 2012 4:55 AM
  • We are experiencing the same issue.  I enabled the Username endpoint, but still the same thing.  Works for a couple of days then starts throwing errors again.

    Any solutions found yet? 


    Ken Compter
    Wednesday, January 25, 2012 2:18 PM
  • Hi all,

     

    xAirrick, we checked but the only deployment we have at the moment is a generic SMTP connector which connects to one of our Linux SMTP hosts.  The username and password seem to be fine.

     

    Ken, we're still having the problem.  Ours appears about every 3-4 weeks.  We stop the router for about 5 minutes, restart again and all is good again.  We also see this occur about 10mins after a server restart.  I believe we're running RU 5.

     

    #26234 - The E-mail Router service could not process a provider work item using assembly: Microsoft.Crm.Tools.EmailProviders.dll and class: Microsoft.Crm.Tools.Email.Providers.SmtpPollingSendEmailProvider. System.NotSupportedException: The authentication endpoint Username was not found on the configured Secure Token Service!

    Liz, it also looks like your error changed from #26234 to #6511 after playing with the endpoints.
    No solution from our end as yet.  
    Is everyone else still having this problem?  Has anyone from MS jumped in yet to provide any guidance?  I'm happy to assist with anything from this end.  Last time this occurred on our server was 16/01/2012.  
    What happens is it throws a Dr. Watson error and restarts the service.  Within about 3 minutes of the error, there are more than 100+ simultaneous Dr Watson processes and we get alerted to high-CPU threshold being reached.  That's when we know to take action.
    Jason.


    Consultant | Nerd | Visionary. http://www.ethertech.com.au/ | http://www.deeperstates.com.au
    Wednesday, January 25, 2012 2:43 PM
  • Actually, just found this.  This could also explain why we see this typically after a server restart as well.  See the bottom post.

    http://www.powerobjects.com/blog/2011/06/22/error-with-crm-2011-adfs-and-email-router/

    Crux of it is you need to start the email router AFTER ADFS is loaded.  

    We have noticed obviously that the problem doesn't come back after a restart of the email router, so long as you leave it a few mins for all the crash reports to die down.

    Maybe give this a try and see how you go.

     

    Jason.

     


    Consultant | Nerd | Visionary. http://www.ethertech.com.au/ | http://www.deeperstates.com.au
    • Proposed as answer by Jason Kelton Monday, August 20, 2012 10:08 AM
    Wednesday, January 25, 2012 2:49 PM
  • Jason, thanks for the info.  i have disabled Username in ADFS, stopped ADFS service and email router service, restarted ADFS then EMail router service.  I will keep an eye on it now.  Interesting about the server reboot.  could very well explain why we get hit periodically for no apparent reason other than windows updates being applied at night with server reboot.

    Ken


    Ken Compter
    Wednesday, January 25, 2012 5:48 PM
  • Yeah me too.  What should happen is if it doesn't find ADFS, complain and stop the router service from starting, rather than crash.  Right now I would see this as a bug as it shouldn't crash but error.
    Consultant | Nerd | Visionary. http://www.ethertech.com.au/ | http://www.deeperstates.com.au
    Friday, January 27, 2012 2:20 AM
  • I this issue with crm online. what can be the problem?
    Thursday, August 16, 2012 1:06 PM