Introduction
In this tip, you can learn how to add website in IIS (Internet Information Services) 8.0 and host it on the network.
Background
Before giving a description about this tip, you need to install some software on your PC:
- Visual Studio 10 or higher
- .NET Framework 4.0
- IIS 8.0 : link for download (http://www.microsoft.com/en-in/download/details.aspx?id=34679 )
Using the Code
- Install IIS 8.0
- Start->Run->appwiz.cpl
Turn Windows Features on or off -> Check on Internet Information Service (IIS) -> Check on Appropriate Options
Must check on World Wide Web Services->Application Development Features.
Click on OK button->finish.
It will take some time. - Start->Run->inetmgr
Right click on Sites->Add Website->Enter Site name as project name->Select Physical Path (where your Project is saved)->Enter IP Address of your system->Enter Port Number like (8090) ->check on Start Website Immediately->Press Ok Button
Now your new website is added on the IIS Server. - Go to Application Pools->your Website->double click on it->select "Classic" from Managed Pipeline Mode->ok.
- You must add Default Document by : IIS-><your Website>->Double Click on "Default Document"-> Add -> yourDefaultpage.aspx.
- IIS-><your Website>->Double Click on "Directory Browsing" -> Enable it from right corner. It is for Directory access (It does not work as a website, it's work like directory listing of your project in web page). You can skip this step.
- So now your website address is http://<Your IP like SampleWeb>:<Port Number like 8090>/yourpage.aspx
- Now you can access your local website on LAN.
Note: If any problem exists, go to your project->web.config ->Remove This
(<system.webServer>
<modules runAllManagedModulesForAllRequests="true"/>
</system.webServer>)