CRM Email router and Exchange 2010

Hi guys

Got a problem configuring CRM v4 (Rollup 8) with Exchange 2010.  Having read a great deal about configuring these two products, I'm stumbling in two areas:

1. I've diabled SSL on my EWS virtual directory as mentioned on a number of forums.  However, having done this, our users are no longer able to use Out of Office and are continually prompted for authentication when running Outlook.  So it seems that SSL is going to have to be switched back on. Even with it switched off, while the test succeeded within the Email router configurator, there were still errors in the event log as 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.Net.WebException: Unable to connect to the remote server ---> System.Net.Sockets.SocketException: Only one usage of each socket address (protocol/network address/port) is normally permitted 10.15.0.8:80
   at System.Net.Sockets.Socket.DoConnect(EndPoint endPointSnapshot, SocketAddress socketAddress)
   at System.Net.Sockets.Socket.InternalConnect(EndPoint remoteEP)
   at System.Net.ServicePoint.ConnectSocketInternal(Boolean connectFailure, Socket s4, Socket s6, Socket& socket, IPAddress& address, ConnectSocketState state, IAsyncResult asyncResult, Int32 timeout, Exception& exception)
   --- End of inner exception stack trace ---
   at System.Web.Services.Protocols.WebClientProtocol.GetWebResponse(WebRequest request)
   at System.Web.Services.Protocols.HttpWebClientProtocol.GetWebResponse(WebRequest request)
   at System.Web.Services.Protocols.SoapHttpClientProtocol.Invoke(String methodName, Object[] parameters)
   at Microsoft.Crm.Tools.Email.Providers.ExchangeServiceBinding.FindFolder(FindFolderType FindFolder1)
   at Microsoft.Crm.Tools.Email.Providers.ExchangeWSConnector.FindFolderId(String folderName)
   at Microsoft.Crm.Tools.Email.Providers.ExchangeWSConnector.MoveMessage(ExchangeEmailMessage exchangeEmailMessage, String folderName)
   at Microsoft.Crm.Tools.Email.Providers.ExchangePollingMailboxProvider.MoveMessage(EmailMessage emailMessage)
   at Microsoft.Crm.Tools.Email.Providers.ExchangePollingMailboxProvider.MoveMessageIfNeeded(Exception e, EmailMessage emailMessage)
   at Microsoft.Crm.Tools.Email.Providers.ExchangePollingMailboxProvider.HandleAcceptMessageError(Exception e, EmailMessage emailMessage)
   at Microsoft.Crm.Tools.Email.Providers.CrmPollingMailboxProvider.Run()
   at Microsoft.Crm.Tools.Email.Agent.ServiceCore.ExecuteProviderWork(Object providerQueueRequestObject)


 2. With SSL switched on, which it is by default and therefore presumably correct as far as Exchange is concerned, when running the Test in the email router configurator, it fails and depending on configuration have two different scenarios:

With Incoming profile referencing my signed site of mail.vistasupport.com, the test fails with Proxy authentication required

With Incoming profile referencing https://<servername>/ews/exchange.asmx then I get the following error:

"Incoming Status: Failure - The underlying connection was closed: Could not establish trust relationship for the SSL/TLS secure channel. The remote certificate is invalid according to the validation procedure"

which at least makes sense re the certificate on the site!

 

So, how do I configure CRM to connect to Exchange 2010 - do I need SSL of for EWS or on?

Do I need the certificate on the site to reference my internal servername as well as the external names?

Any help appreciated!

Thanks

Paul
vistasupportAsked:
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

x
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Justin DurrantSr. Engineer - Windows Server/VirtualizationCommented:
You need SSL.

One of the most important aspects of a successful Exchange messaging deployment is how you configure your SSL certificates for securing client communication to your Exchange infrastructure. This is because all communication between Outlook clients and the Autodiscover service  endpoint, in addition to communication between the Outlook client and Exchange services, occurs over an SSL channel. For this communication to occur without failing, you must have a valid SSL certificate installed. For  a certificate to be considered valid, it must meet the following criteria:

- The client can follow the certificate chain up to the trusted root.
- The name matches the URL that the client is trying to communicate with.
- The certificate is current and has not expired.

Remember,  the cert request needs to be generated by Exchange using PowerShell.
 http://technet.microsoft.com/en-us/library/aa998327.aspx

When you get the response back from the CA, use the import-certificate command to process  and enable it for SMTP, IIS, etc.
http://technet.microsoft.com/en-us/library/bb124424.aspx
0
vistasupportAuthor Commented:
Yes, Exchange standalone is SSL and works fine, however reading various aritcles on configuring the CRM email router mentions disabling SSL on the EWS virtual directory - doing that messes up various Exchange features, particularly autodiscover.  But with SSL enabled I can't get the CRM email router to work!
0
Justin DurrantSr. Engineer - Windows Server/VirtualizationCommented:
Yeah.. you are in a catch 22.. you definitely do not want to disable SSL on the EWS directory.

