In order to run an .aspx page in our local system, we need ASP.NET
Development Server of Visual Studio. Here we will see how to host an
asp.net application on Internet Information Services (IIS).
Following are the steps to follow:
Step 1: Open run window by Pressing windows + R button and type inetmgr.
![]() |
Fig: Run Window |
Step 2: Internet Information Services (IIS)
Manager Page will open and right click on Sites and add new web site.
![]() |
Fig: Internet Information Services (IIS) Manager |
Step 3: Fill
the Site Name, the physical path directory where the webpages (.aspx) are
located and change the port number from 80 to any other unused port
number as its the system default port number and press OK.
![]() |
Fig: Add Website Name and Physical Path |
Optional Step:
If you want to change the physical path later on, then it can be changed by
clicking the advanced settings option in the right hand side on the Action
Tab or by right clicking the website and select the Manage website ->Advanced
Settings.
![]() |
Fig: Advanced settings |
Step 4: Now
your website is ready to be browsed, you can right click on your website and go
to Manage Web Site -> Browse. You will see the default page
without visual studio server.
![]() |
Fig: Browse website |
Note: Website may not work if you have
developed it in Visual Studio 2010 as your web.config file may have some tags
that is not identified by the IIS. This is because creating the website the way
we created just now will host your website in its own application pool that
will have .NET Framework version 2 as target version. So we need to
change to the .NET Framework 4.0 version.
In IIS Manager Click on the Application
pools in the Connections Tab in left hand side and search for your website
and right click on it and click on Basic settings.
![]() |
Fig: Application pools |
On Edit Applications Pool Select .NET
Framework v4.xxx from the .NET Framework version drop-down list and click OK.
![]() |
Fig: Edit Application Pool |
Refresh your website and follow step 4
to view it in your browser. And Happy Browsing.
No comments:
Post a Comment