Compile an ASP application to become an EXE file

Source: Internet
Author: User

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

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.