Windows Server - IIS Configuration

Asked By DC ATTRI on 23-Apr-09 02:20 AM
I have an asp.net web site. Which is running properly on developer machine.
while I am trying to configure the website on server it is showing an error msg.
(Page can not be displayed)
for testing i just made a html page (test.htm) which is running properly on iis.
website is unable to browse the aspx page.
i have window server 2003 standard edition
dotnet framework 2.0 (not visual studio)
ajax extender

IIS Configuration

mv ark replied to DC ATTRI on 23-Apr-09 02:27 AM

By default, IIS 6.0 is only allowed to serve static content. No ASP, no ASP.NET...

Go to Control Panel, Administrative Tools, Manage Your Server. Scroll down to Application Server and click on Manage this application server. Go to Web Services Extensions and there click on Allow for ASP.NET

For graphical instructions, see this link -
http://classicasp.aspfaq.com/general/why-does-iis-hang-and/or-stop-serving-asp-pages.html


IIS Configuration steps

Ravenet Rasaiyah replied to DC ATTRI on 23-Apr-09 02:31 AM
Hi

look here so configure IIS server

http://msdn.microsoft.com/en-us/library/ms178477.aspx

http://geekswithblogs.net/ranganh/archive/2006/02/23/70461.aspx

thank you

How to configure IIS Web site in Windows Server 2003

Kalit Sikka replied to DC ATTRI on 23-Apr-09 02:34 AM

Before we start the installation of IIS there are a few things we need to do. One of them is to secure the operating system (OS). That means we need a firewall, antivirus software and update the OS. The system I am using when writing this article is already behind a hardware firewall, but for additional security (and to show the reader) the built-in firewall is enabled as well. A very important notice is that you should not open up any ports in the firewall, not even port 80, before the installation. Although IIS 6.0 is locked down by default, and no known security issues impacts IIS during installation (when writing this) it is wise to first properly configure IIS and then publish it.

Follow these steps to enable the firewall:

  • Click "Start", "Control Panel" and then "Windows Firewall"
  • If you are asked to start the "Windows Firewall/Internet Connection Sharing" service, do so.
  • When you see the Windows Firewall dialog, select "On".
  • Click on the Exceptions tab and make sure that no ports are open (at least no ports related to IIS, you may have other ports for other applications opened during the installation of IIS)
  • Also check the Advanced tab, and the Settings button for "Network Connection Settings"
  • Click Ok

Once the firewall is enabled, it is time to visit Windows Update and get the latest updates.

  • Click "Start" and then "Windows Update"
  • Follow the instructions

The last step in this section is to install and/or update an antivirus program. Do note that the antivirus software should be designed to be used on servers. Antivirus software designed for home users will not install on a server edition of Windows, or may not work well with IIS.

The installation

IIS can be installed in two ways, either by using the "Manage Your Server" wizard, or by using "Add/Remove Windows Components". In this article, I will show you how to use "Manage Your Server".

  • Start "Manage Your Server" by clicking on "Start" -> "Administrative Tools" -> "Manage Your Server"
  • When you see the "Manage Your Server" screen, click on "Add or remove a role".

You will now see a screen telling you what steps you should have completed before continuing.

  • Click "Next"

If you are asked to unblock the "Configure Your Server Wizard" program, you can select to keep blocking it; it will not impact the installation of IIS.

  • On the "Server Role" screen select "Application Server" and click "Next".

The next step is to enable ASP.NET. You can also enable FrontPage Server Extensions if you want. This is useful if you will use for example Visual Studio to publish your website. This article does however not cover FrontPage Server Extensions.

  • Select "Enable ASP.NET" and click "Next"

A summary will be presented to you, and the installation will start after you click Next.

  • Click "Next"

You may be asked for the Windows Server 2003 CD during the installation, so keep it nearby.

When the installation has finished, click the "Finish" button.

Post-installation

Once IIS is installed, you will probably want to check if it is running and working as expected. To do so, we can simply browse to http://localhost/ on the machine itself. Localhost refers to the local machine, and can only be used on the machine itself. It cannot be used to access other machines.

If you do this using Internet Explorer you will see an "Under Construction" page. This indicates that IIS is installed and can process requests. It also means that we have not yet created a default page for our website.

A "Default Page" is a page that will be served when no file name is specified. To create a default page for the root of your website, you first need to create the page (using for example notepad.exe) and save it to the website's root folder. By default, the website's root folder is C:\Inetpub\wwwroot. A website's root folder can be modified at any time using IIS Manager.

IIS Manager is used to configure IIS. To start IIS Manager follow these steps:

  • Click "Start" -> "Administrative Tools" -> "Internet Information Services (IIS) Manager"

So what we need to do is create a file Default.htm, and place it in the C:\Inetpub\wwwroot folder. Or...we do not need to do this. We can, as I said earlier, change the home directory to something else, and we can also give the default document any other name as long as we add it to the list of "Default Documents". But to keep this simple, the default location and name is used.

Simple does not always equal secure. It is recommended to move the website's root to a non-system drive, for example D:. This adds an extra layer of security, but using the C: drive is in no way insecure.

You can use your favorite text editor to create a HTML file and save it to C:\inetpub\wwwroot (make sure you don't get the extension .htm.txt if you use a text editor), or you can use the Default.htm file in the ZIP-package you can download at the bottom of this article. Once this file is placed in the home directory, and you browse to http://localhost/ you will see the content of the default document.

So now we have a default document. The goal of this article was however to get the server to serve static pages, ASP and ASP.NET. Static pages and ASP.NET should work at this moment (IIS serves static pages by default, and ASP.NET was enabled during the installation). But just to make sure that it works, browse to http://localhost/default.htm.

To test ASP.NET, either create a simple "Hello World" ASP.NET file, or use the one supplied in the ZIP-package available for this article. Remember to keep the file simple when testing if ASP.NET is working on the server. If you used the file from the ZIP-package, placed it in C:\inetpub\wwwroot and then browsed to it you should see a "Hello World" message, which indicates that ASP.NET is working on the server.

Read this article for more info: http://www.gafvert.info/iis/article/install_iis_6.htm

This issue occurs when a corresponding mapping for the file name
Venkat K replied to DC ATTRI on 23-Apr-09 04:44 AM

extension does not exist in the ASP.NET HTTP handlers configuration.

Create a mapping in ASP.NET at the level of the IIS 6.0 script map

loadTOCNode(2, 'workaround'); Create specific mappings in the ASP.NET HTTP handlers configuration to the static file handler (System.Web.StaticFileHandler). Create a mapping in the ASP.NET HTTP handlers configuration for each specific mapping in the IIS 6.0 scriptmaps.

For example, add a mapping in the ASP.NET HTTP handlers configuration for files that have the .htm file name extension. To do this, add the following code to the httpHandlers element in the Web.config file at the level that corresponds to where the IIS 6.0 script mapping is defined. If Aspnet_isapi.dll is mapped globally, use the Web.config file in the Config folder that is located in the .NET Framework installation folder.

<add path="*.htm" verb="*" type="System.Web.StaticFileHandler" />

Method 2: Create a mapping in ASP.NET in the root Web.config file

loadTOCNode(2, 'workaround'); Modify the root Web.config file. To do this, locate the following code in the root Web.config file.

<add path="*" verb="GET,HEAD,POST" type="System.Web.DefaultHttpHandler" validate="True" />

Replace that code with the following code.

<add path="*" verb="GET,HEAD,POST" type="System.Web.StaticFileHandler" validate="True" />
 
reply
H K replied to DC ATTRI on 23-Apr-09 11:00 AM
If you are using IIS 6.0 or higher then try the following

Under Control Panel, Administrative Tools, Manage Your Server. Scroll down to Application Server and click on Manage this application server. Select Web Services Extensions and there click on Allow for ASP.NET

else try registering the .net framework to the IIS usign the following command
aspnet_regiis.exe -i

and it should work