My Technical Notes

Sunday, 28 February 2010

Setting up an ASP .NET Web Application Project Under IIS for the First Time

Once you have created your website, you will want to deploy it. To deploy it as a web application under IIS (Internet Information Services) do the following:

1. First install IIS if you already haven't done so. Go to Start -> Settings -> Control Panel -> Add or Remove Programs -> Add/Remove Windows Components and then check Internet Information Services and click Next to install.

2. Secondly, if you already haven't done so, open a command prompt (to do this go to Start -> Run and then type "cmd" and press enter. Now type "aspnet_regiis.exe -i". This will register the ASP .NET runtime as the executable for ASP .NET applications.

3. Now go into IIS (Start -> Control Panel -> Adminitrative Tools -> Internet Information Services) and then in the left column expand the items (press the + button) until you see "Default Web Site". Right click this and then select "new -> Virtual Directory". Type in a meaningful website name here when it prompts for the alias. When prompted for the directory, browse to folder containing the web application project. This folder should contain the project file, the web.config and the bin directory. For the access permissions make sure that the first three items are checked (Read, Run and Execute).

4. Now right click the folder containing the web application project in Windows explorer and select properties. Go to the Security Tab. You will need to add the ASPNET account to this list as well as an account named IUSR_MACHINE where MACHINE is the name of your machine. If you dod not know your computer name, right click on the My Computer Icon on your desktop and then select properties. Go to the "Computer Name" tab. For both ASPNET and IUSR_MACHINE set the permissions to allow "Read, "Read & Execute" and "List Folder Contents".

No comments: