[Webinar] Learn how to a build a cloud-first strategyRegister Now

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 1292
  • Last Modified:

Help determining resolution to exception

The following error occurs whenever the website is being built. There are no exceptions / errors when adding or updating the WCF service. Does any have any idea or even how to begin resolving this error.


Error      3      Reference.svcmap: Failed to generate code for the service reference 'DataService'.  'http://www.xxx.com/DataService.svc/mex': The type initializer for 'System.ServiceModel.DiagnosticUtility' threw an exception.  Cannot import wsdl:portType  Detail: The type initializer for 'System.ServiceModel.DiagnosticUtility' threw an exception.  XPath to Error Source: //wsdl:definitions[@targetNamespace='http://www. xxx.com/']/wsdl:portType[@name='IDataService']  Cannot import wsdl:binding  Detail: The type initializer for 'System.ServiceModel.DiagnosticUtility' threw an exception.  XPath to Error Source: //wsdl:definitions[@targetNamespace='http://tempuri.org/']/wsdl:binding[@name='BasicHttpBinding_IDataService']  Cannot import wsdl:port  Detail: The type initializer for 'System.ServiceModel.DiagnosticUtility' threw an exception.  XPath to Error Source: //wsdl:definitions[@targetNamespace='http://tempuri.org/']/wsdl:service[@name='DataService']/wsdl:port[@name='BasicHttpBinding_IDataService']      App_WebReferences/DataService/
0
Richard Lee
Asked:
Richard Lee
  • 2
1 Solution
 
Richard LeeSoftware EnthusiastAuthor Commented:
Thanks for the link raqi0017. I resolved this issue last night bye removing the service reference from my website.

I have a solution where I have a WCF service hosted in IIS in its own project. The  DataService concerns itself with accessing data. Then referencing this assembly is another data assembly which is then access by my business layer.

Website --> Business --> Data --> Data.Web (Service)

Initially the application would not work unless i including a reference do Data.Web in my website, despite all the calls going through my business layer. I made quite a few changes and then it stopped working. By removing the service reference from the website its now working - (duplicate types). I spend a good couple of weeks on this problem.

Thanks
0
 
Anurag ThakurCommented:
thanks for sharing how did you fix... this might be helpful for others how to fix the issue... ragi
0

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now