Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 60723
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 10, 20262026-05-10T18:12:24+00:00 2026-05-10T18:12:24+00:00

I have a .NET web-service client that has been autogenerated from a wsdl-file using

  • 0

I have a .NET web-service client that has been autogenerated from a wsdl-file using the wsdl.exe tool.

When I first instantiate the generated class, it begins to request a bunch of documents from w3.org and others. The first one being http://www.w3.org/2001/XMLSchema.dtd

Besides not wanting to cause unnecessary traffic to w3.org, I need to be able to run the application without a connection to the Internet (the web-service is a ‘Intra-web-service’).

Anyone know the solution?

If it helps, here is the stacktrace I get when I do not have Internet:

'An error has occurred while opening external DTD 'http://www.w3.org/2001/XMLSchema.dtd': The remote name could not be resolved: 'www.w3.org''     at System.Net.HttpWebRequest.GetResponse()    at System.Xml.XmlDownloadManager.GetNonFileStream(Uri uri, ICredentials credentials)    at System.Xml.XmlDownloadManager.GetStream(Uri uri, ICredentials credentials)    at System.Xml.XmlUrlResolver.GetEntity(Uri absoluteUri, String role, Type ofObjectToReturn)    at System.Xml.XmlTextReaderImpl.OpenStream(Uri uri)    at System.Xml.XmlTextReaderImpl.DtdParserProxy_PushExternalSubset(String systemId, String publicId)     at System.Xml.XmlTextReaderImpl.Throw(Exception e)    at System.Xml.XmlTextReaderImpl.DtdParserProxy_PushExternalSubset(String systemId, String publicId)    at System.Xml.XmlTextReaderImpl.DtdParserProxy.System.Xml.IDtdParserAdapter.PushExternalSubset(String systemId, String publicId)    at System.Xml.DtdParser.ParseExternalSubset()    at System.Xml.DtdParser.ParseInDocumentDtd(Boolean saveInternalSubset)    at System.Xml.DtdParser.Parse(Boolean saveInternalSubset)    at System.Xml.XmlTextReaderImpl.DtdParserProxy.Parse(Boolean saveInternalSubset)    at System.Xml.XmlTextReaderImpl.ParseDoctypeDecl()    at System.Xml.XmlTextReaderImpl.ParseDocumentContent()    at System.Xml.XmlTextReaderImpl.Read()    at System.Xml.Schema.Parser.StartParsing(XmlReader reader, String targetNamespace)    at System.Xml.Schema.Parser.Parse(XmlReader reader, String targetNamespace)    at System.Xml.Schema.XmlSchemaSet.ParseSchema(String targetNamespace, XmlReader reader)    at System.Xml.Schema.XmlSchemaSet.Add(String targetNamespace, XmlReader schemaDocument)    at [...]WebServiceClientType..cctor() in [...] 
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. 2026-05-10T18:12:24+00:00Added an answer on May 10, 2026 at 6:12 pm

    I needed the XmlResolver, so tamberg’s solution did not quite work. I solved it by implementing my own XmlResolver that read the necessary schemas from embedded resources instead of downloading them.

    The problem did not have anything to do with the autogenerated code, by the way.

    The web-service-client had another implementation file that contained something like this:

    public partial class [...]WebServiceClientType   {     private static readonly XmlSchemaSet _schema;      static KeyImportFileType()     {       _schema = new XmlSchemaSet();       _schema.Add(null, XmlResourceResolver.GetXmlReader('http://www.w3.org/TR/2002/REC-xmldsig-core-20020212/xmldsig-core-schema.xsd'));       _schema.Add(null, XmlResourceResolver.GetXmlReader('http://www.w3.org/TR/2002/REC-xmlenc-core-20021210/xenc-schema.xsd'));       _schema.Compile();     } 

    and it was this class-constructor that failed.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

No related questions found

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.