INFO: Troubleshooting Add Web Reference Issues (307303)



The information in this article applies to:

  • Microsoft Web Services (included with the .NET Framework) 1.0
  • Microsoft Web Services (included with the .NET Framework 1.1)
  • Microsoft .NET Framework Class Libraries 1.0
  • Microsoft .NET Framework Class Libraries 1.1

This article was previously published under Q307303

SUMMARY

This article describes how to troubleshoot some common problems that you may encounter when you use the Add Web Reference dialog box.

MORE INFORMATION

Situation 1

After you enter a URL in the Address text box at the top of the Add Web Reference dialog box, you may receive the following error message in the right pane:
"(none) No Web References were found on this page"
"Cannot find Web Services (local)".
If you receive this error message, use one of the following methods to resolve the problem:
  • If you are using Visual Studio .NET Beta 2, upgrade to the latest version of Visual Studio .NET.
  • Verify that the URL works from a browser. If your computer is a development computer, the URL may end with ".asmx?WSDL" or ".vsdisco". If the URL does not work from a browser, the issue may be with the Visual Studio .NET installation.
  • If the URL works from a browser, be sure that the proxy server settings contain valid data. Even if the Auto Configuration and Use Automatic Configuration script options for the Web browser are selected, you must enter the manual proxy settings. To locate these settings, follow these steps:

    1. In Internet Explorer, click Internet Options on the Tools menu.
    2. On the Connections tab, click LAN Settings.
    For more information, click Help in the Add Web Reference dialog box.
  • Use a temporary workaround to generate a proxy until you further troubleshoot your Visual Studio .NET installation. To do this, point to Programs on the Start menu, click Microsoft Visual Studio .NET, click Visual Studio .NET Tools, and then click Visual Studio .NET Command Prompt to open a command window. At the command prompt, type wsdl.exe http://host/WebService.asmx?WSDL. NOTE: Replace the sample URL with a valid URL for your application.

Situation 2

When you browse to local Web services (http://localhost/default.vsdisco), you may receive the following error message:
The document was not recognized as a known document type (WSDL, XML Schema, or Discovery document) for the following reason: - The content type 'application/octet-stream' is not valid for an XML document.

-or-

Web Services (none) No Web References were found on this page. Click for help on finding a Web Reference. Errors The proxy settings on this computer are not configured correctly for web discovery. Click for additional help on proxy settings.
.VSDisco (dynamic discovery) is a feature on Visual Studio .NET computers only, and is turned off by default. You can turn this feature on for each computer by using machine.config, or for each application by using web.config. To enable dynamic discovery, change the following line in the machine.config file
<!--<add verb="*" path="*.vsdisco" type="System.Web.Services.Discovery.DiscoveryRequestHandler, System.Web.Services, Version=1.0.3300.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" validate="false"/>-->
				
to the following:
<add verb="*" path="*.vsdisco" type="System.Web.Services.Discovery.DiscoveryRequestHandler, System.Web.Services, Version=1.0.3300.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" validate="false"/>
				

Situation 3

When you browse to local Web services (http://localhost/default.vsdisco), you may receive the following error message:
ACCESS Deny
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.
Source Error:
An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.
Stack Trace:
[COMException (0x80070005): ?????]
System.DirectoryServices.DirectoryEntry.Bind(Boolean throwIfFail) +514
System.DirectoryServices.DirectoryEntry.Bind() +10
System.DirectoryServices.DirectoryEntry.get_IsContainer() +10
System.DirectoryServices.ChildEnumerator..ctor(DirectoryEntry container) +24
System.DirectoryServices.DirectoryEntries.GetEnumerator() +26
System.Web.Services.Discovery.DynamicVirtualDiscoSearcher.GetWebServerForUrl(String url) +123
System.Web.Services.Discovery.DynamicVirtualDiscoSearcher..ctor(String startDir, String[] excludedUrls, String rootUrl) +117
System.Web.Services.Discovery.DiscoveryRequestHandler.ProcessRequest(HttpContext context) +592
System.Web.CallHandlerExecutionStep.Execute() +179
System.Web.HttpApplication.ExecuteStep(IExecutionStep step, BooleancompletedSynchronously)+87
To resolve this problem, add the developer who is trying to access the Vsdisco file to the VS Developer group in Windows. If this is unsuccessful, add Everyone to the same group.

REFERENCES

For more information, visit the following Microsoft Web sites:

The Proxy Settings on This Computer Are Not Configured Correctly for Web Discovery.
http://msdn.microsoft.com/library/en-us/vsintro7/html/VS_E_MUSTSPECIFYPROXYSERVER.asp


Modification Type:MajorLast Reviewed:8/13/2003
Keywords:kbinfo kbProd2Web KB307303