none
CRM2011 E-Mail-Router: Type 'System.ServiceModel.Channels.ReceivedFault' ... is not marked as serializable

    Question

  • Hey,

     

    we are trying to upgrade from CRM4 to CRM2011 (both on-premise).

     

    We choose to start with new servers / AD-domain. So we installed a fresh Windows 2008 R2 Server with all updates and set up a new AD-Domain (different name).

    On top of that we installed a fresh MS-Sql Server 2008 R2 and CRM2011. We then exported the CRM-database on the old server and imported it on the new one. After adjusting security / users we were able to import / upgrade the database using the CRM Deployment Manager.

    CRM2011 is able to connect to the database and we see all our contacts / accounts etc.

     

    However we have a problem configuring the E-Mail-Router. We use an up-to-date Exchange 2010 server (same one as with crm4). Outgoing shall use SMTP, Incoming shall use Exchange Web Service. We configured the E-Mail router exactly the same way like we did on the old crm4-server. However when clicking the button “Test Access” we get for incoming

    Incoming Status: Failure - Type 'System.ServiceModel.Channels.ReceivedFault' in Assembly 'System.ServiceModel, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089' is not marked as serializable.

     

    And for outgoing

    Outgoing Status: Failure - Type 'System.ServiceModel.Channels.ReceivedFault' in Assembly 'System.ServiceModel, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089' is not marked as serializable.

     

    The weird thing is that the old crm4--erver / e-Mail router will still connect just fine. So we guess there is a problem with the E-Mail-Router of CRM2011.

     

    Any idea? This is kind of urgent since mails send with crm4 will be treated as SPAM on a regular basis and we cannot contact to our customers.

     

    Regards

    Saturday, April 30, 2011 2:27 AM