Have you seen this?

http://blogs.msdn.com/crm/archive/2009/12/17/update-rollup-8-for-microsoft-dynamics-crm-4-0.aspx

"Update Rollup 8 adds support for Exchange 2010. However, the Update Rollup 8 Rule Deployment Wizard does not yet support Exchange 2010. We are working to add that support in future Update Rollups."

0
Making Bulk Changes to Active Directory

Watch this video to see how easy it is to make mass changes to Active Directory from an external text file without using complicated scripts.

vistasupportAuthor Commented:
Yes, I have RU8 but don't use the Rule Deployment Wizard anyway.  I've just installed RU3 for Exch2010 and RU9 for CRM so will see how that goes, but neither reference this issue so not hopeful.
0
Justin DurrantSr. Engineer - Windows Server/VirtualizationCommented:
Ok. Let me know.. Like you said, doubt it will matter though.
0
Justin DurrantSr. Engineer - Windows Server/VirtualizationCommented:
0
vistasupportAuthor Commented:
Not really, I'm afraid.  I'm not using the forward mailbox method. The CRM email router is checking each individual mailbox (there's only 8 so processing overhead is limited).
0
vistasupportAuthor Commented:
OK, things have progresses after installing Exch2010 RU3 and CRM 4 RU9 for server, SRS and email router, along with a configuration on our firewall, I now have the CRM Email router configuration tool testing successfully - no errors within that tool.  However, my event viewer is a whole different story!  It is being bombarded with errors from the CRM Email router!  There are 3 different errors, which I will summarise here at the top of the message and then past the full error messages lower.

After resarting the CRM email service I get error sequence as below:
1. a few errors of ID 0, with the error message being 'There is an error in XML document'.
2. After that, I get a few warnings about certain emails not matching records which I assume is correct
3. Then I get a mixture of two errors; one is event id 0 - Unable to connect to the remote server ---> System.Net.Sockets.SocketException: Only one usage of each socket address (protocol/network address/port) is normally permitted 10.15.0.23:5555 (this is the IP address of the CRM server, which also houses the Email router)
The other error message is ID 0, The request failed with HTTP status 401: Unauthorized.

Any help appreciated!

Event error for - 1. There is an error in XML document
#27938 - An error occurred while checking for e-mail messages to process in mailbox Georgina.Sinfield@vistasupport.com. System.InvalidOperationException: There is an error in XML document (488, -1770). ---> System.Xml.XmlException: '?', hexadecimal value 0xFFFF, is an invalid character. Line 488, position -1770.
   at System.Xml.XmlTextReaderImpl.Throw(Exception e)
   at System.Xml.XmlTextReaderImpl.Throw(String res, String[] args)
   at System.Xml.XmlTextReaderImpl.Throw(Int32 pos, String res, String[] args)
   at System.Xml.XmlTextReaderImpl.ThrowInvalidChar(Int32 pos, Char invChar)
   at System.Xml.XmlTextReaderImpl.ParseNumericCharRefInline(Int32 startPos, Boolean expand, BufferBuilder internalSubsetBuilder, Int32& charCount, EntityType& entityType)
   at System.Xml.XmlTextReaderImpl.ParseText(Int32& startPos, Int32& endPos, Int32& outOrChars)
   at System.Xml.XmlTextReaderImpl.ParseText()
   at System.Xml.XmlTextReaderImpl.ParseElementContent()
   at System.Xml.XmlTextReaderImpl.Read()
   at System.Xml.XmlTextReader.Read()
   at System.Xml.XmlReader.ReadStartElement()
   at Microsoft.Xml.Serialization.GeneratedAssembly.XmlSerializationReaderExchangeServiceBinding.Read114_BodyType(Boolean isNullable, Boolean checkType)
   at Microsoft.Xml.Serialization.GeneratedAssembly.XmlSerializationReaderExchangeServiceBinding.Read198_MessageType(Boolean isNullable, Boolean checkType)
   at Microsoft.Xml.Serialization.GeneratedAssembly.XmlSerializationReaderExchangeServiceBinding.Read378_ArrayOfRealItemsType(Boolean isNullable, Boolean checkType)
   at Microsoft.Xml.Serialization.GeneratedAssembly.XmlSerializationReaderExchangeServiceBinding.Read387_ItemInfoResponseMessageType(Boolean isNullable, Boolean checkType)
   at Microsoft.Xml.Serialization.GeneratedAssembly.XmlSerializationReaderExchangeServiceBinding.Read406_ArrayOfResponseMessagesType(Boolean isNullable, Boolean checkType)
   at Microsoft.Xml.Serialization.GeneratedAssembly.XmlSerializationReaderExchangeServiceBinding.Read426_GetItemResponseType(Boolean isNullable, Boolean checkType)
   at Microsoft.Xml.Serialization.GeneratedAssembly.XmlSerializationReaderExchangeServiceBinding.Read533_GetItemResponse()
   at Microsoft.Xml.Serialization.GeneratedAssembly.ArrayOfObjectSerializer144.Deserialize(XmlSerializationReader reader)
   at System.Xml.Serialization.XmlSerializer.Deserialize(XmlReader xmlReader, String encodingStyle, XmlDeserializationEvents events)
   --- End of inner exception stack trace ---
   at System.Xml.Serialization.XmlSerializer.Deserialize(XmlReader xmlReader, String encodingStyle, XmlDeserializationEvents events)
   at System.Xml.Serialization.XmlSerializer.Deserialize(XmlReader xmlReader, String encodingStyle)
   at System.Web.Services.Protocols.SoapHttpClientProtocol.ReadResponse(SoapClientMessage message, WebResponse response, Stream responseStream, Boolean asyncCall)
   at System.Web.Services.Protocols.SoapHttpClientProtocol.Invoke(String methodName, Object[] parameters)
   at Microsoft.Crm.Tools.Email.Providers.ExchangeServiceBinding.GetItem(GetItemType GetItem1)
   at Microsoft.Crm.Tools.Email.Providers.ExchangeWSConnector.RetrieveMessage(Object id, ServiceLogger serviceLogger)
   at Microsoft.Crm.Tools.Email.Providers.ExchangePollingMailboxProvider.RetrieveNextMessageInternal()
   at Microsoft.Crm.Tools.Email.Providers.CrmPollingMailboxProvider.RetrieveNextMessage()
   at Microsoft.Crm.Tools.Email.Providers.CrmPollingMailboxProvider.Run()

For more information, see Help and Support Center at http://go.microsoft.com/fwlink/events.asp.

Event error for - 3. - Unable to connect to the remote server
#6511 - An error occurred while checking the e-mail message with subject "CT accounts set up in CRM" in mailbox John.Copeman@vistasupport.com for delivery to http://vrssvrnavision:5555/VistaRetailSupportLimited. System.Net.WebException: Unable to connect to the remote server ---> System.Net.Sockets.SocketException: Only one usage of each socket address (protocol/network address/port) is normally permitted 10.15.0.23:5555
   at System.Net.Sockets.Socket.DoConnect(EndPoint endPointSnapshot, SocketAddress socketAddress)
   at System.Net.Sockets.Socket.InternalConnect(EndPoint remoteEP)
   at System.Net.ServicePoint.ConnectSocketInternal(Boolean connectFailure, Socket s4, Socket s6, Socket& socket, IPAddress& address, ConnectSocketState state, IAsyncResult asyncResult, Int32 timeout, Exception& exception)
   --- End of inner exception stack trace ---
   at System.Web.Services.Protocols.WebClientProtocol.GetWebResponse(WebRequest request)
   at System.Web.Services.Protocols.HttpWebClientProtocol.GetWebResponse(WebRequest request)
   at System.Web.Services.Protocols.SoapHttpClientProtocol.Invoke(String methodName, Object[] parameters)
   at Microsoft.Crm.Sdk.Proxy.CrmService.Execute(Request 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.AcceptMessage(EmailMessage emailMessage)
   at Microsoft.Crm.Tools.Email.Providers.CrmPollingMailboxProvider.Run()

For more information, see Help and Support Center at http://go.microsoft.com/fwlink/events.asp.

Event error for - 3. - Unable to connect to the remote server
#27938 - An error occurred while checking for e-mail messages to process in mailbox Richard.Cottrell@vistasupport.com. System.Net.WebException: The request failed with HTTP status 401: Unauthorized.
   at System.Web.Services.Protocols.SoapHttpClientProtocol.ReadResponse(SoapClientMessage message, WebResponse response, Stream responseStream, Boolean asyncCall)
   at System.Web.Services.Protocols.SoapHttpClientProtocol.Invoke(String methodName, Object[] parameters)
   at Microsoft.Crm.Tools.Email.Providers.ExchangeServiceBinding.GetItem(GetItemType GetItem1)
   at Microsoft.Crm.Tools.Email.Providers.ExchangeWSConnector.RetrieveMessage(Object id, ServiceLogger serviceLogger)
   at Microsoft.Crm.Tools.Email.Providers.ExchangePollingMailboxProvider.RetrieveNextMessageInternal()
   at Microsoft.Crm.Tools.Email.Providers.CrmPollingMailboxProvider.RetrieveNextMessage()
   at Microsoft.Crm.Tools.Email.Providers.CrmPollingMailboxProvider.Run()

For more information, see Help and Support Center at http://go.microsoft.com/fwlink/events.asp.

0
vistasupportAuthor Commented:
OK, I've now got this working by installing the CRM Email router on a server other than the CRM server.  I haven't tried on my Exchange server as I don't really want to put it there, but is there a reason why it wouldn't work on the CRM server itself?

Where's the recommended location for the email router - CRM server, Exchange server, or another entirely separate server?
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Enterprise Software

From novice to tech pro — start learning today.