Four methods and precautions for publishing Asp.Net website to IIS

  

Four methods and precautions for publishing Asp.Net website to IIS:

Regardless of the publishing method, first One thing is to enable IIS to support asp.net programs. By default, IIS is not supported by the asp.net website program. In IIS's "Web Service Extension", make sure "ASP.NET v2.0.50727" ; is enabled. Others can remain disabled.

Publish Method 1: --- Copy directly to the IIS directory release directory (C:\\Inetpub\\wwwroot)

a. Copy the VS debugged and running ASP.NET website project folder to the IIS wwwroot folder.

b. Check the project folder's "property"--->"security" ;, check the Internet guest account, make sure it has "read" permissions. (By default, the folder copied to wwwroot will inherit the wwwroot"read" permission, but when the IIS home directory location has been modified When you need to manually specify "read"permissions"

c. After refreshing the website in IIS Manager, you will see just The folder. In IIS, right-click the folder --->"Properties"--->"Directory" tab, make sure "read","record access" ; and "Index Resources" 3 items selected.

Then click "Directory Security" tab, click "Authorization and Access Control" below "Edit", Make sure " Allow anonymous access to "and"integrated windows authentication" checkbox, and avoid changing the username and password of the anonymous account.

If you want non-index, default, iistart, etc. Home, you also need to click the "Enable Default Content Document" in the "Documents" tab, and add the file name you wish to make the homepage.

d. Back to the folder " ; "Directory" tab in the attribute", click "Create". (Please check the "script resource access" and execute permission"pure script" in the script. Br>


Publishing Method 2:---Using the release function of the IDE of Vs2008, Cloth operation.

a. In the VS debugged and running ASP.NET website project, right click on the website project, select "publish website" and click "target path" after the browser The button (for that... button) will pop up a "Publishing Website" dialog box.

b. In the pop-up dialog box, first click on the left side of "Local IIS", then On the right side of the "Explorer" above, click "Create new web application" (you can also click "Create virtual directory"), enter the name of the application, and then you can go all the way ok


Publishing Method 3: --- Use a virtual directory to publish a website.

a. In IIS Admin, click on the default website (or your website), select "right "--->"New"--->"Virtual Directory", then enter the alias in the pop-up dialog box, and then select the path where the website project is located.

Suggestions Copy the website project to wwwroot and create a virtual path. Once you can back up, you don't need to modify the permissions. For example, in other directories, you need to Set the file system permissions of the website project folder (such as a in the publishing method 1)

b. After selecting the play path, in addition to "read", you also need to check "Run script". Then click OK.

Publish Method 4:---Use the "web share" in the folder share to publish the operation.

a. On the website project folder Click "Right", select "Share & Security", in the pop-up dialog box, select "web sharing" tab. Select "Share this folder" and then pop up "edit After the alias " dialog box, modify the alias, you can confirm it. (You can check the script option as needed)

Suggestion: After copying the website project to a directory, execute "web sharing" I don't know why, it can't be executed under some folders, such as the desktop folder.

Common check steps after IIS problems:

1. Check "Web service In the extension ", whether the support for "ASP.NET v2.0.50727" is enabled.

2. Open the folder where the website is located (eg wwwroot), in &quo t; attribute "--->"security", check if there is an Internet guest account, if not, please add and specify at least one "read-only" permission.

3 In the IIS Manager, select "Default Web Site" and click "Properties", in the "Home Directory", check if "Read", "Record Access" and " In the index resource ". and "Directory Security", click "Authorization and Access Control" below "Edit" and then check and uncheck "Anonymous Access" and "Integrated Windows Authentication" ;.

Check if the "ISAPI filter" tab is empty. If you set the page with a name other than index, default, etc. as the home page, check if the "document" tab" Enable the default content document " add the file name you want to make the home page.

4. Check the "default website" application below, right click on the application corresponding to your website, select "properties" ;, check the "directory", " Security " and " document ". Three options

Copyright © Windows knowledge All Rights Reserved