Archive
Microsoft Dynamics CRM 2011 – Error When Browsing Discovery.svc Service
Today I had to resolve a customer issue where the Dynamics CRM 2011 for Outlook Configuration Wizard could not find the CRM 2011 server and the CRM server did exist on the domain.
I was connecting Microsoft Outlook 2007 to CRM 2011 via the installed add-in Microsoft Dynamics CRM 2011 for Outlook.
My list of areas to troubleshoot this issue was as follows:
- Check CRM 2011 server is running ok. Can I browse it from the CRM Server?
- Check I can ping the CRM server from the Outlook client PC
- Check I can browse to CRM from the web browser on the Outlook client PC
- Check I can resolve the Discovery.svc service. CRM for Outlook Configuration tool uses this.
- Check the registry settings for the Configuration settings of CRM for Outlook
The Issue
Going through this list I found I could not resolve the Discovery.svc service from the Outlook client PC. You should be able to resolve the Discovery.svc service using the following URL. http://%5Byourcrmserver%5D/XRMServices/2011/Discovery.svc
You should see a page similar to below when you can successfully render the Discovery Service.
So I thought I had a possible IIS issue as I couldn’t render the service on the CRM server as well. I decided to check the Event Viewer first for any clues. Below is the error message I received.
WebHost failed to process a request.
Sender Information: System.ServiceModel.ServiceHostingEnvironment+HostingManager/63835064
Exception: System.ServiceModel.ServiceActivationException: The service ‘/XRMServices/2011/Discovery.svc’ cannot be activated due to an exception during compilation. The exception message is: This collection already contains an address with scheme http. There can be at most one address per scheme in this collection. If your service is being hosted in IIS you can fix the problem by setting ‘system.serviceModel/serviceHostingEnvironment/multipleSiteBindingsEnabled’ to true or specifying ‘system.serviceModel/serviceHostingEnvironment/baseAddressPrefixFilters’.
Parameter name: item. —> System.ArgumentException: This collection already contains an address with scheme http. There can be at most one address per scheme in this collection. If your service is being hosted in IIS you can fix the problem by setting ‘system.serviceModel/serviceHostingEnvironment/multipleSiteBindingsEnabled’ to true or specifying ‘system.serviceModel/serviceHostingEnvironment/baseAddressPrefixFilters’.
Parameter name: item
at System.ServiceModel.UriSchemeKeyedCollection.InsertItem(Int32 index, Uri item)
at System.Collections.Generic.SynchronizedCollection`1.Add(T item)
at System.ServiceModel.UriSchemeKeyedCollection..ctor(Uri[] addresses)
at System.ServiceModel.ServiceHost..ctor(Type serviceType, Uri[] baseAddresses)
at Microsoft.Crm.Sdk.V5.DiscoveryServiceHostFactory.CreateServiceHost(String constructorString, Uri[] baseAddresses)
at System.ServiceModel.ServiceHostingEnvironment.HostingManager.CreateService(String normalizedVirtualPath)
at System.ServiceModel.ServiceHostingEnvironment.HostingManager.ActivateService(String normalizedVirtualPath)
at System.ServiceModel.ServiceHostingEnvironment.HostingManager.EnsureServiceAvailable(String normalizedVirtualPath)
— End of inner exception stack trace —
at System.ServiceModel.ServiceHostingEnvironment.HostingManager.EnsureServiceAvailable(String normalizedVirtualPath)
at System.ServiceModel.ServiceHostingEnvironment.EnsureServiceAvailableFast(String relativeVirtualPath)
Process Name: w3wp
Process ID: 4116
- From this error message it seems their is a http bindings issue within IIS. Then it came to me! One of our infrastructure guys had created another port binding for CRM to be on port 80 for some other unrelated testing.
Resolution
Therefore to resolve this I had to remove the extra http binding in the Microsoft Dynamics CRM website within IIS.
To change or investigate your site bindings, click on Bindings… under Edit Site in IIS as shown below.
You should only have one http binding in the list as shown below. Note: I have removed the binding which was causing the problem in the image below.
Its possible to have multiple http bindings, but you will need to change some web.config values which contain multipleSiteBindingsEnabled and set it to true. See the error message earlier for more information.
Hope that helps!
Greg Olsen
Yellow Duck Guy
Excel 2007 Provider Connection Strings – Explained
Currently working on SQL Server Integration Services (SSIS) packages, which i’m using the Excel Provider to read an Excel spreadsheet and populate a SQL Server 2008 database table. You can alter the connection string within the Connection Manager for your Excel spreadsheet. Below is a quick summary of a couple of attributes.
Connection String examples for .config files:
<connectionStrings>
<add name="xls"connectionString="Provider=Microsoft.Jet.OLEDB.4.0;Data Source=c:\YourSpreadsheet.xls;Extended Properties=Excel 8.0"/>
<add name="xlsx"connectionString="Provider=Microsoft.ACE.OLEDB.12.0;Data Source=c:\YourSpreadsheet.xlsx;Extended Properties=Excel 12.0"/>
</connectionStrings>
The connection string xls is used above for Excel files pre-Excel 2007. The .xlsx extension was introduced with Excel 2007.
Working with Excel 2007 files
You can add an attribute of HDR=YES to indicate the first row is your column names. Use HDR=NO if not.
- Provider=Microsoft.ACE.OLEDB.12.0;Data Source=c:\YourSpreadsheet.xlsx;Extended Properties="Excel 12.0 Xml;HDR=YES";
If you want to treat all data in the file as text, overriding Excels column type "General" to guess what type of data is in the column then use IMEX=1.
- Provider=Microsoft.ACE.OLEDB.12.0;Data Source=c:\YourSpreadsheet.xlsx;Extended Properties="Excel 12.0 Xml;HDR=YES;IMEX=1";
There are some limitations of the Excel 2007 providers which are used by SSIS. You may fine a combination of formatting the source spreadsheet using ‘Format Cells’ option and using connection string attribute IMEX, to provide you with the solution you desire.
Greg Olsen
Yellow Duck Guy
Office 2007 Service Pack 1 Released
Greg Olsen
Box.Net is now Office 2007 enabled via Ribbon Add-Ins
http://www.box.net/r/office4