.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
 
Sign In
Register
 
Win Surprise Gifts!!!
Congratulations!!!


Top 5 Contributors of the Month
david stephan

Home >> Forum >> WCF >> Post New QuestionBookmark and Share Subscribe to Forum

Error 21 Reference.svcmap: Failed to generate code for the service reference

Posted By: SureshM     Posted Date: January 04, 2012    Points:5   Category :WCF
Hi Guys, I have added a service in my app,i got the below error when i build the app. Please help ...

Error 21 Reference.svcmap: Failed to generate code for the service reference 'WCFClient'. Cannot import wsdl:portType Detail: An exception was thrown while running a WSDL import extension: System.ServiceModel.Description.DataContractSerializerMessageContractImporter Error: Referenced type 'GoQuo.DP.Entities.CustomerUserProductUpsellEN, GoQuo.AgentEngine.Entities, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null' with data contract name 'CustomerUserProductUpsellEN' in namespace 'http://schemas.datacontract.org/2004/07/GoQuo.DP.Entities' cannot be used since it does not match imported DataContract. Need to exclude this type from referenced types. XPath to Error Source: //wsdl:definitions[@targetNamespace='http://tempuri.org/']/wsdl:portType[@name='IClient'] 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='IClient'] XPath to Error Source: //wsdl:definitions[@targetNamespace='http://tempuri.org/']/wsdl:binding[@name='BasicHttpBinding_IClient'] 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_IClient'] XPath to Error Source: //wsdl:definitions[@targetNamespace='http://tempuri.org/']/wsdl:service[@name='ClientsService']/wsdl:port[@name='BasicHttpBinding_IClient'] App_WebReferences/WCFClient/

Responses
Author: Deco             
Posted Date: January 10, 2012     Points: 20   

Please do the following steps and check if your error is resolved

Step 1: In Your project please delete all the clientConfigs, webService References, and the Service References Directories.
Step 2: Delete the Existing WebService
Step 3: Create a new one
Step 4: Build the Project and add service references to your solution

Regards,
Deco


Post Reply

You must Sign In To post reply
 
 
Find more Forum Questions on C#, ASP.Net, Vb.Net, SQL Server and more Here
Quick Links For Forum Categories:
ASP.NetWindows Application  .NET Framework  C#  VB.Net  ADO.Net  
Sql Server  SharePoint  OOPs  SilverlightIISJQuery
JavaScript/VBScriptBiztalkWPFPatten/PracticesWCFOthers
www.DotNetSpark.comUnAnsweredAll

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend