Skip to content

Accumulated Issues with WCF

December 16, 2015

Here is a collection of accumulated issues I have encountered with WCF which I would like to get off my chest and you may experience these aswell! These are more like ramblings and musings but these problems keep occurring when using WCF!

First problem – Anyone had problems just installing the dll files from Nuget as there may be conflicts? From what I have seen System.Data.Services and System.Data.Services.Client exists already in the .NET folders in Program Files so when installing you may get a conflicted error message. The way I overcame this is to uninstall / change the names of those dll files in the .NET folder, maybe not the best way but it fixes that annoying conflicted error message shown by Visual Studio 2013.

Second Problem – Anyone when setting up the Models for the WCF Project, encounter the Error Message shown below. Error Downloading the meadata for the SVC file, this has baffled me for ages as when adding the Service Reference and updating this, this error occurs!!


After a couple of hours of trying to resolve this, I have found out that the file has classes that are the same as the Service Reference WCF Data Service, so to simply remove this error is not to have the Service Reference added at all! This is a massive bug and its highly annoying as I was working out as to why this happened!

Problem 3 – If you see this message: –
An exception of type ‘System.InvalidOperationException’ occurred in EntityFramework.dll but was not handled in user code

Additional information: The entity type WebService is not part of the model for the current context.

{“An error occurred while updating the entries. See the inner exception for details.”}
{“Invalid object name ‘dbo.WebServices’.”}

It maybe due to a combination of the first two errors! This error had occured when Visual Studio sees that the namespace or service reference is updated incorrectly.

Problem 4-If you see this error! it is a similar problem with the references! I noticed that this error occurred if there are two references of System.Spatial adding in the same project package, I say package, meaning the overall project, for some reason Visual Studio doiesnt like this, so removing one will fix this error!

{“The type initializer for ‘System.Data.Services.Client.TypeSystem’ threw an exception.”}

Inner Exception {“Could not load file or assembly ‘System.Spatial, Version=, Culture=neutral, PublicKeyToken=31bf3856ad364e35’ or one of its dependencies. The located assembly’s manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040)”:”System.Spatial, Version=, Culture=neutral, PublicKeyToken=31bf3856ad364e35″}

Problem 5 – Not exactly a problem but it best to keep all the packages you install from Nuget coherent and the same, I instlaled from the following and all are versions 5.65-beta, if you have one that is newer or older it may leave further problems!

Happy WCF Coding!!!!!!


From → Uncategorized

Leave a Comment

Leave a Reply

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

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

Google+ photo

You are commenting using your Google+ 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 )


Connecting to %s

%d bloggers like this: