Web应用程序的问题(web.config中的错误)HTTP 500.19与IIS7.5和ASP.NET V2 [英] Web Application Problems (web.config errors) HTTP 500.19 with IIS7.5 and ASP.NET v2

查看:683
本文介绍了Web应用程序的问题(web.config中的错误)HTTP 500.19与IIS7.5和ASP.NET V2的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

这是推动整个团队为之疯狂。必须有IIS或我们的Web服务器的一些简单的错误配置的一部分,但每次我们尽量用完再在IIS 7.5 ASP.NET Web应用程序,我们得到以下错误...

下面是完全错误:

  HTTP错误500.19  - 内部服务器错误请求的页面不能因为相关配置进行访问
该网页数据是无效的。`详细的错误Information`
模块IIS Web核心
未知的通知
处理程序尚未确定
错误code 0x8007000d
配置错误
配置文件\\\\。\\ E:\\ wwwroot的\\ web.config中
请求的URL的http://本地主机:80 / Default.aspx的
物理路径
登录方法尚未确定
登录用户尚未确定
配置源
   -1:
    0:

本机运行的的Windows Server 2008 R2 。我们使用的 Visual Studio 2008中发展我们的Web应用程序。

据微软的code 8007000d意味着在我们的web.config中有语法错误 - 除了项目的建造和运行在本地的罚款。看着在XML记事本中的web.config不弹出任何语法错误,无论是。我猜想那一定是某种配置差在我的部分...?

