ASP.NET IIS 配置笔记

常见问题:

1. Configuration Error

Description: An error occurred during the processing of a configuration file required to service this request. Please review the specific error details below and modify your configuration file appropriately.

Parser Error Message: Unrecognized attribute 'targetFramework'. Note that attribute names are case-sensitive.

Source Error:

Line 10:             during development.
Line 11:         -->
Line 12:   <compilation debug="false" targetFramework="4.0">
Line 13:   </compilation>
Line 14:   <!--

 

 

解决方案:

1). 选中你要发布的网站

2). 选择右边的基本设置.

3). 在出现的编辑网站对话框中选中“选择” 按钮

4). 在出现的选择应用池程序对话框中选择 ASP.NET v4.0

5). 测试OK

 

2. IIS应用程序池中找不到ASP.NET v4.0及UrlRouting的问题

.net framework4 的正式版本号为4.0.30319,如果以前安装过旧版本的4.0框架(如上图中的v4.0.30128),请先在命令行下输入 :

C:\Windows\Microsoft.NET\Framework64\v4.0.30319>aspnet_regiis.exe -i

重新将.net4正式版注册到IIS中

注:如果服务器为64位系统,.net会同步安装64位的 framework,如果是32位的系统则没有Framework64这个目录,这个运行完以后,检查IIS中应用程序池的版本号是否为正式版本号。

 

3.  It is an error to use a section registered as allowDefinition='MachineToApplication' beyond application level.

删掉多余的web.config

posted @ 2011-07-25 11:38  胆小猫  阅读(190)  评论(0编辑  收藏  举报