Server Side Scripting with Windows 7


It is assumed that the CServer computer has had the Windows 7 Professional Operating System installed on the computer.

When the IIS system is set up it asks for 50 Mbytes of RAM so you had better have a respectable size machine to run as the Server (however, you also get mail (smtp) and ftp servers in the package.)

IIS puts the World Wide Web files (.htm files, .asp files, images, executables [.exe files], and data files) in the directory c:\inetpub\wwwroot.

If drive C: is NTFS, then Read and Execute permissions must be set for this directory and the contained files for the World (i.e., "everyone").

The computer has been given the name "CServer". This is accomplished by entering: Start>Settings>Control Panel>System> Network Identification>Properties and entering "CServer" into the box "Computer Name".

At system boot-up time the operating system should recognize that an ethernet network interface card is installed in the computer. When one is found, a network connection is constructed and properly initialized. One must making sure that the driver for the network interface card has been properly installed. This is done easily by entering Start>Run>compmgmt.msc. By clicking on "Device Manager" we get a screen similar to the following:

compmgmt.msc

We must make sure that there are no yellow exclamation points visable on this screen. The presence of one of these would indicate an improperly installed device driver. This must be corrected before we may proceed, by uninstalling the driver and re-booting the operating system. Now, we enter Start>Settings>Network & Dial Up Connections. We must now click on the connection which is know to be employed for the ethernet communication. Then, we click "Properties". This produces a screen:

property.gif

When we click on the TCP/IP Protocol, we get:

tcpip.gif

Enter data into these screens to match what has been given, above.

Before anything is accessed, you must have already set up the drive for sharing over a network. This is easily done by the route: MyComputer>Tools>MapNetworkDrive. You must choose a name for the file share. "drive-c" was chosen for the C: drive. Doing these things are important for reasons that will be dealt with below. Let us say that we have a program, test.exe, written in Fortran or C, that has been build utilizing only to libc.lib (plus others if you know what you are doing) You want an ordinary html file on the client to cause the execution of test.exe on the server.

The "magic" code to do this is as follows:

either:
'form METHOD="POST" action="http://CServer/test.exe">
or:
'form METHOD="POST" action="test.exe">
'center>
'em> Input text to test.exe :
'/em>
'input TYPE="TEXT" NAME="pgmText" SIZE="35">
'input TYPE="SUBMIT" VALUE="Click here to execute test.exe on the Server">
'/center>
'/form>

A thing to note is that using POST offers pgmText to standard input (stdin) and can be read nicely. Using GET instead of POST will cause pgmText to be offered as command line arguments to test.exe.

With regard to Server Side Scripting, Fortran and C programs can not be beaten as far as efficiency is concerned. Who needs anything else? Nevertheless, ASP (and perhaps JSP [as described elsewhere] are available, also.

Any person who is asked to do Server Side programming will always have Administror privileges.

If you use these capiabilities to their limit, you may receive the message below:

Download everything.