Microsoft KB Archive/307303

= INFO: Troubleshooting Add Web Reference Issues =

Article ID: 307303

Article Last Modified on 2/23/2007

-

APPLIES TO


 * Microsoft Web Services Enhancements for Microsoft .NET 2.0
 * Microsoft Web Services Enhancements for Microsoft .NET 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.



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:

&quot;(none) No Web References were found on this page&quot;

&quot;Cannot find Web Services (local)&quot;.

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 &quot;.asmx?WSDL&quot; or &quot;.vsdisco&quot;. 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:

 In Internet Explorer, click Internet Options on the Tools menu. 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.</li></ul>

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 to the following: <add verb=&quot;*&quot; path=&quot;*.vsdisco&quot; type=&quot;System.Web.Services.Discovery.DiscoveryRequestHandler, System.Web.Services, Version=1.0.3300.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a&quot; validate=&quot;false&quot;/>

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.

<div class="references_section">