有谁知道在哪里可以找到有关错误的信息?没有什么是显示事件查看器,可以:(

不知道还有什么会有所帮助提...

援助大大AP preciated。谢谢!

的更新! - 张贴WEB.CONFIG在

好吧,因为我上面贴了原来的问题,我已经在的web.config 这是导致错误追查precise线。

下面是线(它们出现的< System.webServer> 标签)...

 <&HttpHandlers的GT;
<清除动词=*路径=* ASMX。/>
<添加动词=*路径=*。ASMX验证=假TYPE =System.Web.Script.Services.ScriptHandlerFactory,System.Web.Extensions程序,版本= 1.0.61025.0,文化=中性公钥= f2cb5667dc123a56/>
< / HttpHandlers的>

请注意:如果我删除线的 的之间的<&HttpHandlers的GT; 我仍然得到错误。我简直要删除< HttpHandlers的方式> (插图中和线)停止收到上述错误

在我做这个,我得到的新的的500.19错误,但是。值得庆幸的是,这一次居然IIS告诉我它在web.config中位导致问题...

 <&处理GT;
<清除NAME =WebServiceHandlerFactory集成的/>
<添加动词=*路径=*。ASMX验证=假TYPE =System.Web.Script.Services.ScriptHandlerFactory,System.Web.Extensions程序,版本= 1.0.61025.0,文化=中性公钥= f2cb5667dc123a56/>
<添加名称=ScriptHandlerFactoryAppServices动词=*路径=* _ AppService.axdpreCondition =integratedModeTYPE =System.Web.Script.Services.ScriptHandlerFactory,System.Web.Extensions程序,版本= 1.0.61025.0,文化=中性公钥= f2cb5667dc123a56/>
<添加名称=ScriptResourcepreCondition =integratedMode动词=GET,HEAD路径=的ScriptResource.axdTYPE =System.Web.Handlers.ScriptResourceHandler,System.Web.Extensions程序,版本为1.0 .61025.0,文化=中性公钥= f2cb5667dc123a56/>
< /处理器>

看着这些线条很明显的问题已经在同一个&LT进一步迁移; system.webServer> 标签<处理> 标记。

新的错误也更明确,具体地抱怨说,它不能识别属性验证(如上述在第三行所示)。删除这个属性,然后使它抱怨同一线路没有必要的name属性。添加此属性,那么将打开 ASP.NET 错误...


  

无法加载文件或程序
  System.Web.Extensions程序,
  版本= 1.0.61025.0,文化=中立,
  公钥= f2cb5667dc123a56或
  它的一个依赖。系统
  无法找到指定的文件。


显然,我认为这些新的错误,刚刚从我出现删除 < HttpHandlers的> 在首位标签 - 他们显然需要由应用程序 - 这样的问题是:为什么这些标记踢了一个错误在IIS中位居第一???

我是否需要安装的东西到IIS,使其与他们一起工作?

任何帮助再次感谢。

WEB.CONFIG

下面是的麻烦位我们的的web.config ...我希望这可以帮助别人找到我们的问题!

 <&的System.Web GT;<! - 东西剪下 - >    <&HttpHandlers的GT;
        <清除动词=*路径=* ASMX。/>
        <添加动词=*路径=*。ASMX验证=假TYPE =System.Web.Script.Services.ScriptHandlerFactory,System.Web.Extensions程序,版本= 1.0.61025.0,文化=中性公钥= f2cb5667dc123a56/>
        <添加动词=*路径=* _ AppService.axd验证=假TYPE =System.Web.Script.Services.ScriptHandlerFactory,System.Web.Extensions程序,版本= 1.0.61025.0,文化=中立,公钥= f2cb5667dc123a56/>
        <添加动词=GET,HEAD路径=的ScriptResource.axdTYPE =System.Web.Handlers.ScriptResourceHandler,System.Web.Extensions程序,版本= 1.0.61025.0,文化=中性公钥= f2cb5667dc123a56验证= 假/>
    < / HttpHandlers的>
    <&的HttpModules GT;
        <添加名称=ScriptModuleTYPE =System.Web.Handlers.ScriptModule,System.Web.Extensions程序,版本= 1.0.61025.0,文化=中性公钥= f2cb5667dc123a56/>
    < /&的HttpModules GT;
< /system.web>< system.webServer>
    <验证validateIntegratedModeConfiguration =FALSE/>
    <模块>
        <添加名称=ScriptModulepreCondition =integratedModeTYPE =System.Web.Handlers.ScriptModule,System.Web.Extensions程序,版本= 1.0.61025.0,文化=中性公钥= f2cb5667dc123a56/>
    < /模块>
    <清除动词=*路径=* ASMX。/>
    <添加动词=*路径=*。ASMX验证=假TYPE =System.Web.Script.Services.ScriptHandlerFactory,System.Web.Extensions程序,版本= 1.0.61025.0,文化=中性公钥= f2cb5667dc123a56/>
    <&处理GT;
        <清除NAME =WebServiceHandlerFactory集成的/>
        <添加动词=*路径=*。ASMX验证=假TYPE =System.Web.Script.Services.ScriptHandlerFactory,System.Web.Extensions程序,版本= 1.0.61025.0,文化=中性公钥= f2cb5667dc123a56/>
        <添加名称=ScriptHandlerFactoryAppServices动词=*路径=* _ AppService.axdpreCondition =integratedModeTYPE =System.Web.Script.Services.ScriptHandlerFactory,System.Web.Extensions程序,版本= 1.0.61025.0,文化=中性公钥= f2cb5667dc123a56/>
        <添加名称=ScriptResourcepreCondition =integratedMode动词=GET,HEAD路径=的ScriptResource.axdTYPE =System.Web.Handlers.ScriptResourceHandler,System.Web.Extensions程序,版本为1.0 .61025.0,文化=中性公钥= f2cb5667dc123a56/>
    < /处理器>
< /system.webServer>


解决方案

啊哈!我战胜了这个问题!我的上帝,这是对于像我有限的经验IIS兽。我觉得像洛基。我真的以为我是要花费整个周末修复它。

下面是谁曾经谈到这个邪恶的问题,为别人解决方案。

首先要注意:如果你希望这是你的解决方案,请确保您有相同的错误code( 0x8007000d ),并配置源( - 1:0:)。如果不是,这个的不是的解决方案。

接下来的事情要注意的: AJAX未正确安装在你的web.config

修正了按照本指南操作:


  

http://www.asp.net/AJAX/documentation/live/ ConfiguringASPNETAJAX.aspx 结果
  更新微软似乎已删除上述文件


然后,在生产服务器上安装的 AJAX 1.0的扩展,此链接:


  

http://www.asp.net/ajax/downloads/archive/结果
  更新微软似乎已经删除了上述页面,得:(


这就是它!

This is driving the whole team crazy. There must be some simple mis-configured part of IIS or our Web Server, but every time we try to run out ASP.NET Web Application on IIS 7.5 we get the following error...

Here's the error in full:

HTTP Error 500.19 - Internal Server Error

The requested page cannot be accessed because the related configuration  
data for the page is invalid.

`Detailed Error Information` 
Module              IIS Web Core
Notification        Unknown
Handler             Not yet determined
Error Code          0x8007000d
Config Error
Config File         \\?\E:\wwwroot\web.config
Requested URL       http://localhost:80/Default.aspx
Physical Path 
Logon Method        Not yet determined
Logon User          Not yet determined
Config Source
   -1: 
    0:

The machine is running Windows Server 2008 R2. We're developing our Web Application using Visual Studio 2008.

According to Microsoft the code 8007000d means there's a syntax error in our web.config -- except the project builds and runs fine locally. Looking at the web.config in XML Notepad doesn't bring up any syntax errors, either. I'm assuming it must be some sort of poor configuration on my part...?

Does anyone know where I might find further information about the error? Nothing is showing in EventViewer, either :(

Not sure what else would be helpful to mention...

Assistance is greatly appreciated. Thanks!

UPDATES! - POSTED WEB.CONFIG BELOW

Ok, since I posted the original question above, I've tracked down the precise lines in the web.config that were causing the error.

Here are the lines (they appear between <System.webServer> tags)...

	<httpHandlers>
		<remove verb="*" path="*.asmx"/>
		<add verb="*" path="*.asmx" validate="false" type="System.Web.Script.Services.ScriptHandlerFactory, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=f2cb5667dc123a56"/>
	</httpHandlers>

Note: If I delete the lines between the <httpHandlers> I STILL get the error. I literally have to delete <httpHandlers> (and the lines inbetween) to stop getting the above error.

Once I've done this I get a new 500.19 error, however. Thankfully, this time IIS actually tells me which bit of the web.config is causing a problem...

	<handlers>
		<remove name="WebServiceHandlerFactory-Integrated"/>
		<add verb="*" path="*.asmx" validate="false" type="System.Web.Script.Services.ScriptHandlerFactory,System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=f2cb5667dc123a56"/>
		<add name="ScriptHandlerFactoryAppServices" verb="*" path="*_AppService.axd" preCondition="integratedMode" type="System.Web.Script.Services.ScriptHandlerFactory, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=f2cb5667dc123a56"/>
		<add name="ScriptResource" preCondition="integratedMode" verb="GET,HEAD" path="ScriptResource.axd" type="System.Web.Handlers.ScriptResourceHandler, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=f2cb5667dc123a56"/>
	</handlers>

Looking at these lines it's clear the problem has migrated further within the same <system.webServer> tag to the <handlers> tag.

The new error is also more explicit and specifically complains that it doesn't recognize the attribute "validate" (as seen on the third line above). Removing this attribute then makes it complain that the same line doesn't have the required "name" attribute. Adding this attribute then brings up ASP.NET error...

Could not load file or assembly 'System.web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=f2cb5667dc123a56' or one of its dependencies. The system cannot find the file specified.

Obviously I think these new errors have just arisen from me deleting the <httpHandlers> tags in the first place -- they're obviously needed by the application -- so the question remains: Why would these tags kick up an error in IIS in the first place???

Do I need to install something to IIS to make it work with them?

Thanks again for any help.

WEB.CONFIG

Here's the troublesome bits of our web.Config... I hope this helps someone find our problem!

<system.Web>

<!-- stuff cut out -->

    <httpHandlers>
        <remove verb="*" path="*.asmx"/>
        <add verb="*" path="*.asmx" validate="false" type="System.Web.Script.Services.ScriptHandlerFactory, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=f2cb5667dc123a56"/>
        <add verb="*" path="*_AppService.axd" validate="false" type="System.Web.Script.Services.ScriptHandlerFactory, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=f2cb5667dc123a56"/>
        <add verb="GET,HEAD" path="ScriptResource.axd" type="System.Web.Handlers.ScriptResourceHandler, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=f2cb5667dc123a56" validate="false"/>
    </httpHandlers>
    <httpModules>
        <add name="ScriptModule" type="System.Web.Handlers.ScriptModule, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=f2cb5667dc123a56"/>
    </httpModules>
</system.web>

<system.webServer>
    <validation validateIntegratedModeConfiguration="false"/>
    <modules>
        <add name="ScriptModule" preCondition="integratedMode" type="System.Web.Handlers.ScriptModule, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=f2cb5667dc123a56"/>
    </modules>
    <remove verb="*" path="*.asmx"/>
    <add verb="*" path="*.asmx" validate="false" type="System.Web.Script.Services.ScriptHandlerFactory, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=f2cb5667dc123a56"/>
    <handlers>
        <remove name="WebServiceHandlerFactory-Integrated"/>
        <add verb="*" path="*.asmx" validate="false" type="System.Web.Script.Services.ScriptHandlerFactory,System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=f2cb5667dc123a56"/>
        <add name="ScriptHandlerFactoryAppServices" verb="*" path="*_AppService.axd" preCondition="integratedMode" type="System.Web.Script.Services.ScriptHandlerFactory, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=f2cb5667dc123a56"/>
        <add name="ScriptResource" preCondition="integratedMode" verb="GET,HEAD" path="ScriptResource.axd" type="System.Web.Handlers.ScriptResourceHandler, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=f2cb5667dc123a56"/>
    </handlers>
</system.webServer>

解决方案

Aha! I beat this problem! My god, it was a beast for someone like me with limited IIS experience. I feel like Rocky. I really thought I was going to be spending all weekend fixing it.

Here's the solution for anyone else who ever comes this evil problem.

First thing to be aware of: If you're hoping this is your solution, make sure that you have the same Error Code (0x8007000d) and Config Source (-1: 0:). If not, this isn't your solution.

Next thing to be aware of: AJAX is not properly installed in your web.config!

Fix that by following this guide:

http://www.asp.net/AJAX/documentation/live/ConfiguringASPNETAJAX.aspx
Update: Microsoft seems to have removed the above documentation

Then, install the AJAX 1.0 extensions on your production server, from this link:

http://www.asp.net/ajax/downloads/archive/
Update: Microsoft seems to have removed the above page, too :(

That's it!

这篇关于Web应用程序的问题(web.config中的错误)HTTP 500.19与IIS7.5和ASP.NET V2的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