SharePoint Designer 2010 – The server could not complete your request. The content type of the response is "".

Last night I came across an interesting problem, a SharePoint Server 2010 site that I am hosting on a Beta 2 server was having issues connecting via SharePoint Designer 2010.  A colleague brought my attention to it, and the very unhelp error messages that were being displayed, with no events in the event log on his PC.

He reported that the initial connection from SharePoint Designer 2010 appeared to be okay, however soon after being established the following error would occur:

Error 1

Error 2

This was very odd as the previous server this site had resided on had had no problems at all.  My first thought was that this must be an authentication issue, and I immediately tried switching from Claims Based Authentication back to Classic Authentication.  This had no effect on the problem.

I then cranked up the logging on the server, cleared the event logs and tried to make a connection again and the following came up almost immediately : 

 WebHost failed to process a request.
 Sender Information: System.ServiceModel.ServiceHostingEnvironment+HostingManager/59487907
 Exception: System.ServiceModel.ServiceActivationException: The service '/_vti_bin/client.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.
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.
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 System.ServiceModel.Activation.ServiceHostFactory.CreateServiceHost(Type serviceType, Uri[] baseAddresses)
   at System.ServiceModel.Activation.ServiceHostFactory.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: 6116
 

Fortunately this error is a fairly well known and documented WCF problem, and a quick search came up with this : http://social.msdn.microsoft.com/Forums/en-US/wcf/thread/9e248455-1c4d-4c5c-851c-79d9c1631e21/#page:1 

The short version?  WCF only supports one binding per IIS Web Site.  This can obviously be a problem where multiple host header bindings are required on the same IIS web site.  

The easy way around this?  Add another IP to your webserver, and setup a wildcard IP binding on that IIS site.  Then update your name server to point to the new IP address.  Host Header requests will still work fine as SharePoint will use its own internal Host Header Filter to discern which site to send each request to.   There are other work arounds so that you can have multiple bindings, but you will probably have to hack a bit to get them working.  Go seaching at your own peril 🙂

While this particular issue only presented itself on SharePoint Designer at first, upon closer inspection I found that other services, such as my Search Service Application, Tag Cloud, Multiple File Upload, etc were not working at all.  I would imagine best practices would be to always only use a single binding on each IIS website on your SharePoint 2010 servers.

To quote the colleague who brought it to my attention "It is a major thing and I pity the fool that thinks he can have http://intranet and http://intranet.company.com on the same web app ;o)".  Well said.

Advertisements

13 Responses to SharePoint Designer 2010 – The server could not complete your request. The content type of the response is "".

  1. Nick says:

    Anyway you could add a walk though on the solution showing the wild carding implementation?

    • Mark Rhodes says:

      Hi Nick,

      Its pretty easy:

      Create a quick backup of your IIS config – c:\windows\system32\inetsrv\appcmd add backup iischange
      Edit the bindings on your SharePoint site
      Remove all the bindings, there should only be one.
      Add a new binding that has the IP address you are using only, do not put in a host header value.

      If this does not work or you wish to roll back you can very quickly by issuing – c:\windows\system32\inetsrv\appcmd restore backup iischange

      That is pretty much it, you will need to make sure that the server can resolve your domain name to the right IP either via a hosts entry or via a name server. As long as the domain name matches the IP, and the domain name is also in the Alternate Access mappings, you can add as many domains as you want without breaking WCF.

      Mark

      • Thaer says:

        Hi Mark,

        I’ve created extended website , then I deleted the extended site from the IIS.
        then I deleted the extended site from the share point central administration.

        Since that I got the same error you have when opening the sharepoint designer.

        Could you share us a detailed instructions?

        like where could I remove the bindings?

        Thanks

      • Mark Rhodes says:

        Hi Thaer,

        Open up IIS manager, right click on the appropriate site, and select “Edit Bindings”.

        For WCF to work there must be only one binding per protocol (i.e. one for HTTP, one for HTTPS)

        Good Luck!

  2. Pingback: 2010 in review « Mark Rhodes

  3. Sean Reichle says:

    Your post was helpful, it sent me in the right direction… It was AAM response URL issue.
    Can’t access by localhost… Doh!

  4. Parvinder says:

    I was able to resolve this issue by web.config file change.
    The following entry in the web.config file was deleted:

    under the of the Web Application web.config.

    I added the entry again and the issue was fixed.

    • Parvinder says:

      Not sure why the tags are not coming, re-posting:

      I was able to resolve this issue by web.config file change.
      The following entry in the web.config file was missing:
      serviceHostingEnvironment aspNetCompatibilityEnabled=”true”

      under the system.serviceModel tag of the Web Application web.config.

      I added the entry again and the issue was fixed.

      • Moses David says:

        Absolute Legend!!! In my config file the it had been commented out. Previous vendor stuffing around. Fixed my issue. Thanks

  5. Parvinder says:

    I was able to resolve this issue by web.config file change.
    The following entry in the web.config file was missing:

    under the tag of the Web Application web.config.

    I added the entry again and the issue was fixed.

  6. Pingback: Rebuilding a Web Application in SharePoint Central Admin (Data Non-destructive) | Led to Slaughter

  7. Hello there, I found your site by way of Google whilst looking for a comparable topic, your website got here up, it appears good. I’ve bookmarked to favourites|added to my bookmarks.

  8. Pingback: خطا در ارتباط بین sharepoint designer و سرور

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: