简体   繁体   English

在IIS 7中托管ASP.NET站点

[英]Hosting ASP.NET site in IIS 7

I was hosting published site in IIS 7 on Windows 7 installed machine. 我在Windows 7安装的计算机上的IIS 7中托管发布的站点。 I had done setting for .NET framework version, Security Options but got Error as shown below 我已经完成了.NET Framework版本,“安全性选项”的设置,但出现错误,如下所示

HTTP Error 500.19 - Internal Server Error HTTP错误500.19-内部服务器错误

The requested page cannot be accessed because the related configuration data for the page is invalid. 无法访问请求的页面,因为该页面的相关配置数据无效。 Detailed Error Information Module IIS Web Core Notification BeginRequest 详细的错误信息模块IIS Web核心通知BeginRequest

Handler Not yet determined 处理程序尚未确定

Error Code 0x800700b7 错误代码0x800700b7

Config Error There is a duplicate 'system.web.extensions/scripting/scriptResourceHandler' section defined 配置错误重复的'system.web.extensions / scripting / scriptResourceHandler'部分已定义

Config File \\?\\D:\\inetpub\\wwwroot\\KDAHCSSD\\web.config 配置文件\\?\\ D:\\ inetpub \\ wwwroot \\ KDAHCSSD \\ web.config

Requested URL http://localhost:80/KDAHCSSD/frmLogin.aspx 要求的网址http:// localhost:80 / KDAHCSSD / frmLogin.aspx

Physical Path D:\\inetpub\\wwwroot\\KDAHCSSD\\frmLogin.aspx 物理路径D:\\ inetpub \\ wwwroot \\ KDAHCSSD \\ frmLogin.aspx

Logon Method Not yet determined 登录方法尚未确定

Logon User Not yet determined 登录用户尚未确定

Config Source 13: 配置源13:
sectionGroup name="scripting" type="System.Web.Configuration.ScriptingSectionGroup, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" sectionGroup name =“ scripting” type =“ System.Web.Configuration.ScriptingSectionGroup,System.Web.Extensions,Version = 3.5.0.0,Culture = neutral,PublicKeyToken = 31BF3856AD364E35”

14: section name="scriptResourceHandler" type="System.Web.Configuration.ScriptingScriptResourceHandlerSection, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" requirePermission="false" allowDefinition="MachineToApplication"/ 14:部分名称=“ scriptResourceHandler” type =“ System.Web.Configuration.ScriptingScriptResourceHandlerSection,System.Web.Extensions,Version = 3.5.0.0,Culture = neutral,PublicKeyToken = 31BF3856AD364E35” requirePermission =“ false” allowDefinition =“ MachineToApplication” /

15: sectionGroup name="webServices" type="System.Web.Configuration.ScriptingWebServicesSectionGroup, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" 15:sectionGroup name =“ webServices” type =“ System.Web.Configuration.ScriptingWebServicesSectionGroup,System.Web.Extensions,Version = 3.5.0.0,Culture = neutral,PublicKeyToken = 31BF3856AD364E35”

Links and More InformationThis error occurs when there is a problem reading the configuration file for the Web server or Web application. 链接和更多信息如果在读取Web服务器或Web应用程序的配置文件时遇到问题,则会发生此错误。 In some cases, the event logs may contain more information about what caused this error. 在某些情况下,事件日志可能包含有关导致此错误的原因的更多信息。

View more information » 查看更多信息»

How to solve this. 如何解决这个问题。 What will I need to do?.. 我该怎么办?

Assuming you are running a .Net 4 site, the machine.config will already have defined the scriptResourceHandler . 假设您正在运行.Net 4站点,则machine.config将已经定义了scriptResourceHandler Remove this section from the web.config and you should be fine. 从web.config中删除此部分,就可以了。

EDIT: Just noticed you say you are running 3.5 and so shouldn't happen, but try removing that section and see if it works. 编辑:刚注意到您说您正在运行3.5,所以不应该发生,但是请尝试删除该部分并查看它是否有效。

This can also occur if your application is compiled against the .NET 2.0 CLR and you're trying to run it in a .NET 4.0/4.5 application pool. 如果您的应用程序是针对.NET 2.0 CLR编译的,并且您正在尝试在.NET 4.0 / 4.5应用程序池中运行它,则也会发生这种情况。

If that's the case (as it was for me), switching to the correct app pool solves the problem. 如果是这种情况(对我而言),则切换到正确的应用程序池即可解决此问题。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM