Wednesday, June 30, 2010

Hosting ASP.Net Site in IIS in Windows Server 2008 R2

I am posting this post since I had some problems while hosting a site in IIS in Windows Server 2008 R2.

To add a web site in IIS, right click on Sites in the IIS Manager and select Add Web Site as shown in the below figure.




Then you will get the Add Web Site window as shown below and enter the required details.




Physical Path should be the folder which contains the web site files and it should locate inside the C:\inetpub\wwwroot\wss\VirtualDirectories folder.

Then click Ok to complete it.
But if you try to browse the site, it will give you an error.

To avoid it and browse the web site you need to do two things.
First one is, add the IIS_IUSRS and allow full permission. To do it right click on the site and select Edit Permission as shown in the below figure.



Then go to the Security tab in the new window and add the IIS_IUSRS user and allow Full Control. Then click Ok.

Still you cannot view the page because of an authorization error.

To avoid it you need to do the second thing.
Select the site and you will get a screen as below.



Then double click on Authentication and you can see enabled authentication types. In that Windows Authentication is displayed as Disabled. Right click on it select Enable as shown in below figure.



It will fix the authentication error and you will be able to browse the web site...

No comments:

Post a Comment