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/
LVL 18
Richard LeeSoftware EnthusiastAsked:
Who is Participating?
 
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 ThakurTechnical ManagerCommented:
thanks for sharing how did you fix... this might be helpful for others how to fix the issue... ragi
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.