Netbox ASP Web Server is a simple server Program , Functions and Windows IIS are almost some. If your machine cannot install or does not support IIS, you can install this program to debug the remote. asp file.
The program contains almost all the functions of IIS (the default is a VBScript language page file, which is not supported by <script language = "JavaScript" runat = "server"> ), but there are also features not available in IIS.
Using netbox, you can easily compile ASP applications into independent execution programs. It is free from the limitations of IIS and runs directly on almost all Windows versions, there is no need to consider the platform compatibility and ASP runtime environment requirements. The following describes how to quickly port an existing ASP application.
1. Create an ASP Runtime Environment
First, create an empty directory where you like it. Assume It is D: \ websvr. Create a file main. Box in the directory and edit the file as follows:
Dim httpd
Shell. Service. runservice "nbweb", "netbox web server", "netbox HTTP Server Sample"
'---------------------- Service event ---------------------
Sub onservicestart ()
Set httpd = Createobject ("netbox. httpserver ")
If httpd. Create ("", 80) = 0 then
Set host = httpd. addhost ("", "\ wwwroot ")
Host. enablescript = true
Host. adddefault "Default. asp"
Host. adddefault "default.htm"
Httpd. Start
Else
Shell. Quit 0
End if
End sub
Sub onservicestop ()
Httpd. Close
End sub
Sub onservicepause ()
Httpd. Stop
End sub
Sub onserviceresume ()
Httpd. Start
End sub
Ii. Copying ASP applications
Create another sub-Directory: wwwroot in the directory to copy all your files in IIS to wwwroot. At this time, your asp runtime environment should be ready.
Iii. Test Run
In order to run the newly created netbox application, you must make sure that your IIS or other programs that use port 80 have been stopped. It is likely that your IIS is using this port, so it is best to stop your IIS or change the port used by IIS to another port.
After IIS is stopped, you can execute your netbox application. Double-click the main. Box file. Soon, you will see the netbox icon in the lower right corner of the window. At this time, netbox is running properly. What you need to do is to use IE to accessHttp: // localhostTest whether your ASP application is running properly. Under normal circumstances, ASP is also completely normal.
Iv. Compilation
The compilation process is simple. Execute nbdw.exe.
Click Select folder, find the created Directory D: \ websvr, click browser, set the name of the execution file to be generated, and click build... to start compilation.
Finally, we get the successfully compiled execution file, which is our final goal.
Because this routine is a web server created as a service, you can use:
MyApp-install
Install the application as a service so that the system can automatically run the application without logon. To uninstall the service, run the following command:
MyApp-Remove