Help determining resolution to exception

Posted on 2009-02-21
Last Modified: 2013-11-07
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'.  '': 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.']/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='']/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='']/wsdl:service[@name='DataService']/wsdl:port[@name='BasicHttpBinding_IDataService']      App_WebReferences/DataService/
Question by:Richard Lee
    LVL 26

    Accepted Solution

    LVL 18

    Author Comment

    by:Richard Lee
    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.

    LVL 26

    Expert Comment

    by:Anurag Thakur
    thanks for sharing how did you fix... this might be helpful for others how to fix the issue... ragi

    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    Find Ransomware Secrets With All-Source Analysis

    Ransomware has become a major concern for organizations; its prevalence has grown due to past successes achieved by threat actors. While each ransomware variant is different, we’ve seen some common tactics and trends used among the authors of the malware.

    Welcome my friends to the second instalment and follow-up to our Minify and Concatenate Your Scripts and Stylesheets (…
    Introduction Hi all and welcome to my first article on Experts Exchange. A while ago, someone asked me if i could do some tutorials on object oriented programming. I decided to do them on C#. Now you may ask me, why's that? Well, one of the re…
    To add imagery to an HTML email signature, you have two options available to you. You can either add a logo/image by embedding it directly into the signature or hosting it externally and linking to it. The vast majority of email clients display l…
    In this sixth video of the Xpdf series, we discuss and demonstrate the PDFtoPNG utility, which converts a multi-page PDF file to separate color, grayscale, or monochrome PNG files, creating one PNG file for each page in the PDF. It does this via a c…

    779 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    14 Experts available now in Live!

    Get 1:1 Help Now