Live Data Preview and Microsoft Personal Web Server
When UltraDev's Live Data Preview feature fails or reports an 404 HTTP Error, the cause may be improper configuration or operation of the Web server. In this TechNote, a few of the common Personal Web Server setup problems and solutions will be discussed.
Troubleshooting Microsoft Personal Web Server
The main strength of Personal Web Server (PWS) is that it provides a convenient and inexpensive development environment for Windows 9x machines, without the need for powerful hardware. A copy of your Web site can be copied to a local machine and revised on a workstation locally. This workflow protects the real "live" site from damage during development. Saving and viewing sites on a local drive has the advantage of allowing the developer to review progress without transferring files repeatedly. Once the development process has been completed, all the code must be transferred by FTP or HTTP to the remote server. However, this one-time transfer is less expensive in terms of time and resources than repeated transfers.
One of the main drawbacks of PWS is that it can be awkward to install and get up and running correctly. The main problems that users usually encounter are listed below. Hopefully this information will simplify the process.
Sources of PWS
The version of PWS to install is version 4.0, which was first released in NT4 Option Pack of December, 1997 as part of Internet Information Server 4.0. It is available from several sources:
Win 98
The Win98 CD contains a folder named Add-ons/PWS. Within that folder is a Setup.exe for PWS. We have noticed that users who have installed PWS from the Win98 CD onto a Win98 OS seem to have less problems than developers who obtain PWS from other sources.
Download
Microsoft offers PWS as a download, but with a strange nomenclature. When you go to the Microsoft IIS and PWS download page, you will see that there is the WinNT option pack for NT and a WinNT option pack for Win95. If you run the Windows NT Option Pack on a Windows9x machine, the option pack will recognize that this is not an NT OS and will install PWS instead of IIS. Even though the idea of running a Windows NT Option Pack on Windows9x seems counterintuitive, this method does work.
Testing your Web Server
When troubleshooting PWS or any Web server, one of the first things to verify is whether the server is correctly serving pages. In order to test the Web server, launch a browser and attempt to view the Web pages that have been placed on the server. Type a universal resource locator (URL) into the browser's Address (or Location) field, as though browsing on the Internet. The URL is an http://... Web-page address which references which Web server to connect to and the page to be viewed.
What URL should be used in order to browse to the Web server? If your Web server and Web browser are connected by a local area network, or if you are using a single machine for both Web server and browser, then simply specify the name of the Web server machine in the URL. By default, PWS will take the name of your Web server from the name of the computer. You can find this information in the machine's network settings. On your Web server machine, select Start > Settings > Network and Dial-up Connections. From the Advanced menu, select Network Identification. The Network Identification tab will display your machine name under the description "Full Computer Name".
If the machine uses the name "MyMachine", you can use the URL http://MyMachine/ to browse to pages on that computer. There are a couple of alternatives if you are using the same machine for both Web server and browser. Try http://127.0.0.1/... - In this example, 127.0.0.1 is the loopback address that causes requests to be sent to a Web server on the local machine. Or try http://localhost/... - 'localhost' is an alias for the 127.0.0.1 address - you may need to check the LAN settings (in the browser's options) to ensure that local browsing is not sent through a proxy server.
Typical Problems of PWS on Win9x
There are a handful of common PWS problems which can prevent proper operation of UltraDev's Live Data Preview feature.
Are you testing correctly?
When experiencing problems while testing a Web server, check for the following common errors:
| |
Verify that the file name does not end in .asp. Also, make sure that the test page is not misspelled in the browser address (location) field. |
| |
Make sure the correct path for the page was entered. |
| |
Double check that the VBScript is not missing the delimiters <%...%> or<SCRIPT> tags. |
| |
If the VBScript has errors in syntax, make corrections. |
| |
Check that PWS is running by either looking for its symbol in the system tray or by choosing Start > Programs > Microsoft Personal Web Server> Personal Web Manager. Check the interface to see if the "Stop" button is displayed. |
| |
In some cases, when creating a page after PWS has been running, it is necessary to stop and restart PWS. |
Opening an ASP page launches UltraDev, Visual InterDev or some other application other than the browser
When trying to load a local (127.0.0.1) ASP page, Windows launches UltraDev, Visual InterDev, or some other application besides the browser. Regular HTML pages view correctly in the browser. In other situations, the browser will load the ASP page, but simultaneously launches another separate application. This usually does not happen when viewing ASP pages that are located on a non-local host.
This happens because a support file launches a separate application to open files with an Asp extension. It can be resolved by changing the association for files with an Asp extension, so that they are associated with the browser. You can change the association through Windows Explorer. Select View > Options > Win95-FileTypes-or- Win98-FileOptions. Select ActiveServerDocument > Edit > Actions-Edit and set this to the same as the file type of"Internet Document Set".
If there is no Active Server Document file type listed, locate the file type that is currently assigned to Asp and change it, so that it is associated with your browser.
To edit the association of ASP documents, follow the steps below:
| |
In the View menu, select Options. Choose the File Types tab. Select the button labeled "New Type". |
| |
Set the Description=test and Associated Extension=.ASP. Click "OK" to save the settings. |
| |
Windows will present a message stating that Asp is already assigned to another application. Write down that application's file type (xxx). Click"OK" to exit the error message. |
| |
Click Cancel to exit the Add New File Type dialog box. |
| |
Find and select the xxx file type in the list of types. |
| |
Click "Edit" and change as follows:
Description of Type = Active Server Document
Content Type = text/asp
Default Extension for Current Type = Asp |
| |
Under Actions = Edit: Enter the location of the browser. For example: "C:\progra~1\Apps~1\iexplore.exe" |
This content requires Flash
To view this content, JavaScript must be enabled, and you need the latest version of the Adobe Flash Player.
Download the free Flash Player now!
