Detailed steps for vs2012 / vs2013 local publishing website


Detailed steps for vs publishing website   To publish a website locally (on your own computer), you must first build an IIS server (for specific construction methods, please refer to myLast blog)。 Here are the specific steps:

1. Open your vs2012 website project and right-click the Project menu to regenerate the website project; Right click again to publish

2. Pop up the website publishing settings panel, click < New.. > to create a new publishing profile (the profile can be written and named by yourself):

3. Click Next: select “file system” in the publishing method, so that we can publish to the local file specified by ourselves.

4. Select the physical address of the website to be published (drive C or other drives), such as C: \ users \ younggod and \ documents \ website. Click next.

5. In configuration, select “release” — release mode   It is called release version. It is often optimized to make the program optimal in code size and running speed, so that users can use it well   Usually called debug version, it contains debugging information and does not make any optimization, which is convenient for programmers to debug programs

6. Click next to enter the preview interface before publishing

7. Click publish to publish to the folder you specified. Here, I publish to the website folder under drive C.

After publishing successfully, click the folder, and the. CS files of all pages disappear,   Where have they all gone? Is it in the bin folder? Let’s guess.

Released screenshot:

8. In this way, the physical address of the website has been configured. Next, configure the IP address of the website.

Start through control panel administrative tools  ‘ ‘Internet information services (IIS) manager’   Enter IIS interface.

Right click sites to add a site

In the following figure, enter the custom website name in the red box on the left (please try to use English, here I will write test),

Application pool: defaapppool.

Physical path: C: \ users \ younggod, and \ documents \ website (where the website is published above).

IP address: the address of your local computer in the LAN.

Port: give a number greater than 1024. 80 is the browser and the default fracture number. 0-1023 is a recognized port number, that is, it has been recognized or reserved for the software to be recognized.

Click OK.

9. Last step: register IIS server. Command: aspnet_ regiis  – I (please copy), click visual in the program menu vs2012 first   Studio   Tools vs2012 developer command prompt. Right click   Vs2012 developer command prompt. Run as administrator. (if you are not running as an administrator, you will be prompted with the “insufficient permission” error)

After running, right-click paste   aspnet_ regiis  – i   Press enter.

Finally, find your home page and right-click to browse. Ie sometimes does not respond (the address bar appears blank), and it will be successful only after multiple browsing.

The above is the whole content of this article. The next part is forProblems encountered in publishing the websiteI hope it will be helpful to your study and I hope you can support developpaer.