Tag Archive for 'IIS'

IIS: Disable the web site and display generic app offline information

Deployment of a new version of a site is a very tricky/risky procedure. At some point (i.e. until deployment is not completed) your service will work not as it is supposed to, which can result in reset session, HTTP errors displayed, etc. Whatever the result is it can really discourage the users of your service and, let’s be honest, will not look very professional (if not lame…).

That’s why at the time of deploying the changes, you probably should temporarily switch off the service and display the appropriate message so that the user knows the web site is being updated, and that is happening now.

Now, if you are hosting the service on IIS this is very simple to achieve. All you need to do is copy app_offline.htm to the root directory of your web site. Once the file is in place, it will be served to the user as a response to any request to your web site. Once you’re done with deployment, remove that file and the updated service will start working again.

IIS on Windows XP: There are too many people accessing the Web site at this time.

I started getting this error when I accessed pages hosted on IIS installed on my machine (I’m running Windows XP):

The page cannot be displayed
There are too many people accessing the Web site at this time.

——————————————————————————–

Please try the following:

Click the Refresh button, or try again later.

Open the localhost home page, and then look for links to the information you want.
HTTP 403.9 – Access Forbidden: Too many users are connected
Internet Information Services

——————————————————————————–

Technical Information (for support personnel)

Background:
This error can occur if the Web server is busy and cannot process your request due to heavy traffic.

More information:
Microsoft Support

The wierd thing was I was getting that error on Opera and IE, but everything was fine on Firefox.

Solution

My friend suggested the following:

  1. go to IIS Manager
  2. right click on ‘Default Web Site’ (under YOUR_MACHINE_NAME/Web Sites/) and choose properties
  3. change ‘Connection Timeout’ value to 10 seconds
  4. uncheck ‘HTTP Keep-Alives Enabled’
  5. save the changes

Registering different versions of .NET Framwework

It’s possible to have more than one ASP.NET IIS installed and registrated on one machine (that runs Windows).
To check which version is currently registered run Command Line (Start/Run… and type ‘cmd’) and go to %SystemRoot%\Microsoft.NET\Framework\vXXX directory where %SystemRoot% is a special system-wide environment variable found on Microsoft Windows NT and its derivatives (read more on Wikipedia) and vXXX is the directory with ASP.NET IIS files.
Being in that directory, type aspnet_regiis -lv. You will be then given the list of installed/registered versions of ASP.NET IIS.

To register a new version of ASP.NET IIS, go to its direcotry in %SystemRoot%\Microsoft.NET\Framework (using Command Line) and run the following command: aspnet_regiis -i.

To unregister a new version of ASP.NET IIS, go to its direcotry in %SystemRoot%\Microsoft.NET\Framework (using Command Line) and run the following command: aspnet_regiis -u.

To learn more about ASP.NET IIS Registration Tool (Aspnet_regiis.exe) visit the description available on MSDN service.