I have a Silverlight application that is communicating with ADO.Net data entities on the server side through a WCF Service. Actually, I am using multiple WCF services to communicate with three different data ADO.Net data entities. I had originally constructed this project on Visual Studio 2010, and recently moved to Visual Studio Professional 2012 (trial version) about a week ago. Everything worked/ported fine initially and I had no issues with the services about until about an hour ago. I was literally using these same WCF services in my code less then an hour ago. However, when I added a method to insert an xml string into my data base I got this error:
Content Type text/xml; charset=utf-8 was not supported by service . The client and service bindings may be mismatched.
But I checked the bindings and they were basicHttpBinding as far as I could tell from the ServiceReferences.ClientConfig file. I looked around for a solution and the only one I could find suggested deleting the service reference and reading it after restarting Visual Studio, so I finally tried that, but now, even after removing the method I had added, I now get this error when I try to add a service reference on the Client:
Warning 6 Custom tool warning: Cannot import wsdl:portType
Detail: An exception was thrown while running a WSDL import extension: System.ServiceModel.Description.DataContractSerializerMessageContractImporter
Error: Exception has been thrown by the target of an invocation.
XPath to Error Source: //wsdl:definitions[@targetNamespace='http://tempuri.org/']/wsdl:portType[@name='IXMonitorXMLDataService'] C:\Users\ckarrs\Documents\Visual Studio 11\Projects\SL_xMonitor_Frontend_RefactorV1_Backup82212\SL_xMonitor_Frontend_RefactorV1\Service References\XMonitorXMLDataService\Reference.svcmap 1 1 SL_xMonitor_Frontend_RefactorV1
Warning 7 Custom tool warning: Cannot import wsdl:binding
Detail: There was an error importing a wsdl:portType that the wsdl:binding is dependent on.
XPath to wsdl:portType: //wsdl:definitions[@targetNamespace='http://tempuri.org/']/wsdl:portType[@name='IXMonitorXMLDataService']
XPath to Error Source: //wsdl:definitions[@targetNamespace='http://tempuri.org/']/wsdl:binding[@name='BasicHttpBinding_IXMonitorXMLDataService'] C:\Users\ckarrs\Documents\Visual Studio 11\Projects\SL_xMonitor_Frontend_RefactorV1_Backup82212\SL_xMonitor_Frontend_RefactorV1\Service References\XMonitorXMLDataService\Reference.svcmap 1 1 SL_xMonitor_Frontend_RefactorV1
Warning 8 Custom tool warning: Cannot import wsdl:port
Detail: There was an error importing a wsdl:binding that the wsdl:port is dependent on.
XPath to wsdl:binding: //wsdl:definitions[@targetNamespace='http://tempuri.org/']/wsdl:binding[@name='BasicHttpBinding_IXMonitorXMLDataService']
XPath to Error Source: //wsdl:definitions[@targetNamespace='http://tempuri.org/']/wsdl:service[@name='XMonitorXMLDataService']/wsdl:port[@name='BasicHttpBinding_IXMonitorXMLDataService'] C:\Users\ckarrs\Documents\Visual Studio 11\Projects\SL_xMonitor_Frontend_RefactorV1_Backup82212\SL_xMonitor_Frontend_RefactorV1\Service References\XMonitorXMLDataService\Reference.svcmap 1 1 SL_xMonitor_Frontend_RefactorV1
Warning 9 Custom tool warning: No endpoints compatible with Silverlight 5 were found. The generated client class will not be usable unless endpoint information is provided via the constructor. C:\Users\ckarrs\Documents\Visual Studio 11\Projects\SL_xMonitor_Frontend_RefactorV1_Backup82212\SL_xMonitor_Frontend_RefactorV1\Service References\XMonitorXMLDataService\Reference.svcmap 1 1 SL_xMonitor_Frontend_RefactorV1
Warning 10 Custom tool warning: Exception has been thrown by the target of an invocation. C:\Users\ckarrs\Documents\Visual Studio 11\Projects\SL_xMonitor_Frontend_RefactorV1_Backup82212\SL_xMonitor_Frontend_RefactorV1\Service References\XMonitorXMLDataService\Reference.svcmap 1 1 SL_xMonitor_Frontend_RefactorV1
I am so confused. The other service references remain the same, and this service was working completely until I tried to add to it and update the reference. Is this a compatibility issue between VS 2010 and 2012? The MSDN website says VS 2012 is backwards compatible with VS 2010 and everything seemed to migrate fine. Any help is greatly appreciated, I am perplexed. Please let me know if additional info is required.