Please note: This blog is no longer active. My new blog is located at http://blog.timwheeler.io

Wednesday, November 6, 2013

SharePoint Designer 2013 can't connect

Recently I had an issue trying to use SharePoint Designer 2013.
After trying to connect to my SharePoint 2013 environment it kept displaying the very vague error message:

Request Error
         Request Error The server encountered an error processing the request. See server logs for more details.

Using fiddler I was able to see that the call to  http://server/_vti_bin/client.svc/ProcessQuery was failing with a 400 (Bad Request) error.

The only errors that stood out in the ULS logs (amoung the other countless errors that just seem to be normal) was:

System.IO.FileNotFoundException: Could not load file or assembly 'Microsoft.Data.OData, Version=5.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' or one of its dependencies. The system cannot find the file specified.

And

System.IO.FileNotFoundException: Could not load file or assembly 'Microsoft.Data.Edm, Version=5.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' or one of its dependencies. The system cannot find the file specified.

Interestingly enough I had installed a later version of these nu-get packages on another (non SharePoint) project.  Since this is my general DEV environment I may have played a part in this error.

I did see some other posts talking about enabling anonymous access, but that wasn't the problem in my case.

At any rate, the fix was to gac the correct versions of those dll's.

  1. Created a new blank project in Visual Studio 2012/13
  2. In the package manager console install the nu-get packages:
  3. Install-Package Microsoft.Data.OData -Version 5.0.0.50403 http://www.nuget.org/packages/Microsoft.Data.OData/5.0.0.50403
  4. Install-Package Microsoft.Data.Edm -Version 5.0.0.50403
Then browse to your source folder for the new package and locate the \packages\Microsoft.Data.OData.5.0.0.50403\lib\net40\Microsoft.Data.OData.dll
and
\packages\Microsoft.Data.OData.5.0.0.50403\lib\net40\Microsoft.Data.Edm.dll

You can now easily gac these using gacutil or simple drag into C:\Windows\Assembly
One iisreset later and all was well in SPD land...