To add .net website into IIS on local machine follow all the steps with diagram( images) given in this tutorial. Before that IIS must be installed on your local system. Follow this tutorial to Install IIS on Windows 7.
In this tutorial I have explained all the setting to run the site successfully from IIS on local computer.
Let's move to the procedure of deploying website.
Steps to Deploy .Net Website in IIS on Localhost with Diagram:
Step 1: Run IIS by typing the command in inetmgr in windows command prompt as shown in the picture below:
Step 2: In IIS right click on Sites Node and then Select Add Web Site as shown in the diagram below:
Step 3: Inside Add Website Window type the name of website under Site name and in Physical path select the location of the website on the local system as shown in the picture below:
Step 4: Select the site to be added in this project I have created website with the name Demo in .net and stored it on F drive of my computer. I am browsing that website for deployment . You can select your site to be added in IIS as shown in the diagram below:
Step 5: Under Binding change the port Number from 80 as it is the default port and assigned to Default website in IIS . I have set the port number to 8085. You can set it according to your choice as shown in the picture below and then click on ok button:
Step 6: Next select the Application Pools in the left side in IIS then Right click on the Name of website added in the previous step and then select Advanced Settings as shown in the picture below:
Step 7: In the Advanced Settings select the .Net Framework Version 4.0 and then click on ok button as shown in the picture below:
Step 8:Select the website and then double Click on Directory Browsing and Enable it as shown below:
Step 9: Now the whole procedure of adding website is done now to check the site in browser Right click on the website you added in IIS then go to Manage Web Site and then click on Browse as shown in the diagram: In this tutorial I have explained all the setting to run the site successfully from IIS on local computer.
Let's move to the procedure of deploying website.
Steps to Deploy .Net Website in IIS on Localhost with Diagram:
Step 1: Run IIS by typing the command in inetmgr in windows command prompt as shown in the picture below:
Step 2: In IIS right click on Sites Node and then Select Add Web Site as shown in the diagram below:
Step 3: Inside Add Website Window type the name of website under Site name and in Physical path select the location of the website on the local system as shown in the picture below:
Step 4: Select the site to be added in this project I have created website with the name Demo in .net and stored it on F drive of my computer. I am browsing that website for deployment . You can select your site to be added in IIS as shown in the diagram below:
Step 5: Under Binding change the port Number from 80 as it is the default port and assigned to Default website in IIS . I have set the port number to 8085. You can set it according to your choice as shown in the picture below and then click on ok button:
Step 6: Next select the Application Pools in the left side in IIS then Right click on the Name of website added in the previous step and then select Advanced Settings as shown in the picture below:
Step 7: In the Advanced Settings select the .Net Framework Version 4.0 and then click on ok button as shown in the picture below:
Step 8:Select the website and then double Click on Directory Browsing and Enable it as shown below: