Link to home
Start Free TrialLog in
Avatar of Avodah
AvodahFlag for United Kingdom of Great Britain and Northern Ireland

asked on

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/
ASKER CERTIFIED SOLUTION
Avatar of Anurag Thakur
Anurag Thakur
Flag of India image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of Avodah

ASKER

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
thanks for sharing how did you fix... this might be helpful for others how to fix the issue... ragi