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...
这让整个团队疯狂。在IIS或我们的Web服务器上必须有一些简单的错误配置的部分,但是每次我们尝试运行ASP。在IIS 7.5上的NET Web应用程序,我们得到以下错误…
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.
这台机器运行Windows Server 2008 R2。我们正在使用Visual Studio 2008开发我们的Web应用程序。
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...?
根据微软的说法,代码8007000d意味着我们的web有一个语法错误。配置——除了项目构建和在本地运行良好。看网页。配置在XML记事本中也不会带来任何语法错误。我想这一定是我的某种糟糕的配置…?
Does anyone know where I might find further information about the error? Nothing is showing in EventViewer, either :(
有人知道我在哪里可以找到关于错误的更多信息吗?在EventViewer中什么也没有显示:(
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...
一旦我这样做了,我就会得到一个新的500.19错误。值得庆幸的是,这次IIS实际上告诉了我web的哪一部分。配置造成了问题……
<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.
看看这些行,很明显,问题已经在同一个 <系统中进一步迁移了。webserver> 标签到 <处理程序> 标签。
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...
新的错误也更加明确,并且特别地抱怨它不承认“validate”属性(如上面的第三行所示)。删除此属性后,它会抱怨同一行没有所需的“name”属性。然后添加这个属性就会产生ASP。网络错误……
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.
无法加载文件或汇编系统。扩展,版本=1.0.61025.0,文化=中性,PublicKeyToken=f2cb5667dc123a56'或它的一个依赖项。系统无法找到指定的文件。
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?
我是否需要安装一些东西到IIS,让它与它们一起工作?
Thanks again for any help.
再次感谢你的帮助。
WEB.CONFIG
. config
Here's the troublesome bits of our web.Config... I hope this helps someone find our problem!
这是我们的web.Config…我希望这能帮助别人找到我们的问题!
<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>
16 个解决方案
#1
227
I had these exact symptoms and my issue was similar to Peter's. Was setting up an existing project on a new server. My project referenced the IIS7 URL Rewriting module, but that hadn't been installed yet on the new server. Installing it fixed my issue.
我有这些确切的症状,我的问题和彼得的相似。正在一个新的服务器上建立一个现有的项目。我的项目引用了IIS7 URL重写模块,但是还没有安装到新服务器上。安装它解决了我的问题。
You can use the Microsoft Web Platform Installer to install it. Execute it, select Products, in the left menu select Server and find URL Rewrite in the list and install it.
您可以使用Microsoft Web Platform安装程序来安装它。执行它,选择产品,在左侧菜单选择服务器,并在列表中找到URL重写并安装它。
Or you can download it here.
或者你可以在这里下载。
#2
39
After battling with this for a day on a new machine I came across the following links. I was missing the rewrite modules. This fixed everything.
在一个新机器上花了一天的时间,我发现了下面的链接。我错过了重写模块。这个固定的一切。
http://forums.iis.net/t/1176834.aspx
http://forums.iis.net/t/1176834.aspx
http://learn.iis.net/page.aspx/460/using-the-url-rewrite-module/
http://learn.iis.net/page.aspx/460/using-the-url-rewrite-module/
#3
33
Aha! I beat this problem! My god, it was a beast for someone like me with limited IIS experience. I really thought I was going to be spending all weekend fixing it.
啊哈!我打这个问题!我的上帝,对于像我这样有有限的IIS经验的人来说,这简直是一头野兽。我真的以为我整个周末都在修理它。
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.
首先要注意的是:如果您希望这是您的解决方案,请确保您有相同的错误代码(0x8007000d)和配置源(-1:0:)。如果不是,这不是你的解决方案。
Next thing to be aware of: AJAX is not properly installed in your web.config!
接下来要注意的是:AJAX在您的web.config中没有正确安装。
Fix that by following this guide:
http://www.asp.net/AJAX/documentation/live/ConfiguringASPNETAJAX.aspx
通过以下指南解决这个问题:http://www.asp.net/AJAX/documentation/live/ConfiguringASPNETAJAX.aspx。
Then, install the AJAX 1.0 extensions on your production server, from this link:
然后,在您的生产服务器上安装AJAX 1.0扩展,从这个链接:
http://www.asp.net/ajax/downloads/archive/
Update: Microsoft seems to have removed the above page :(http://www.asp.net/ajax/downloads/archive/更新:微软似乎已经删除了上面的页面:
That's it!
就是这样!
#4
11
Had the same problem as above, same error code etc. Setting up a local website on Windows 8. After much searching it was found that we were missing URL rewrite. After downloading it everything was fine. :)
与上面相同的问题,相同的错误代码等等。在Windows 8上设置一个本地网站。经过多次搜索,我们发现我们丢失了URL重写。下载后一切正常。:)
#5
6
I just add an answear because I spent hours trying to solve the same symptoms (but different issue):
我只是增加了一个答案,因为我花了几个小时试图解决相同的症状(但不同的问题):
A possible cause is a x86 dll in a 64 bits app pool, the solution is to enable 32 bits apps in the application pool settings.
可能的原因是64位应用程序池中的x86 dll,解决方案是在应用程序池设置中启用32位应用程序。
#6
4
Same issue on Server 2016, IIS 10, 500.19 error. I installed the redirect module and it worked. I do not know why this was not included by default.
同样的问题在服务器2016,IIS 10, 500.19错误。我安装了重定向模块,它成功了。我不知道为什么不包括在默认情况下。
https://www.iis.net/downloads/microsoft/url-rewrite#additionalDownloads
https://www.iis.net/downloads/microsoft/url-rewrite additionalDownloads
To be clear it looks like the web.config from IIS 7 will work, or is designed to work, but the lack of this module gives the really odd and unhelpful error. Googling takes you to a Microsoft page which insists that your site is corrupted or your web.config is corrupted. Neither seems to be the case.
很明显,它看起来像网络。来自IIS 7的配置将会工作,或者被设计用于工作,但是缺少这个模块会产生非常奇怪和无用的错误。Googling把你带到一个微软页面,它坚持你的网站已经损坏或者你的网站。配置是损坏的。似乎都不是这样。
That unhelpful page is here: https://support.microsoft.com/en-us/kb/942055
这个没有帮助的页面在这里:https://support.microsoft.com/en-us/kb/942055。
#7
3
For me, re-registering asp.net for iis did the trick. Hopefully that helps someone else.
对我来说,重新注册iis的asp.net就成功了。希望这能帮助别人。
aspnet_regiis.exe -i
#8
2
To sum up based on answers here and elsewhere:
根据这里和其他地方的答案来总结:
- Check the .NET version of the app pool (e.g. 2.0 vs 4.0)
- 查看。net版本的应用程序池(例如2.0和4.0)
- Check that all IIS referenced modules are installed. In this case it was the AJAX extensions (probably not the case these days), but URL Rewrite is a common one.
- 检查所有IIS引用模块是否已安装。在这种情况下,它是AJAX扩展(可能不是现在的情况),但是URL重写是很常见的。
#9
1
This may or not be related....I started off with the same error mentioned above, started googling, making changes, getting new errors, endless loop.
这可能或不相关....我从上面提到的错误开始,开始用谷歌搜索,做修改,得到新的错误,无休止的循环。
The change that got me by that error was messing with the Feature Delegation in IIS Manager under the Management section of the server. I'm sorry I can't remember which one I changed, but googling might help.
在服务器的管理部分中,这个错误导致的更改使IIS管理器中的特性委托变得混乱。很抱歉,我不记得我改了哪一个,但谷歌搜索可能会有帮助。
That got me past the 1st error into a whole new stream of others, some totally nonsensical. (I would get one error when running under a virtual directory, converting it to an application yielded another error, etec etc). What finally solved this series of errors was: IIS manager, Application Pools, DefaultAppPool, Enable 32-Bit applications=True
这让我从第一个错误变成了另一个全新的流,有些完全荒谬。(在虚拟目录下运行时,我将得到一个错误,将其转换为应用程序会产生另一个错误,etec等)。最终解决了这一系列错误的是:IIS管理器、应用程序池、DefaultAppPool,允许32位应用程序=True !
I had started this app on a 32 bit windows xp box, and I am now running it on a 64Bit Windows 7 box.
我在一个32位的windows xp系统上启动了这个应用程序,现在我正在一个64位的windows 7框中运行它。
So hopefully this helps someone else.
希望这能帮助别人。
#10
1
My IIS 7.5 does not understand tag in web.config In VS 2010 it is underline that tag also. Check your config file accurate to find all underlined tags. I put it in the comment and error goes away.
我的IIS 7.5不理解web上的标签。在VS 2010的配置中,也有标记。检查你的配置文件是否准确找到所有带下划线的标签。我把它放在评论里,错误就消失了。
#11
1
Comment the following lines in the web.config file.
请在web上评论以下几行。配置文件。
<modules>
<!--<add name="ScriptModule" preCondition="integratedMode" type="System.Web.Handlers.ScriptModule, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/>-->
</modules>
<handlers>
<remove name="WebServiceHandlerFactory-ISAPI-2.0"/>
<!--<add name="ScriptHandlerFactory" verb="*" path="*.asmx" preCondition="integratedMode" type="System.Web.Script.Services.ScriptHandlerFactory, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/>
<add name="ScriptResource" verb="GET" path="ScriptResource.axd" type="System.Web.Handlers.ScriptResourceHandler, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/>-->
</handlers>
This will work.
这将工作。
#12
1
I had the same error. I had an IIS site with .net framework version 2.0, but my app needed 4.0. I changed the version and it worked.
我犯了同样的错误。我有一个使用。net framework 2.0的IIS站点,但是我的应用程序需要4.0。我改变了版本,它成功了。
Posting just as a reminder if someone might have the same issue.
如果有人可能有同样的问题,你可以在网上发帖提醒自己。
#13
1
Another way of getting 500.19 errot for no apparent reason is - missing directories and/or broken permissions on them.
另一种获得500.19 errot的方法是没有明显的原因,即丢失目录和/或对它们的破坏权限。
In case of this question, I believe the question asks about full IIS version. I assume this because of this line:
对于这个问题,我认为问题是关于完整的IIS版本。我假设这是因为这条线:
Config File \\?\E:\wwwroot\web.config
IIS installer usually creates the wwwroot
for you and that's the default root folder for all websites and mount point for virtual directories. It always exists, so no problem, you usually don't care much about that.
IIS安装程序通常为您创建wwwroot,这是所有网站的默认根文件夹和虚拟目录的挂载点。它总是存在的,所以没问题,你通常不太关心它。
Since web.config files are hierarchical, you can put there a master web.config file and have some root settings there, and all sites will inherit it. IIS checks if that file exists and tries to load it.
自网络。配置文件是分等级的,你可以把它放到主网页上。配置文件并在那里有一些根设置,所有的站点都将继承它。IIS检查该文件是否存在并试图加载它。
However, first fun part:
然而,第一个有趣的部分:
This directory will exists if you have IIS properly installed. If it does not exist, you will get 500-class error. However, if you play with file/directory permissions, especially 'advanced' ones, you can actually accidentally deny IIS service account from scanning/reading the contents of this directory. If IIS is unable to check if that wwwroot\web.config exists, or if it exists and IIS is not able to open&read it - bam - 500-class error.
如果您已经正确安装了IIS,这个目录将会存在。如果它不存在,您将得到500级的错误。但是,如果您使用文件/目录权限,特别是“高级”权限,您实际上可能会在扫描/读取该目录的内容时意外地拒绝IIS服务帐户。如果IIS无法检查wwwroot\web。配置存在,或者如果它存在,IIS无法打开和读取它——bam - 500级错误。
However, for full IIS it is very unlikely. Developers/Admins working with full IIS are usually reluctant regarding playing with wwwroot
so it usually stays properly configured.
然而,对于完整的IIS,这是非常不可能的。使用完整IIS的开发人员/管理员通常不愿意使用wwwroot,因此它通常会保持正确的配置。
However, on IIS Express..
Usually, IIS Express "just works". Often, developers using IIS Express often are not aware how much internally it resembles the real IIS.
通常,IIS Express“只是工作”。通常,使用IIS Express的开发人员通常不知道它在内部有多少类似于真正的IIS。
You can easily stumble upon the fact that IIS Express has its own applicationHost.config file and VS creates and manages it for you (correctly, to some extent) and that sort of an eye-opener telling you that it's not that simple and point-and-click as it seems at first.
您可以很容易地发现,IIS Express有自己的applicationHost。配置文件和VS为你创建和管理它(在某种程度上是正确的),这让你大开眼界,告诉你它并不是那么简单和简单的。
Aside from that config file, VisualStudio also creates an empty directory structure under your Documents
folder. If I remember correctly, IIS Express considers these folders to be the root directories of your website(s) upon which virtual directories with your code are mounted.
除了配置文件之外,VisualStudio还在文档文件夹下创建了一个空目录结构。如果我没记错的话,IIS Express认为这些文件夹是你的网站的根目录,你的代码的虚拟目录被安装在上面。
Later, just like IIS, when IIS Express starts up, it expects these folders to exist and checks for root web.config files there. The site web.config files. Almost always, these web.config files are missing - and that's OK because you don't want them - you have your **application web.config", they are placed with rest of the content in a virtual directories.
稍后,与IIS一样,当IIS Express启动时,它希望这些文件夹存在并检查根web。配置文件。网站网页。配置文件。几乎总是,这些网络。配置文件丢失了——这没关系,因为你不想要它们——你有你的**应用程序网络。配置“,它们被放置在虚拟目录中的其他内容中。
Now, the second fun part is: IIS Express expects that empty directories. They can be empty, but they need to exist. If they don't exist - you will get a 500-class error telling you that "web.config" file at that path cannot be accessed.
现在,第二个有趣的部分是:IIS Express期望空目录。它们可以是空的,但它们需要存在。如果它们不存在,你会得到一个500级的错误告诉你“网络”。无法访问该路径的配置文件。
The first time I bumped into this problem was when I was clearing my hard drive. I found that 'documents\websites' folder, full of trash, I recognized several year-old projects I no longer work on, all empty, not a single file, so I deleted it all. A week later - bam - I cannot run/debug any of the sites I was working at the moment. Error was 500.19, cannot read config file.
我第一次碰到这个问题是在我清理硬盘的时候。我发现“文档\网站”文件夹里,到处都是垃圾,我发现了好几年的项目,都是空的,没有一个文件,所以我把它全部删除了。一个星期后-我不能运行/调试我正在工作的任何网站。错误是500.19,不能读取配置文件。
So, if you use IIS Express and see 500-class error telling about reading configuration, carefully check the error message and read all paths mentioned. If you see anything like:
因此,如果您使用IIS Express并看到500级的错误,说明读取配置,仔细检查错误消息并读取所提到的所有路径。如果你看到类似的东西:
c:\users\user\documents\visual studio 2013\projects\WebProject1\WebProject1.web\web.config
c:\users\zeshan.munir\documents\visual studio 2015\projects\WebProject1\WebProject1.web\web.config
c:\users\zeshan.munir\documents\visual studio 2017\projects\WebProject1\WebProject1.web\web.config
etc..
Go there exactly where the error indicates, ensure that these folders exist, ensure that IIS worker account can traverse and read them, and if you notice that anything's wrong, maybe it will be that.
精确到错误指示的地方,确保这些文件夹存在,确保IIS工作者帐户可以遍历并读取它们,如果您注意到任何错误,可能就是这样。
BTW. In VisualStudio, on ProjectProperties/Web there's a button "Create Virtual Directory". It essentially does this very thing, so you may try it first, but IIRC it can also somethimes clear/overwrite/swap configuration sections in applicationHost.config file, so be careful with that button if you have any custom setups there.
顺便说一句。在VisualStudio中,在ProjectProperties/Web上有一个按钮“创建虚拟目录”。它本质上是这样做的,所以您可以先尝试它,但是IIRC也可以在applicationHost中使用一些清除/覆盖/交换配置节。配置文件,如果您有任何自定义设置,请小心使用该按钮。
#14
0
I had the same issue in Windows 7.
我在Windows 7中也遇到过同样的问题。
The solution was to go to basic settings > connect as > specific user - and log in as a user, instead of the default 'pass-through'
解决方案是将>作为>的特定用户连接到基本设置中,作为用户登录,而不是默认的“传递”。
This fixed the issue for me.
这解决了我的问题。
#15
0
Windows 7
Windows 7
Try this,
试试这个,
run cmd as Admin.
作为管理员运行cmd。
Unistall all iis.
Unistall iis。
start /w pkgmgr.exe /uu:IIS-WebServerRole;WAS-WindowsActivationService
Reinstall iis and normaly it's work
重新安装iis和normaly它是工作。
Alain
阿兰
#16
0
I got this error by putting the <customErrors>
tag inside of <system.webServer>
instead of <system.web>
where it belongs. There was a little squiggle under the <customErrors>
tag but I didn't notice it right away.
我通过将
#1
227
I had these exact symptoms and my issue was similar to Peter's. Was setting up an existing project on a new server. My project referenced the IIS7 URL Rewriting module, but that hadn't been installed yet on the new server. Installing it fixed my issue.
我有这些确切的症状,我的问题和彼得的相似。正在一个新的服务器上建立一个现有的项目。我的项目引用了IIS7 URL重写模块,但是还没有安装到新服务器上。安装它解决了我的问题。
You can use the Microsoft Web Platform Installer to install it. Execute it, select Products, in the left menu select Server and find URL Rewrite in the list and install it.
您可以使用Microsoft Web Platform安装程序来安装它。执行它,选择产品,在左侧菜单选择服务器,并在列表中找到URL重写并安装它。
Or you can download it here.
或者你可以在这里下载。
#2
39
After battling with this for a day on a new machine I came across the following links. I was missing the rewrite modules. This fixed everything.
在一个新机器上花了一天的时间,我发现了下面的链接。我错过了重写模块。这个固定的一切。
http://forums.iis.net/t/1176834.aspx
http://forums.iis.net/t/1176834.aspx
http://learn.iis.net/page.aspx/460/using-the-url-rewrite-module/
http://learn.iis.net/page.aspx/460/using-the-url-rewrite-module/
#3
33
Aha! I beat this problem! My god, it was a beast for someone like me with limited IIS experience. I really thought I was going to be spending all weekend fixing it.
啊哈!我打这个问题!我的上帝,对于像我这样有有限的IIS经验的人来说,这简直是一头野兽。我真的以为我整个周末都在修理它。
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.
首先要注意的是:如果您希望这是您的解决方案,请确保您有相同的错误代码(0x8007000d)和配置源(-1:0:)。如果不是,这不是你的解决方案。
Next thing to be aware of: AJAX is not properly installed in your web.config!
接下来要注意的是:AJAX在您的web.config中没有正确安装。
Fix that by following this guide:
http://www.asp.net/AJAX/documentation/live/ConfiguringASPNETAJAX.aspx
通过以下指南解决这个问题:http://www.asp.net/AJAX/documentation/live/ConfiguringASPNETAJAX.aspx。
Then, install the AJAX 1.0 extensions on your production server, from this link:
然后,在您的生产服务器上安装AJAX 1.0扩展,从这个链接:
http://www.asp.net/ajax/downloads/archive/
Update: Microsoft seems to have removed the above page :(http://www.asp.net/ajax/downloads/archive/更新:微软似乎已经删除了上面的页面:
That's it!
就是这样!
#4
11
Had the same problem as above, same error code etc. Setting up a local website on Windows 8. After much searching it was found that we were missing URL rewrite. After downloading it everything was fine. :)
与上面相同的问题,相同的错误代码等等。在Windows 8上设置一个本地网站。经过多次搜索,我们发现我们丢失了URL重写。下载后一切正常。:)
#5
6
I just add an answear because I spent hours trying to solve the same symptoms (but different issue):
我只是增加了一个答案,因为我花了几个小时试图解决相同的症状(但不同的问题):
A possible cause is a x86 dll in a 64 bits app pool, the solution is to enable 32 bits apps in the application pool settings.
可能的原因是64位应用程序池中的x86 dll,解决方案是在应用程序池设置中启用32位应用程序。
#6
4
Same issue on Server 2016, IIS 10, 500.19 error. I installed the redirect module and it worked. I do not know why this was not included by default.
同样的问题在服务器2016,IIS 10, 500.19错误。我安装了重定向模块,它成功了。我不知道为什么不包括在默认情况下。
https://www.iis.net/downloads/microsoft/url-rewrite#additionalDownloads
https://www.iis.net/downloads/microsoft/url-rewrite additionalDownloads
To be clear it looks like the web.config from IIS 7 will work, or is designed to work, but the lack of this module gives the really odd and unhelpful error. Googling takes you to a Microsoft page which insists that your site is corrupted or your web.config is corrupted. Neither seems to be the case.
很明显,它看起来像网络。来自IIS 7的配置将会工作,或者被设计用于工作,但是缺少这个模块会产生非常奇怪和无用的错误。Googling把你带到一个微软页面,它坚持你的网站已经损坏或者你的网站。配置是损坏的。似乎都不是这样。
That unhelpful page is here: https://support.microsoft.com/en-us/kb/942055
这个没有帮助的页面在这里:https://support.microsoft.com/en-us/kb/942055。
#7
3
For me, re-registering asp.net for iis did the trick. Hopefully that helps someone else.
对我来说,重新注册iis的asp.net就成功了。希望这能帮助别人。
aspnet_regiis.exe -i
#8
2
To sum up based on answers here and elsewhere:
根据这里和其他地方的答案来总结:
- Check the .NET version of the app pool (e.g. 2.0 vs 4.0)
- 查看。net版本的应用程序池(例如2.0和4.0)
- Check that all IIS referenced modules are installed. In this case it was the AJAX extensions (probably not the case these days), but URL Rewrite is a common one.
- 检查所有IIS引用模块是否已安装。在这种情况下,它是AJAX扩展(可能不是现在的情况),但是URL重写是很常见的。
#9
1
This may or not be related....I started off with the same error mentioned above, started googling, making changes, getting new errors, endless loop.
这可能或不相关....我从上面提到的错误开始,开始用谷歌搜索,做修改,得到新的错误,无休止的循环。
The change that got me by that error was messing with the Feature Delegation in IIS Manager under the Management section of the server. I'm sorry I can't remember which one I changed, but googling might help.
在服务器的管理部分中,这个错误导致的更改使IIS管理器中的特性委托变得混乱。很抱歉,我不记得我改了哪一个,但谷歌搜索可能会有帮助。
That got me past the 1st error into a whole new stream of others, some totally nonsensical. (I would get one error when running under a virtual directory, converting it to an application yielded another error, etec etc). What finally solved this series of errors was: IIS manager, Application Pools, DefaultAppPool, Enable 32-Bit applications=True
这让我从第一个错误变成了另一个全新的流,有些完全荒谬。(在虚拟目录下运行时,我将得到一个错误,将其转换为应用程序会产生另一个错误,etec等)。最终解决了这一系列错误的是:IIS管理器、应用程序池、DefaultAppPool,允许32位应用程序=True !
I had started this app on a 32 bit windows xp box, and I am now running it on a 64Bit Windows 7 box.
我在一个32位的windows xp系统上启动了这个应用程序,现在我正在一个64位的windows 7框中运行它。
So hopefully this helps someone else.
希望这能帮助别人。
#10
1
My IIS 7.5 does not understand tag in web.config In VS 2010 it is underline that tag also. Check your config file accurate to find all underlined tags. I put it in the comment and error goes away.
我的IIS 7.5不理解web上的标签。在VS 2010的配置中,也有标记。检查你的配置文件是否准确找到所有带下划线的标签。我把它放在评论里,错误就消失了。
#11
1
Comment the following lines in the web.config file.
请在web上评论以下几行。配置文件。
<modules>
<!--<add name="ScriptModule" preCondition="integratedMode" type="System.Web.Handlers.ScriptModule, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/>-->
</modules>
<handlers>
<remove name="WebServiceHandlerFactory-ISAPI-2.0"/>
<!--<add name="ScriptHandlerFactory" verb="*" path="*.asmx" preCondition="integratedMode" type="System.Web.Script.Services.ScriptHandlerFactory, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/>
<add name="ScriptResource" verb="GET" path="ScriptResource.axd" type="System.Web.Handlers.ScriptResourceHandler, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/>-->
</handlers>
This will work.
这将工作。
#12
1
I had the same error. I had an IIS site with .net framework version 2.0, but my app needed 4.0. I changed the version and it worked.
我犯了同样的错误。我有一个使用。net framework 2.0的IIS站点,但是我的应用程序需要4.0。我改变了版本,它成功了。
Posting just as a reminder if someone might have the same issue.
如果有人可能有同样的问题,你可以在网上发帖提醒自己。
#13
1
Another way of getting 500.19 errot for no apparent reason is - missing directories and/or broken permissions on them.
另一种获得500.19 errot的方法是没有明显的原因,即丢失目录和/或对它们的破坏权限。
In case of this question, I believe the question asks about full IIS version. I assume this because of this line:
对于这个问题,我认为问题是关于完整的IIS版本。我假设这是因为这条线:
Config File \\?\E:\wwwroot\web.config
IIS installer usually creates the wwwroot
for you and that's the default root folder for all websites and mount point for virtual directories. It always exists, so no problem, you usually don't care much about that.
IIS安装程序通常为您创建wwwroot,这是所有网站的默认根文件夹和虚拟目录的挂载点。它总是存在的,所以没问题,你通常不太关心它。
Since web.config files are hierarchical, you can put there a master web.config file and have some root settings there, and all sites will inherit it. IIS checks if that file exists and tries to load it.
自网络。配置文件是分等级的,你可以把它放到主网页上。配置文件并在那里有一些根设置,所有的站点都将继承它。IIS检查该文件是否存在并试图加载它。
However, first fun part:
然而,第一个有趣的部分:
This directory will exists if you have IIS properly installed. If it does not exist, you will get 500-class error. However, if you play with file/directory permissions, especially 'advanced' ones, you can actually accidentally deny IIS service account from scanning/reading the contents of this directory. If IIS is unable to check if that wwwroot\web.config exists, or if it exists and IIS is not able to open&read it - bam - 500-class error.
如果您已经正确安装了IIS,这个目录将会存在。如果它不存在,您将得到500级的错误。但是,如果您使用文件/目录权限,特别是“高级”权限,您实际上可能会在扫描/读取该目录的内容时意外地拒绝IIS服务帐户。如果IIS无法检查wwwroot\web。配置存在,或者如果它存在,IIS无法打开和读取它——bam - 500级错误。
However, for full IIS it is very unlikely. Developers/Admins working with full IIS are usually reluctant regarding playing with wwwroot
so it usually stays properly configured.
然而,对于完整的IIS,这是非常不可能的。使用完整IIS的开发人员/管理员通常不愿意使用wwwroot,因此它通常会保持正确的配置。
However, on IIS Express..
Usually, IIS Express "just works". Often, developers using IIS Express often are not aware how much internally it resembles the real IIS.
通常,IIS Express“只是工作”。通常,使用IIS Express的开发人员通常不知道它在内部有多少类似于真正的IIS。
You can easily stumble upon the fact that IIS Express has its own applicationHost.config file and VS creates and manages it for you (correctly, to some extent) and that sort of an eye-opener telling you that it's not that simple and point-and-click as it seems at first.
您可以很容易地发现,IIS Express有自己的applicationHost。配置文件和VS为你创建和管理它(在某种程度上是正确的),这让你大开眼界,告诉你它并不是那么简单和简单的。
Aside from that config file, VisualStudio also creates an empty directory structure under your Documents
folder. If I remember correctly, IIS Express considers these folders to be the root directories of your website(s) upon which virtual directories with your code are mounted.
除了配置文件之外,VisualStudio还在文档文件夹下创建了一个空目录结构。如果我没记错的话,IIS Express认为这些文件夹是你的网站的根目录,你的代码的虚拟目录被安装在上面。
Later, just like IIS, when IIS Express starts up, it expects these folders to exist and checks for root web.config files there. The site web.config files. Almost always, these web.config files are missing - and that's OK because you don't want them - you have your **application web.config", they are placed with rest of the content in a virtual directories.
稍后,与IIS一样,当IIS Express启动时,它希望这些文件夹存在并检查根web。配置文件。网站网页。配置文件。几乎总是,这些网络。配置文件丢失了——这没关系,因为你不想要它们——你有你的**应用程序网络。配置“,它们被放置在虚拟目录中的其他内容中。
Now, the second fun part is: IIS Express expects that empty directories. They can be empty, but they need to exist. If they don't exist - you will get a 500-class error telling you that "web.config" file at that path cannot be accessed.
现在,第二个有趣的部分是:IIS Express期望空目录。它们可以是空的,但它们需要存在。如果它们不存在,你会得到一个500级的错误告诉你“网络”。无法访问该路径的配置文件。
The first time I bumped into this problem was when I was clearing my hard drive. I found that 'documents\websites' folder, full of trash, I recognized several year-old projects I no longer work on, all empty, not a single file, so I deleted it all. A week later - bam - I cannot run/debug any of the sites I was working at the moment. Error was 500.19, cannot read config file.
我第一次碰到这个问题是在我清理硬盘的时候。我发现“文档\网站”文件夹里,到处都是垃圾,我发现了好几年的项目,都是空的,没有一个文件,所以我把它全部删除了。一个星期后-我不能运行/调试我正在工作的任何网站。错误是500.19,不能读取配置文件。
So, if you use IIS Express and see 500-class error telling about reading configuration, carefully check the error message and read all paths mentioned. If you see anything like:
因此,如果您使用IIS Express并看到500级的错误,说明读取配置,仔细检查错误消息并读取所提到的所有路径。如果你看到类似的东西:
c:\users\user\documents\visual studio 2013\projects\WebProject1\WebProject1.web\web.config
c:\users\zeshan.munir\documents\visual studio 2015\projects\WebProject1\WebProject1.web\web.config
c:\users\zeshan.munir\documents\visual studio 2017\projects\WebProject1\WebProject1.web\web.config
etc..
Go there exactly where the error indicates, ensure that these folders exist, ensure that IIS worker account can traverse and read them, and if you notice that anything's wrong, maybe it will be that.
精确到错误指示的地方,确保这些文件夹存在,确保IIS工作者帐户可以遍历并读取它们,如果您注意到任何错误,可能就是这样。
BTW. In VisualStudio, on ProjectProperties/Web there's a button "Create Virtual Directory". It essentially does this very thing, so you may try it first, but IIRC it can also somethimes clear/overwrite/swap configuration sections in applicationHost.config file, so be careful with that button if you have any custom setups there.
顺便说一句。在VisualStudio中,在ProjectProperties/Web上有一个按钮“创建虚拟目录”。它本质上是这样做的,所以您可以先尝试它,但是IIRC也可以在applicationHost中使用一些清除/覆盖/交换配置节。配置文件,如果您有任何自定义设置,请小心使用该按钮。
#14
0
I had the same issue in Windows 7.
我在Windows 7中也遇到过同样的问题。
The solution was to go to basic settings > connect as > specific user - and log in as a user, instead of the default 'pass-through'
解决方案是将>作为>的特定用户连接到基本设置中,作为用户登录,而不是默认的“传递”。
This fixed the issue for me.
这解决了我的问题。
#15
0
Windows 7
Windows 7
Try this,
试试这个,
run cmd as Admin.
作为管理员运行cmd。
Unistall all iis.
Unistall iis。
start /w pkgmgr.exe /uu:IIS-WebServerRole;WAS-WindowsActivationService
Reinstall iis and normaly it's work
重新安装iis和normaly它是工作。
Alain
阿兰
#16
0
I got this error by putting the <customErrors>
tag inside of <system.webServer>
instead of <system.web>
where it belongs. There was a little squiggle under the <customErrors>
tag but I didn't notice it right away.
我通过将