在IIS7下配置ASP.NET v1.1(Visual Studio .NET 2003)环境



        需要在Vista\windows7\windows 2008 中使用VS2003来开发的话,则需要安装.NET 1.1 sp1。

在IIS7下配置ASP.NET v1.1(Visual Studio .NET 2003)环境
1. 需要打开 IIS Manager 来手动设置ASP.NET 1.1的ISAPI Extension
2. 把现在的localhost加入到了信任站点区域,并且设置了自动以当前帐户登入.
3.提示:你确认你是"Debug Users"组的用户,于是我又把当前帐户和Administrators加入了"Debug Users"组里.
4.如果大家安装Vista\windows7的时候没有用到Administrator的用户名的话,那就需要在运行VS2003或者VS2005时,使用右键| Run As Adminstrator。

如果按以上步骤还不能调试,那就请接着看:

While above works great on Vista/Vista SP1/WS08 RTM, if you try to run ASP.NET 1.1 on Vista SP2/WS08 SP2, you may have experienced the following error if you are on a 64-bit OS:

     There was an error while performing this operation.

    Details:

     Filename:
    \\?\C:\Windows\system32\inetsrv\config\applicationHost.config
    Error:

如图:
       在IIS7下配置ASP.NET v1.1(Visual Studio .NET 2003)环境
Here is the problem.

In order to support .NET 4.0 Framework, IIS team has released a hotfix (http://support.microsoft.com/kb/958854) which is also included in SP2.  At the root of the problem is that this hotfix allows the IIS runtime to read the correct version of .NET Framework configuration based on the .NET Framework version that is associated with the application pool.  For example:

    * .NET Framework version 1.1: the config location is %windir%\Microsoft.NET\Framework\v1.1.4322\CONFIG
    * .NET Framework version 2.0: the config location is %windir%\Microsoft.NET\Framework\v2.0.50727\CONFIG
    * .NET Framework version 4.0: the config location is %windir%\Microsoft.NET\Framework\v4.0.nnnnn\CONFIG

The problem is that when the runtime tries to load the corresponding configuration, it doesn't take the bitness of the application pool into the consideration.  As you know, ASP.NET 1.1 is only supported on 32-bit.  So if you have a 64-bit OS, in order to run ASP.NET 1.1, you have to enable 32-bit applications in the application pool.  So, with the QFE/SP2 on 64-bit OS (and only on 64-bit OS), the runtime is incorrectly looking for the 1.1 version of the configuration under Framework64, which does not exist.

Workaround:

   1. Create the Framework64 directory for 1.1
      md \windows\microsoft.net\framework64\v1.1.4322\config\
   2. Copy the 32bit config to 64bit config location created in step 1.
      copy \windows\microsoft.net\framework\v1.1.4322\config\machine.config \windows\microsoft.net\framework64\v1.1.4322\config\

In the spirit of full disclosure, without the hotfix/SP2, the behavior was still incorrect on Vista/Vista SP1/WS08 RTM in that the runtime was alreays reading the 2.0 configuration although the application pool is configured to use .NET 1.1.  (Because the runtime was always reading the 2.0 config regardless of the .NET Framework version that is associated with the application pool.  This was the bug that hotfix/SP2 tried to address as part of supporting .NET 4.0, but it didn't quite consider the fact that ASP.NET 1.1 is only available in 32-bit.)  This bug in Vista/Vista SP1/WS08 RTM may not have been too obvious to those running ASP.NET 1.1 on 64-bit Vista/Vista SP1/WS08 RTM unless you have significant/specific settings/differences between 1.1 and 2.0 configurations.
 

你可能感兴趣的:(asp.net)