Using netbox, you can easily compile ASP applications into standalone execution.ProgramTo get rid of the limitations of IIS and run directly on almost all Windows versions without considering 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. Copy netbox.exe to this directory and create a file main. Box in the directory. edit the file content 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
The aboveCodeFrom "create a web server". The bold part is the default file name. If your application is different, you can add and modify the file.
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 netbox 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 netbox.exe file. Soon, you will see the netbox icon in the lower right corner of the window. At this time, netbox is running properly. You need to use IE to access http: // localhost and test 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. At this time, you must ensure that netbox.exe of the same version is in the same directory.
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.
Success ......
Finally, we get the successfully compiled execution file, which is our final goal.
Note: netbox Latest Version: http://wwww.netbox.cn/download/netbox.zip