PRB: Visual InterDev Cannot Connect to PWS or Share (167661)
The information in this article applies to:
- Microsoft Visual InterDev 1.0
- Microsoft Visual InterDev 6.0
- Microsoft Personal Web Server 4.0 for Windows 95
- Microsoft Peer Web Server 4.0 for Windows NT 4.0
This article was previously published under Q167661 SYMPTOMS
When using Personal Web Server (for Windows 95) or Peer Web Services (for
Windows NT 4.0 Workstation) on a computer that does not have an active
network connection, Visual InterDev may be unable to access documents
shared using HTTP or FTP.
NOTE: When referring to both Personal Web Server and Peer Web Services
throughout this article, the term "Web Server" will be used; if a
distinction is needed, then their respective names will be used.
Typical scenarios when using Visual InterDev are as follows:
- When attempting to create a web project, Visual InterDev is unable to locate the server and returns the error message:
Unable to connect to the server (HTTP Error 500)
- When attempting to use the Sample Application Wizard to create a sample project, Visual InterDev prompts the user (step 4 of 5) for a valid UNC path ("\\yourmachinename\sharename") for a shared directory in which to
copy the database file. Visual InterDev is unable to locate the shared
directory and returns the error message:
\\machinename\sharename does not exist or is read only, please enter
a new \\server\share
CAUSE
As noted in the documentation for both Personal Web Server (Windows 95) and
Peer Web Services for Windows NT 4.0 Workstation, the Web Server needs to
have an active connection to the Internet to enable Domain Name Resolution.
If the computer does not have an active connection to the Internet, it must
be connected to an Internet Service Provider (ISP) by using Dial-Up
Networking.
When Visual InterDev tries to connect to the Web Server using the local
computer name, the TCP/IP stack is initialized and attempts to find the
computer name. However, it is unable to find the computer name because
there is no DNS or WINS service to resolve the Host name to an IP address.
Host names are used in virtually all TCP/IP environments and always
correspond to an IP address that is stored in a HOSTS file or on a DNS or a
WINS server.
RESOLUTIONNOTE: The following workarounds will not work in all cases due to the
complexity and possible variations in Network configurations for any given
machine. Therefore, consult the appropriate documentation for your
operating system or your Network Administrator or contact Windows 95
Networking customer support.
Possible workarounds are listed below.
Workaround 1
Because the Web Server requires an active network connection, one solution
is to connect to an Internet Service Provider (ISP) before attempting to
view documents shared on the Web Server. This resolves the problem because
the ISP provides the Domain Name Resolution service that the Web Server
requires.
Workaround 2
If Microsoft Internet Explorer version 3.01 or later is being used, connect
to http://localhost. This initializes the TCP/IP stack and connects the
browser to the home page on the local computer. The browser will then be
able to access documents shared on the Web Server using the computer name
instead of "localhost." If Internet Explorer is closed, the above steps
must be repeated to access documents shared on the Web Server.
Workaround 3
Use the HOSTS file to resolve the local machine name to the default IP
Loopback address (127.0.0.1). The HOSTS file is used as a local Domain Name
System (DNS) equivalent to resolve host names to IP addresses. The
"Hosts.sam" file, located in the Windows directory (or the
WinNT\System32\Drivers\Etc directory for Windows NT Workstation and NT
Server), shows an example of the entries that need to be made and can be
used as a template. To edit the "Hosts.sam" file, open it in Notepad and
replace word "Localhost" with the local machine's name. Because entries are
case-sensitive, it is a good idea to assign multiple host names with
different cases using the same IP address. Assuming the local machine's
name is "Nikichan," an example of the edited "Hosts.sam" file is listed
below.
After editing the HOSTS file, save it as "Hosts.txt" (by default, Notepad
appends the .txt extension to all files that it saves, including file names
without an extension), and then rename it to "Hosts" without the .txt file
extension using the Windows Explorer. (To confirm that it is an extension-
less file, go into click Options from the View menu, select the "Show all
files" option, and deselect "Hide file extensions for known file types.")
Reboot the machine so changes will take effect and load the HOSTS file into
memory. Visual InterDev should now be able to access documents on Personal
Web Server and documents in shared directories.
======================= Example Hosts.sam =====================
# Copyright (c) 1994 Microsoft Corp.
#
# This is a sample HOSTS file used by Microsoft TCP/IP for Chicago
#
# This file contains the mappings of IP addresses to host names. Each
# entry should be kept on an individual line. The IP address should
# be placed in the first column followed by the corresponding host name.
# The IP address and the host name should be separated by at least one
# space.
#
# Additionally, comments (such as these) may be inserted on individual
# lines or following the machine name denoted by a '#' symbol.
#
# For example:
#
# 102.54.94.97 rhino.acme.com # source server
# 38.25.63.10 x.acme.com # x client host
127.0.0.1 Nikichan
127.0.0.1 nikichan
================================================================
STATUS
This behavior is by design.
REFERENCES
For more information, please see the following articles in the Microsoft
Knowledge Base:
105997 Differences Between the HOSTS and LMHOSTS Files in Windows NT
150575 How to Set Up a TCP/IP Peer-to-Peer Network Connection
158366 Web Services May Be Stopped When Web Server is Running
158260 Cannot Access Personal Web Server Documents
For the latest Knowledge Base articles and other support information on
Visual InterDev and Active Server Pages, see the following page on the
Microsoft Technical Support site:
Modification Type: | Minor | Last Reviewed: | 6/16/2006 |
---|
Keywords: | kbide kbprb kbWebServer KB167661 |
---|
|