N342  FAQ

Modified

Using IUS Web or W: Drive from Home or Wireless Connection

Currently, the following Windows setup gives to access your IUS Web site from home or wireless connection. The process is basically the same for XP or Vista. At IUS the Web site is the W: drive.

  1. Create a Virtual Private Network (VPN) connection from your computer to IUS.
    1. Open Network Connections (XP) or Control Panel | Network and Sharing Center (Vista).
    2. Click create New Network Connection
    3. Select Connect to Workplace
    4. Use Internet address of: vpn.ius.edu
    5. Enter your IU username and password.

     

  2. Map IUS Web site to your computer's W: drive.
    1. Open any folder.
    2. Open Tools.
    3. Select Map Network Drive.

      Drive:    W
      Folder:   \\se-cser-nas1\homepages\ads\username

      where username is your IU username.

 

 

Access denied - Blocked

The following error may occur when accessing XML files downloaded from one computer to another such as the ZIP files for the assignment. Vista (and perhaps XP) blocks access to files, presumably attempting to protect you from using files you have copied to your computer.

Unblock access to individual files by the following:

  1. Open in Windows Explorer the directory containing the file, either the XML file or one referenced by the XML.
  2. Right click on the file and open Properties.
  3. Click Unblock.

The XML page cannot be displayed

Cannot view XML input using XSL style sheet. Please correct the error and then click the Refresh button, or try again later.


Access is denied. Error processing resource 'file:///W:/N341/Project/TraderSummaryContent.htm'.

 

Unblock access to all files in a directory by the following:

  1. Download Streams, copy Streams.exe to Windows directory if possible.
  2. To unblock all the files in directory c:\temp and any subdirectories enter:

    Streams –d –s c:\temp

 

IIS

Host contacted, waiting for reply - Sometimes the IIS appears to hang, particularly after running ASP scripts or CGI programs. Stopping the transfer on the client will stop the client from waiting but the server may not repond to new requests. According to Microsoft documentation, the server cache fills and it takes a while (sometimes forever) to reclaim cache memory and continue. There are three solutions 1) let the browser wait for a while, perhaps 2 to 20 minutes, 2) reboot, always reliable, or 3) using the Global.Asa file, set the Server.ScriptTimeout = 10;  and Session.Timeout = 1. We should be thankful the usual 'reinstall the operating system' solution isn't required.
<Script LANGUAGE = VBScript RUNAT = Server>
 Sub Session_OnStart
  Server.ScriptTimeout = 10      ' Stop server processing after 10 seconds
  Session.Timeout = 1               ' End session after 1 minute
 End Sub
</Script>
will limit the time the server spends trying to process a script. This can also be set inside of an ASP, the Server.ScriptTimeout  is in seconds and is the maximum time the server will spend processing a script; Session.Timeout is in minutes and is the maximum time the server maintains session information. Its hard to tell if this really prevents the server from hanging, it seems to help and it is needed for timing out client sessions anyway.

Testing CGI's - The server seems especially sensitive to CGIs that run amuck. It is generally possible to test Perl and C++ CGI behavior outside the server by defining environment variables. For Windows OS, the necessary environment variables, such as REQUEST_METHOD can be defined at the DOS prompt by:

set CONTENT_LENGTH = "15"
then in Perl accessed for testing by the same means used when run as a CGI by the server:
$size_of_form = $ENV{'CONTENT_LENGTH'};
Virtual directories - The default location for server scripts/pages is c:\InetPub\wwwroot. To use other directories one must define a virtual directory. Right click on the file folder to make virtual and select Web Sharing. You should put the Global.Asa file in the root of the virtual drive to have it processed for ASP scripts.
 

Global.Asa - An apparent problem requires that the server machine be rebooted for changes to the file to take effect.
.
Perl - Perl can be used as CGI programming language with PWS. Assuming that ActivePerl has been installed on directory c:\Perl then define the directory c:\Perl\bin as a virtual drive named Perl. The Perl interpreter can then be executed with the program path as an argument. Perl program named test.pl located on directory D:\N342 can then be executed by:

localhost/Perl/perl.exe?D:/N342/test.pl
C++ - C++ or any other executeable file can be a CGI program. Assuming that a directory D:\CGI has been defined as a virtual drive named CGI. Any exe file placed in the directory can then be executed. A program named test.exe located on directory D:\CGI can then be executed by:
localhost/CGI/test.exe
Why does the browser try to save the CGI file instead of executing? - The most common problem is due to sending invalid HTTP headers. The header must have:

Content-type: text/html

before any HTML. Sending a cookie must be done before the Content-type.