All replies

  • Olly,

    I've heard that the new CRM 2011 email router uses/needs .Net Framework 4 to operate  - It should be a part of the email router installation process, Could you verify the same ?

    Also, i would strongly recommend to install the Update Roll-Up 1 for CRM 2011 as it had something important for the new email router and see if that helps!

    Thanks.


    Cheers, Edwin

    Follow me on: https://twitter.com/astutecrm

    My Blog: http://astutecrm.wordpress.com/

     

    Sunday, May 01, 2011 2:40 PM
  • Hi,

    There is an additional requirement in CRM Router 2011 w.r.t some configs requiring the router service account and the current logged in user in router machine to be part of the PrivUserGroup of CRM.

     - If you are using incoming profiles of type "User Specified", then the router service account (the account that is configured to run the email router service) needs to be in PrivUserGroup.
     - If you are using "Local System Account" in the deployment tab, then either a CRM Sys Admin account or the machine account can be used to run the email router service. In additiona, the machine account has to be in PrivUserGroup.


    The error you pointed out should fall into one of these categories. Do let us know if it is not the case.

    In addition, it would be goodto take a look at the stack trace from router logs.
    To enable loggin in email router, follow the below mentioned steps :

     - In the Service folder of Email router installation, locate the file Microsoft.Crm.Tools.EmailAgent.xml.
     - There is a key for Log Level - <LogLevel></LogLevel> This is by default set to 1. Please set it to 3.
     - Add a key for Log file below this key. <LogFile>C:\Log.txt</LogFile> Mention the desired log file path and name.
     - Restart the Email router service.

    Monday, May 02, 2011 5:09 AM
  • Hi Edwin2win,

    I have the same problem as Olly. 

    I have done what you suggested, installed .Net Framework 4 (well, re-installed it) and have already installed UR1 and still have the error.

    Am wondering if it could be because I only have exchange 2003 version 6.5.7638.1??

     

    Monday, May 02, 2011 6:49 AM
  • Rob,

    Exchange 2003 shouldn't be a problem!

    Did you verify the suggestions given by Ravindra in this same thread... That might help!

    Thanks..


    Cheers, Edwin

    Follow me on: https://twitter.com/astutecrm

    My Blog: http://astutecrm.wordpress.com/

     

    Monday, May 02, 2011 7:19 AM
  • Hi Edwin and Ravindra,

    I hadn't seen Ravindra's post - I had the page open for a while hehe.

    I've confirmed that everything (users, computers etc) are members of the PrivUsers group. I have also set the logging to 3 and have the log below, I hope it helps :)

     

    05/03/2011 11:16:55 : #47100 - The E-mail Router service configuration parameter "MaxThreads" was read with the value "50".
    05/03/2011 11:16:56 : #47100 - The E-mail Router service configuration parameter "SchedulingPeriod" was read with the value "1000".
    05/03/2011 11:16:56 : #31826 - Refreshing configuration settings.
    05/03/2011 11:16:56 : #47100 - The E-mail Router service configuration parameter "ConfigUpdatePeriod" was read with the value "3600000".
    05/03/2011 11:17:07 : #6188 - The E-mail Router service cannot connect to the Microsoft Dynamics CRM server or the Microsoft Dynamics CRM Online server to access user and queue information. Verify that the account that is used to run the E-mail Router service has sufficient permission to access the Microsoft Dynamics CRM server and that there are no connectivity problems. System.ServiceModel.FaultException`1[Microsoft.Xrm.Sdk.OrganizationServiceFault]: The decryption key could not be obtained because HTTPS protocol is enforced, but not enabled. Enable HTTPS protocol, and try again. (Fault Detail is equal to Microsoft.Xrm.Sdk.OrganizationServiceFault).
    05/03/2011 11:17:07 : #6188 - The E-mail Router service cannot connect to the Microsoft Dynamics CRM server or the Microsoft Dynamics CRM Online server to access user and queue information. Verify that the account that is used to run the E-mail Router service has sufficient permission to access the Microsoft Dynamics CRM server and that there are no connectivity problems. System.ServiceModel.FaultException: The server was unable to process the request due to an internal error. For more information about the error, either turn on IncludeExceptionDetailInFaults (either from ServiceBehaviorAttribute or from the <serviceDebug> configuration behavior) on the server in order to send the exception information back to the client, or turn on tracing as per the Microsoft .NET Framework 3.0 SDK documentation and inspect the server trace logs.
    
    Server stack trace: 
      at System.ServiceModel.Channels.ServiceChannel.ThrowIfFaultUnderstood(Message reply, MessageFault fault, String action, MessageVersion version, FaultConverter faultConverter)
      at System.ServiceModel.Channels.ServiceChannel.HandleReply(ProxyOperationRuntime operation, ProxyRpc& rpc)
      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.RetrieveMultiple(QueryBase query)
      at Microsoft.Xrm.Sdk.Client.OrganizationServiceProxy.RetrieveMultipleCore(QueryBase query)
      at Microsoft.Crm.Tools.Email.Providers.CrmServiceClient.<>c__DisplayClass4.<RetrieveMultiple>b__3(IOrganizationService service)
      at Microsoft.Crm.Tools.Email.Providers.CrmServiceClient.RetrieveMultiple(QueryBase query)
      at Microsoft.Crm.Tools.Email.Management.Deployment.LoadOrganizationSetting()
      at Microsoft.Crm.Tools.Email.Management.Deployment.Load(BackgroundWorker backgroundWorker)
      at Microsoft.Crm.Tools.Email.Management.Configuration.UpdateAll(Boolean refreshDeployments, String configurationSettingsFilePath, String configurationFilePath)
    05/03/2011 11:17:07 : #47100 - The E-mail Router service configuration parameter "ConfigRefreshPeriod" was read with the value "5000".
    05/03/2011 11:17:07 : #16945 - Reading the system configuration.
    05/03/2011 11:17:07 : #36215 - Reading service provider configuration.
    05/03/2011 11:17:07 : #47100 - The E-mail Router service configuration parameter "ProviderAssembly" was read with the value "Microsoft.Crm.Tools.EmailProviders.dll".
    05/03/2011 11:17:07 : #47100 - The E-mail Router service configuration parameter "ProviderClass" was read with the value "Microsoft.Crm.Tools.Email.Providers.SmtpPollingSendEmailProvider".
    05/03/2011 11:17:07 : #19782 - The E-mail Router service has successfully created an instance of a service provider using assembly: Microsoft.Crm.Tools.EmailProviders.dll and class: Microsoft.Crm.Tools.Email.Providers.SmtpPollingSendEmailProvider.
    05/03/2011 11:17:07 : #47100 - The E-mail Router service configuration parameter "LogLevel" was read with the value "3".
    05/03/2011 11:17:07 : #47100 - The E-mail Router service configuration parameter "LogFile" was read with the value "".
    05/03/2011 11:17:07 : #47100 - The E-mail Router service configuration parameter "EmailServer" was read with the value "jade".
    05/03/2011 11:17:07 : #47100 - The E-mail Router service configuration parameter "CrmServerUrl" was read with the value "http://crm2:5555/WITCOM".
    05/03/2011 11:17:07 : #31552 - Reading service provider state.
    05/03/2011 11:17:07 : #47100 - The E-mail Router service configuration parameter "MaxThreads" was read with the value "50".
    05/03/2011 11:17:07 : #47100 - The E-mail Router service configuration parameter "PollingPeriod" was read with the value "60000".
    05/03/2011 11:17:07 : #9542 - The E-mail Router service successfully scheduled a provider work item using assembly: Microsoft.Crm.Tools.EmailProviders.dll and class: Microsoft.Crm.Tools.Email.Providers.SmtpPollingSendEmailProvider.
    05/03/2011 11:17:07 : #47100 - The E-mail Router service configuration parameter "SchedulingPeriod" was read with the value "1000".
    05/03/2011 11:17:07 : #25161 - The E-mail Router service is running a provider work item using assembly: Microsoft.Crm.Tools.EmailProviders.dll and class: Microsoft.Crm.Tools.Email.Providers.SmtpPollingSendEmailProvider.
    05/03/2011 11:17:07 : #47100 - The E-mail Router service configuration parameter "CrmAuthMode" was read with the value "WindowsAuthentication".
    05/03/2011 11:17:07 : #47100 - The E-mail Router service configuration parameter "CrmUser" was read with the value "".
    05/03/2011 11:17:07 : #47100 - The E-mail Router service configuration parameter "Info" was read with the value "SMTP: http://crm2:5555/WITCOM".
    05/03/2011 11:17:07 : #47100 - The E-mail Router service configuration parameter "PendingStatusDelay" was read with the value "300000".
    05/03/2011 11:17:07 : #47100 - The E-mail Router service configuration parameter "SendingStatusDelay" was read with the value "1800000".
    05/03/2011 11:17:07 : #47100 - The E-mail Router service configuration parameter "UserId" was read with the value "0a0d20cf-5a5f-e011-9d69-005056980046".
    05/03/2011 11:17:07 : #47100 - The E-mail Router service configuration parameter "UserId" was read with the value "1990dc16-5e5f-e011-9d69-005056980046".
    05/03/2011 11:17:07 : #47100 - The E-mail Router service configuration parameter "UserId" was read with the value "a195e51c-5e5f-e011-9d69-005056980046".
    05/03/2011 11:17:07 : #47100 - The E-mail Router service configuration parameter "UserId" was read with the value "603c725e-5e5f-e011-9d69-005056980046".
    05/03/2011 11:17:07 : #47100 - The E-mail Router service configuration parameter "UserId" was read with the value "6758d661-9664-e011-9d69-005056980046".
    05/03/2011 11:17:07 : #47100 - The E-mail Router service configuration parameter "UserId" was read with the value "14290e73-a264-e011-9d69-005056980046".
    05/03/2011 11:17:07 : #47100 - The E-mail Router service configuration parameter "UserId" was read with the value "8244dd1f-0f6a-e011-9d69-005056980046".
    05/03/2011 11:17:07 : #47100 - The E-mail Router service configuration parameter "MaxIds" was read with the value "5".
    05/03/2011 11:17:07 : #23379 - Could not verify the version of Microsoft Dynamics CRM at http://crm2:5555/WITCOM. The server was unable to process the request due to an internal error. For more information about the error, either turn on IncludeExceptionDetailInFaults (either from ServiceBehaviorAttribute or from the <serviceDebug> configuration behavior) on the server in order to send the exception information back to the client, or turn on tracing as per the Microsoft .NET Framework 3.0 SDK documentation and inspect the server trace logs.
    05/03/2011 11:17:07 : #31826 - Refreshing configuration settings.
    05/03/2011 11:17:07 : #47100 - The E-mail Router service configuration parameter "ConfigUpdatePeriod" was read with the value "3600000".
    05/03/2011 11:17:07 : #47100 - The E-mail Router service configuration parameter "ConfigRefreshPeriod" was read with the value "5000".
    05/03/2011 11:17:08 : #31826 - Refreshing configuration settings.
    05/03/2011 11:17:09 : #31826 - Refreshing configuration settings.
    05/03/2011 11:17:10 : #31826 - Refreshing configuration settings.
    05/03/2011 11:17:11 : #31826 - Refreshing configuration settings.
    05/03/2011 11:17:12 : #31826 - Refreshing configuration settings.
    05/03/2011 11:17:13 : #31826 - Refreshing configuration settings.
    05/03/2011 11:17:14 : #31826 - Refreshing configuration settings.
    05/03/2011 11:17:15 : #31826 - Refreshing configuration settings.
    05/03/2011 11:17:16 : #31826 - Refreshing configuration settings.
    05/03/2011 11:17:17 : #31826 - Refreshing configuration settings.
    05/03/2011 11:17:18 : #31826 - Refreshing configuration settings.
    05/03/2011 11:17:19 : #31826 - Refreshing configuration settings.
    05/03/2011 11:17:20 : #31826 - Refreshing configuration settings.
    05/03/2011 11:17:21 : #31826 - Refreshing configuration settings.
    05/03/2011 11:17:22 : #31826 - Refreshing configuration settings.
    05/03/2011 11:17:23 : #31826 - Refreshing configuration settings.
    05/03/2011 11:17:24 : #31826 - Refreshing configuration settings.
    05/03/2011 11:17:25 : #31826 - Refreshing configuration settings.
    05/03/2011 11:17:26 : #31826 - Refreshing configuration settings.
    05/03/2011 11:17:27 : #31826 - Refreshing configuration settings.
    05/03/2011 11:17:28 : #31826 - Refreshing configuration settings.
    05/03/2011 11:17:29 : #31826 - Refreshing configuration settings.
    05/03/2011 11:17:30 : #31826 - Refreshing configuration settings.
    05/03/2011 11:17:31 : #31826 - Refreshing configuration settings.
    05/03/2011 11:17:32 : #31826 - Refreshing configuration settings.
    05/03/2011 11:17:33 : #31826 - Refreshing configuration settings.
    05/03/2011 11:17:34 : #31826 - Refreshing configuration settings.
    05/03/2011 11:17:35 : #31826 - Refreshing configuration settings.
    05/03/2011 11:17:36 : #31826 - Refreshing configuration settings.
    05/03/2011 11:17:37 : #31826 - Refreshing configuration settings.
    05/03/2011 11:17:38 : #31826 - Refreshing configuration settings.
    05/03/2011 11:17:39 : #31826 - Refreshing configuration settings.
    05/03/2011 11:17:40 : #31826 - Refreshing configuration settings.
    05/03/2011 11:17:41 : #31826 - Refreshing configuration settings.
    05/03/2011 11:17:42 : #31826 - Refreshing configuration settings.
    05/03/2011 11:17:43 : #31826 - Refreshing configuration settings.
    05/03/2011 11:17:44 : #31826 - Refreshing configuration settings.
    05/03/2011 11:17:45 : #31826 - Refreshing configuration settings.
    05/03/2011 11:17:46 : #31826 - Refreshing configuration settings.
    05/03/2011 11:17:47 : #31826 - Refreshing configuration settings.
    05/03/2011 11:17:48 : #31826 - Refreshing configuration settings.
    05/03/2011 11:17:49 : #31826 - Refreshing configuration settings.
    05/03/2011 11:17:50 : #31826 - Refreshing configuration settings.
    05/03/2011 11:17:51 : #31826 - Refreshing configuration settings.
    05/03/2011 11:17:52 : #31826 - Refreshing configuration settings.
    05/03/2011 11:17:53 : #31826 - Refreshing configuration settings.
    05/03/2011 11:17:54 : #31826 - Refreshing configuration settings.
    05/03/2011 11:17:55 : #31826 - Refreshing configuration settings.
    05/03/2011 11:17:56 : #31826 - Refreshing configuration settings.
    05/03/2011 11:17:57 : #31826 - Refreshing configuration settings.
    05/03/2011 11:17:58 : #31826 - Refreshing configuration settings.
    05/03/2011 11:17:59 : #31826 - Refreshing configuration settings.
    05/03/2011 11:18:00 : #31826 - Refreshing configuration settings.
    05/03/2011 11:18:01 : #31826 - Refreshing configuration settings.
    05/03/2011 11:18:02 : #31826 - Refreshing configuration settings.
    05/03/2011 11:18:03 : #31826 - Refreshing configuration settings.
    05/03/2011 11:18:04 : #31826 - Refreshing configuration settings.
    05/03/2011 11:18:05 : #31826 - Refreshing configuration settings.
    05/03/2011 11:18:06 : #31826 - Refreshing configuration settings.
    05/03/2011 11:18:07 : #31826 - Refreshing configuration settings.
    05/03/2011 11:18:08 : #31826 - Refreshing configuration settings.
    05/03/2011 11:18:09 : #31826 - Refreshing configuration settings.
    05/03/2011 11:18:10 : #31826 - Refreshing configuration settings.
    05/03/2011 11:18:11 : #31826 - Refreshing configuration settings.
    05/03/2011 11:18:12 : #31826 - Refreshing configuration settings.
    05/03/2011 11:18:13 : #31826 - Refreshing configuration settings.
    05/03/2011 11:18:14 : #31826 - Refreshing configuration settings.
    05/03/2011 11:18:15 : #31826 - Refreshing configuration settings.
    05/03/2011 11:18:16 : #31826 - Refreshing configuration settings.
    05/03/2011 11:18:17 : #31826 - Refreshing configuration settings.
    05/03/2011 11:18:18 : #31826 - Refreshing configuration settings.
    

     

    Tuesday, May 03, 2011 1:23 AM
  • I got this one. You have used a User Specified profile.
    In CRM 2011, for security purposes, we expect HTTPS to be enforced in CRM Server if you use "user specified credentials" type of profiles in router.

    If you wish to adhere to this security enforcement, please remove the HTTP binding, add a HTTPS binding, reflect the changes in the URLs provided in Deployment Manager and update the URL in email router deployment tab. If you are using a self signed certificate for SSL, you would need to add that certificate to the Trusted Root store of the machine account (or the account running email router service) on the machine where email router is installed.

    Alternatively, for if you do not wish to adhere to this, we have provided a registry key that allows you to run on HTTP and still use this feature.

    On the CRM Server machine, add a registry key in the CRM Server's hive -
    HKLM\Software\Microsoft\MSCRM\DisableSecureDecryptionKey
    DWORD
    Value : 1

    Restart the Email router UI and service.

    Tuesday, May 03, 2011 2:57 AM
  • Hi Ravindra,

    I will need some time to setup the https stuff. 

    I tried closing the Email Router Config Manager, Stopping the CRM E-Mail Router service, adding the DWORD in to the registry, restarting the CRM Email Router service and opening the Config manager again, but got the same error.

    The log is now 138mb, so I can't really paste it in here. There is an exception being thrown though:

    Server stack trace: 
      at System.ServiceModel.Channels.ServiceChannel.ThrowIfFaultUnderstood(Message reply, MessageFault fault, String action, MessageVersion version, FaultConverter faultConverter)
      at System.ServiceModel.Channels.ServiceChannel.HandleReply(ProxyOperationRuntime operation, ProxyRpc& rpc)
      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.Discovery.IDiscoveryService.Execute(DiscoveryRequest request)
      at Microsoft.Xrm.Sdk.Client.DiscoveryServiceProxy.Execute(DiscoveryRequest request)
      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.CrmPollingMailboxProvider.Run()
      at Microsoft.Crm.Tools.Email.Agent.ServiceCore.ExecuteProviderWork(Object providerQueueRequestObject)
    05/03/2011 14:16:16 : #31826 - Refreshing configuration settings.
    05/03/2011 14:16:16 : #25161 - The E-mail Router service is running a provider work item using assembly: Microsoft.Crm.Tools.EmailProviders.dll and class: Microsoft.Crm.Tools.Email.Providers.SmtpPollingSendEmailProvider.
    05/03/2011 14:16:16 : #9542 - The E-mail Router service successfully scheduled a provider work item using assembly: Microsoft.Crm.Tools.EmailProviders.dll and class: Microsoft.Crm.Tools.Email.Providers.ExchangePollingMailboxProvider.
    05/03/2011 14:16:16 : #9542 - The E-mail Router service successfully scheduled a provider work item using assembly: Microsoft.Crm.Tools.EmailProviders.dll and class: Microsoft.Crm.Tools.Email.Providers.ExchangePollingMailboxProvider.
    05/03/2011 14:16:16 : #31826 - Refreshing configuration settings.
    05/03/2011 14:16:16 : #25161 - The E-mail Router service is running a provider work item using assembly: Microsoft.Crm.Tools.EmailProviders.dll and class: Microsoft.Crm.Tools.Email.Providers.ExchangePollingMailboxProvider.
    05/03/2011 14:16:16 : #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.ServiceModel.FaultException: The server was unable to process the request due to an internal error. For more information about the error, either turn on IncludeExceptionDetailInFaults (either from ServiceBehaviorAttribute or from the <serviceDebug> configuration behavior) on the server in order to send the exception information back to the client, or turn on tracing as per the Microsoft .NET Framework 3.0 SDK documentation and inspect the server trace logs.
    
    Server stack trace: 
      at System.ServiceModel.Channels.ServiceChannel.ThrowIfFaultUnderstood(Message reply, MessageFault fault, String action, MessageVersion version, FaultConverter faultConverter)
      at System.ServiceModel.Channels.ServiceChannel.HandleReply(ProxyOperationRuntime operation, ProxyRpc& rpc)
      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.Discovery.IDiscoveryService.Execute(DiscoveryRequest request)
      at Microsoft.Xrm.Sdk.Client.DiscoveryServiceProxy.Execute(DiscoveryRequest request)
      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)
    05/03/2011 14:16:16 : #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.FaultException: The server was unable to process the request due to an internal error. For more information about the error, either turn on IncludeExceptionDetailInFaults (either from ServiceBehaviorAttribute or from the <serviceDebug> configuration behavior) on the server in order to send the exception information back to the client, or turn on tracing as per the Microsoft .NET Framework 3.0 SDK documentation and inspect the server trace logs.
    
    Server stack trace: 
      at System.ServiceModel.Channels.ServiceChannel.ThrowIfFaultUnderstood(Message reply, MessageFault fault, String action, MessageVersion version, FaultConverter faultConverter)
      at System.ServiceModel.Channels.ServiceChannel.HandleReply(ProxyOperationRuntime operation, ProxyRpc& rpc)
      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.Discovery.IDiscoveryService.Execute(DiscoveryRequest request)
      at Microsoft.Xrm.Sdk.Client.DiscoveryServiceProxy.Execute(DiscoveryRequest request)
      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.CrmPollingMailboxProvider.Run()
      at Microsoft.Crm.Tools.Email.Agent.ServiceCore.ExecuteProviderWork(Object providerQueueRequestObject)
    05/03/2011 14:16:16 : #31826 - Refreshing configuration settings.
    05/03/2011 14:16:16 : #25161 - The E-mail Router service is running a provider work item using assembly: Microsoft.Crm.Tools.EmailProviders.dll and class: Microsoft.Crm.Tools.Email.Providers.ExchangePollingMailboxProvider.
    05/03/2011 14:16:16 : #9542 - The E-mail Router service successfully scheduled a provider work item using assembly: Microsoft.Crm.Tools.EmailProviders.dll and class: Microsoft.Crm.Tools.Email.Providers.SmtpPollingSendEmailProvider.
    05/03/2011 14:16:16 : #9542 - The E-mail Router service successfully scheduled a provider work item using assembly: Microsoft.Crm.Tools.EmailProviders.dll and class: Microsoft.Crm.Tools.Email.Providers.ExchangePollingMailboxProvider.
    05/03/2011 14:16:16 : #31826 - Refreshing configuration settings.
    05/03/2011 14:16:16 : #25161 - The E-mail Router service is running a provider work item using assembly: Microsoft.Crm.Tools.EmailProviders.dll and class: Microsoft.Crm.Tools.Email.Providers.SmtpPollingSendEmailProvider.
    

     

    Tuesday, May 03, 2011 4:23 AM
  • You can delete the older log file, or rename it, or truncate it. Router service will re-create a new one.
    Did you set the registry key in the CRM Server machine?
    Tuesday, May 03, 2011 4:35 AM
  • I renamed the logfile and saw another get created.

    I did do the reg key under the CRM server.

    Something interesting though, I changed the access credentials in deployments to use a domain admin account and everything tested successfully.

    So I thought maybe it's a permissions thing, so I tried the specific CRMrouter account again, but this time it has a user in CRM with the Sys Admin permission and it worked!

    Then I thought, I should take the Sys Admin role away because of security, this caused the incoming email to fail but outgoing succeed. So I created a security role called Email Router with no permission. 

    This failed because I didn't grant the Read Activity privilege. So I enabled that privilege for Organisation wide and everything succeeded!

    So to sum up, to fix my error:

    1. Create a Security Role in CRM 2011 with the following privileges for organisation wide:

    In Core records
    Activity Read
    Queue Read
    In Business Management
    Organisation Read
    User Read
    User Settings Read

    2. Create a new user in CRM 2011 using the AD user credentials created for the email router (in my case CRMrouter)

    3. Assign the newly created Security Role to the user

    Please note that the registry entry from Ravindra above is still there for http access.

     

    Thank you so much Ravindra for your help and a big sorry to Olly for totally hi-jacking your thread.

     

    EDIT: Jumped the gun with the privileges hehe

    EDIT: Formatting

    • Edited by Rob1983 Tuesday, May 03, 2011 5:39 AM Fixing The Formatting
    Tuesday, May 03, 2011 5:18 AM
  • Good to know.

    It looks like the domain admin account that you used in deployments tab is already in the PrivUserGroup. So the account that you had provided previously was not?
    If you had previously used Local System Account, then you had to add both the current logged in user and the router machine account into the PrivUserGroup (as stated previously). 
    Tuesday, May 03, 2011 5:23 AM
  • Hi,

     

    I had figured out that providing the credentials of a domain administrator on the deployment-tab of the router config tool solves the problem myself during the weekend. However I wanted to do some testing before posting it because I didn’t like running the router as such a powerful user.

     

    But first of all thanks to Ravindra for your hints and Rob for hijacking this thread :)

     

     

    > CRM 2011 email router uses/needs .Net Framework 4 to / Update Roll-Up 1 for CRM 2011

     

    Everything was installed.

     

     

    > It looks like the domain admin account that you used in deployments tab is already in the PrivUserGroup.

     

    It isn’t here and it still works. The only crm specific group the domain admin is a member of is ReportingGroup.

     

     

    Since I don’t want the router to run as domain admin I followed Rob’s path:

    I created a standard domain user (only member of domain users), added him as crm user and assigned the security role “System Administrator” in CRM to him (CRM then automatically made him member of PrivUserGroup and ReportingGroup in AD).

     

    If I provide this user’s credentials on the deployment-tab the crm receives and sents mails.

     

    This is a huge step in the right directing since now the router “only” runs as a crm system administrator and not as a domain admin anymore. So thanks again to all here for your help!

     

     

    However I would like to assign the router user as little rights as possible. Sad but true creating a security role in crm as described by rob does not work here. Up to a certain point the event viewer would tell me which rights are missing when pulling mails from the Exchange server, e.g:

    #9628 - An error occurred while delivering the e-mail message with subject "test" in mailbox xxx@zzzzzz.com for delivery to http://xxxxx:zzzzz/aaaaaaaaa/. System.ServiceModel.FaultException`1[Microsoft.Xrm.Sdk.OrganizationServiceFault]: Principal user (Id=d02fd1a2-8475-e011-bb84-00163e246d61, type=8) is missing prvAppendActivity privilege (Id=78777c10-09ab-4326-b4c8-cf5729702937) (Fault Detail is equal to Microsoft.Xrm.Sdk.OrganizationServiceFault).

     

    In that case the role was obviously missing the ability to append activities (core records tab).

     

    I kept granting rights but at a certain point the log only keeps telling me this:

    #9628 - An error occurred while delivering the e-mail message with subject "test" in mailbox xxx@zzzzzz.com for delivery to http:// xxxxx:zzzzz/aaaaaaaaa /. System.ServiceModel.FaultException`1[Microsoft.Xrm.Sdk.OrganizationServiceFault]: VerifyCommited - Transaction has not been commited (Fault Detail is equal to Microsoft.Xrm.Sdk.OrganizationServiceFault).

     

    These are the rights I granted in CRM:

     

    In Core records

    Activity

    Create, Read, Write, Append

    Queue

    Read

    In Business Management

    Organisation

    Read

    User

    Read

    User Settings

    Read

     

    Any idea which rights I am still missing?

     

    Regards!

    Tuesday, May 03, 2011 2:10 PM
  • Good to know.

    It looks like the domain admin account that you used in deployments tab is already in the PrivUserGroup. So the account that you had provided previously was not?
    If you had previously used Local System Account, then you had to add both the current logged in user and the router machine account into the PrivUserGroup (as stated previously). 

    Hi Ravindra,

    The current logged in user was the domain admin account I used. I'd made sure the router machine and the user account were added to the PrivUserGroup as you had suggested previously.

     

    Sorry Olly, I have no idea about your new error. If I come across anything I will definitely let you know :)

    Friday, May 06, 2011 11:51 AM
  • Hi guys,

    First, thanks for your research work it was really helpful for me to solve also the problem with my email router configuration :)

    Unfortunatly your proposed solution didn't worked out as it did for your configurations. The key to my success was to have the incoming profile configuration's credentials set to the same credentials as for the Deployment configuration. Otherwise I got the mentioned exception for outgoing and incoming.

    When I removed the incoming profile from the deployment configuration the outgoing was working again.

    I think the problem was that the other (service User) that was set previously in the Deployment config was not in the PrivUserGroup.

    BTW: The Registry switch was not necessary for my solution although I have only HTTP installed for Crm. So I guess this is not an issue.

    Thursday, May 19, 2011 12:55 PM
  • I think I'm completely lost on this post.  I have the same problem.  I just completed an installation of CRm 2011 and everything looks great except this error.

     

    Incoming Status: Failure - Type 'System.ServiceModel.Channels.ReceivedFault' in Assembly 'System.ServiceModel, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089' is not marked as serializable.

    Outgoing Status: Failure - Type 'System.ServiceModel.Channels.ReceivedFault' in Assembly 'System.ServiceModel, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089' is not marked as serializable.

     

    We have functioning CRM 4 using a domain admin account that has special impersonation permissions in Exchange, so we use this account for various other software applications. (I don't really care about the security concern of using a domain admin account).

     

    This account is working fine in CRM 4.  This account has been added to the PrivUserGroup in AD for this CRM installation.

    There is a separate AD service account that i used for the DB and CRM services which is only a local admin on the CRM server.  I tried using this account int he email router but got the same error, so i switched it back to my domain admin service account.

    I tried adding this domain admin service account to CRM itself as an Administrator, that didn't help.

     

    After reading through this post I don't really know where to go next.

    Thursday, September 29, 2011 8:32 PM
  • In our case, problem was that CRM was moved from old server to new one. You need to update PrivUserGroup in AD for proper computer object :)

    After update, restart crm services, and iisreset /noforce and it worked

    Thank you Ravindra :)


    -- Hrvoje Kusulja
    Monday, December 19, 2011 12:10 PM
  • Hey, we found adding the computer which has the email router manager
    installed on needs to be a member of the PrivUserGroup before we
    resolved this issue.

    http://chrishattonnzlcrm.wordpress.com/2012/10/04/crm-2011-email-router-system-servicemodel-channels-receivedfaul-is-not-marked-as-serializable/

    Cheers

    Chris

    • Proposed as answer by Ivailo Tzenkov Monday, January 14, 2013 12:02 PM
    Thursday, October 04, 2012 2:40 AM