Monday, January 21, 2008

Tip of the Day - Re-Register ASP.Net with IIS, a How-to.

Why this is needed?

In a rush to get things installed on machines you may install software in an order that it was not supposed to be installed in. Meaning, software that depends on other software to function correctly. The following is one of many scenarios that may cause errors to happen.

1. My scenario:

  • You setup a new machine with Windows XP Pro and all current updates.
  • You install the .NET Framework version x.x. Assume v2.0
  • You install IIS.
  • You install MS SQL 2005
    • During install, the setup blows up with errors about an ASP.NET user that is not setup on your computer.

2. What needed to happen was this:

  • You setup a new machine with Windows XP Pro and all current updates.
  • You install IIS.
  • You install the .NET Framework version x.x. Assume v2.0
  • You install MS SQL 2005
  • Setup should complete without errors.

On the first scenario, there is a way to recover from this incorrect install order. You need to re-register ASP.NET with IIS. Here is the command to do it.

  • Open up a command prompt
  • Switch to the Windows -> Microsoft.Net -> Framework -> Version Number -> run this command: aspnet_regiis.exe –i
    • Example v2.0 .NET:
    • C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\aspnet_regiis.exe –i
  • A new user will be created in the user accounts called ASP.NET
  • You then can re-install MS SQL 2005 and it should complete without errors.
Here is some reference URL’s for your viewing pleasure – the best thing to remember is to make sure IIS is installed before installing any applications that depend on it or require web functionality:

No comments: