Yesterday I can across a issue where i wasn't able to add the WCF service in solution to the WEB application in the same solution. I searched and snooped for a day couldn't find the problem as i didnt see any error message of any sort, even tried adding to a console application that worked but still no success with the web app.
A day later i checked the error list and saw some error showing unable to generate the service reference codes.
Custom tool warning: Cannot import wsdl:portType
Detail: An exception was thrown while running a WSDL import extension: System.ServiceModel.Description.DataContractSerializerMessageContractImporter
Error: Could not load file or assembly 'Microsoft.Owin.Security, Version=2.1.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' or one of its dependencies. The system cannot find the file specified.
XPath to Error Source: //wsdl:definitions[@targetNamespace='http://tempuri.org/']/wsdl:portType[@name='ICoreService'] WebRole\Service References\ServiceReference1\Reference.svcmap 1 1 WebRole
I googled it and found a very simple answer.
Check this link to know about the solution
Here when you add the service click the Advanced... button in the bottom left corner of the Add Service Reference window. On the Service Reference Settings screen that appears, in the Data Type section, under the Reuse Types in referenced assemblies: check-box, select the Reuse types in specified reference assemblies radio button then check ONLY the assemblies that contain types used by the service. Here try avoiding the OWIN related assemblies and check all others if you are not sure what all to add.
A day later i checked the error list and saw some error showing unable to generate the service reference codes.
Custom tool warning: Cannot import wsdl:portType
Detail: An exception was thrown while running a WSDL import extension: System.ServiceModel.Description.DataContractSerializerMessageContractImporter
Error: Could not load file or assembly 'Microsoft.Owin.Security, Version=2.1.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' or one of its dependencies. The system cannot find the file specified.
XPath to Error Source: //wsdl:definitions[@targetNamespace='http://tempuri.org/']/wsdl:portType[@name='ICoreService'] WebRole\Service References\ServiceReference1\Reference.svcmap 1 1 WebRole
Check this link to know about the solution
Here when you add the service click the Advanced... button in the bottom left corner of the Add Service Reference window. On the Service Reference Settings screen that appears, in the Data Type section, under the Reuse Types in referenced assemblies: check-box, select the Reuse types in specified reference assemblies radio button then check ONLY the assemblies that contain types used by the service. Here try avoiding the OWIN related assemblies and check all others if you are not sure what all to add.
No comments:
Post a Comment