Click here to Skip to main content
15,566,160 members
Articles / Web Development / IIS
Article
Posted 8 Nov 2011

Tagged as

Stats

223.2K views
37 bookmarked

How To Deploy a Web App in IIS

Rate me:
Please Sign up or sign in to vote.
4.90/5 (14 votes)
8 Nov 2011CPOL2 min read
How To Deploy a Web App in IIS

Introduction

Listed below are the steps to deploy a web app in IIS.

  1. Click start. Click Run.
  2. Type inetmgr in the Run dialog Box.

    Image 1

  3. Expand the localComputer. Right Click on the Sites. Click Add New Site as shown below:

    Image 2

  4. Type the name of the web site. In my case, it is "MyWebSite". Type the location of the web application or site. Give a port number (You have to manually add this port number to inbound rules of Windows Firewall later). And then press OK.

    If a connection with that port number already exists, then give another port number.

    Image 3

  5. Right click on the site name ("MyWebSite" in my case), click on "Manage Web Site" and "Browse".

    Image 4

  6. In the sub directories of the web site, if any web.config files are present, remove the tags with names authorization, roleprovider, profile, members. As this may cause the error as shown below:

    Image 5

  7. Change the Framework of the application pool to v4.0:

    Image 6

  8. ******************************************

    Change the "CodeBehind" in the aspx file to "CodeFile".

    Change the URLs to the appropriate directory. (Since ~ means root directory, it has a different meaning when executed in Visual Studio when compared to IIS.)

  9. All the above steps make the site work from the same computer in which IIS is installed. If you go to another computer and type the IP address of the system (in which IIS is installed), then you may not be able to access the website. For this, you have to configure the port in the Windows Firewall.
  10. Open the Windows Firewall from control panel as "Control Panel\All Control Panel Items\Windows Firewall". Click "Advanced Settings".

    Image 7

    Right click on InBound Rules as shown below. And fill the details as necessary.

    Image 8

That's it! You can access the web site (hosted with IIS) from within the LAN by just typing the IP address of the system on which IIS is installed as:

http://IPAddress:Portnumber e.g.:- http://192.168.1.1:90 

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)


Written By
Software Developer GGK Technologies
India India
This member has not yet provided a Biography. Assume it's interesting and varied, and probably something to do with programming.

Comments and Discussions

 
QuestionError - the page can not be display Pin
Member 136085605-Jan-18 4:07
Member 136085605-Jan-18 4:07 
Questioni am not understood step 6 how to remove web.config Pin
Siddaram K.Patil24-Jan-16 19:22
Siddaram K.Patil24-Jan-16 19:22 
QuestionThis article helps me.. Thank you. Pin
Member 1184149316-Jul-15 1:05
Member 1184149316-Jul-15 1:05 
QuestionWHERE Pin
alan937-Apr-15 15:23
alan937-Apr-15 15:23 
GeneralMy vote of 3 Pin
syedkhaleel5-Feb-15 18:58
syedkhaleel5-Feb-15 18:58 
QuestionPls sir sort out this problem in mine case while deploying website on IIS. Pin
Mr. Sandeep Sharma21-May-14 2:51
Mr. Sandeep Sharma21-May-14 2:51 
GeneralMy vote of 3 Pin
Dmitriy Dokshin5-May-14 10:09
Dmitriy Dokshin5-May-14 10:09 
GeneralMy vote of 5 Pin
KaviSuja4-Sep-13 20:47
professionalKaviSuja4-Sep-13 20:47 
GeneralMy vote of 4 Pin
Member 916699029-Jun-13 17:25
Member 916699029-Jun-13 17:25 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.