无法添加具有唯一键属性“名称"设置为"ASP.Net_4.0_64bit"的“过滤器"类型的重复收集条目 [英] Cannot add duplicate collection entry of type 'filter' with unique key attribute 'name' set to 'ASP.Net_4.0_64bit'

查看:116
本文介绍了无法添加具有唯一键属性“名称"设置为"ASP.Net_4.0_64bit"的“过滤器"类型的重复收集条目的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经遇到这个问题已有一段时间了.当我打开指向我的本地主机的asp.net页面时,就会发生这种情况.我正在使用Visual Studio 2012和IIS 7.5运行Windows 2008 R2.

I have been running into this issue for quite some time. It occurs when I open up an asp.net page pointing to my localhost. I am running windows 2008 r2 with visual studio 2012 and iis 7.5.

它显示的配置源是这个. :

The config source that it shows is this. :

 1451:                 <remove name="ASP.NET_4.0.30319.0" />
 1452:                 <filter name="ASP.Net_4.0_64bit" path="C:\Windows\Microsoft.NET\Framework64\v4.0.30319\aspnet_filter.dll" enableCache="true" preCondition="runtimeVersionv4.0,bitness64" />
 1453:                 <filter name="ASP.Net_4.0_32bit" path="C:\Windows\Microsoft.NET\Framework\v4.0.30319\aspnet_filter.dll" enableCache="true" preCondition="runtimeVersionv4.0,bitness32" />

它显示它在1452行上出错.

It shows it is erroring on line 1452.

最初,这是inetsrv 32和64位位置中的applicationHost.config文件中的问题.我进去并删除了重复的4.0条目,它工作了好几个月.

Initially, it was an issue in the applicationHost.config file in the inetsrv 32 and 64bit locations. I went in and removed the duplicate 4.0 entry and it worked for a good couple of months.

然后它再次开始引发此错误.那时我只是完全重新安装了IIS,我的应用程序又开始工作了.

It then started throwing this error again. At that time I just did a full re-install of IIS and my application started working again.

再次开始发生此错误,我再次执行了IIS的完全重新安装,但这一次没有帮助,由于此重复的收集错误,我的应用程序继续出错.

Once again this error has started to occur, I once again performed a full reinstall of IIS but this time that does not help and my applications continue to error due to this duplicate collection error.

我相信所有这些都源于我很久以前就曾在此处进行详细介绍的ISAPI问题. :

I believe this all stems from an ISAPI issue I had long long ago prior to all of this which is detailed here. :

http://weblog.west-wind.com/posts/2011/Apr/04/Error-on-64-Bit-Install-of-IIS-LoadLibraryEx-failed-on-aspnetfilterdll

真的,我想知道是否有人看过这个.我真正感到困惑的是,如果我查看inetpub/temp/appPools位置中的temp applicationHost.config文件(这是正在运行的应用程序正在引用并对其进行错误处理的文件).我遇到的问题是,该应用程序正在使用的当前临时application.Host.config与inteserv位置中的临时temp.HostHost.config有所不同,因为它具有导致错误的ASP.NET_4.0.30319.0行.混乱之处在于,导致错误的这一行必须来自某些地方,但我无法在inetsrv位置或应用程序池位置中找到它,因此引起了我的困惑.

Really, I wondering if anyone else has seen this. Where I am really confused is if I look at the temp applicationHost.config file in the inetpub/temp/appPools location (this is the file that the application running is referencing and erroring on). The problem I have with this is that the current temp applicationHost.config that is being used by the application differs from the one found in the inteserv locations in that it has the ASP.NET_4.0.30319.0 line which is causing the error. The confusion is that this line causing the error has to be coming from some where but I cannot find it in the inetsrv locations or in the app pool locations, hence my confusion.

推荐答案

我认为大多数情况下都必须解决此问题,但如果有人仍然有此问题, 我使用VS 2017,过去在2015年遇到此问题.后来,当我设置2017时,我看到了这个不错的小选择,我相信可以解决我的问题.我希望它甚至可以解决您的问题.试一下.

I would assume that this must have been resolved for most, but in case if anyone still has this problem - I am having VS 2017 and i had this issue in the past on 2015. Later when i setup 2017, i see this nice little option that i believe resolved mine. And i hope it may even solve yours. Give a try.

并使用IIS Express,请参阅此 显示微小设置的Web项目属性屏幕截图

And using IIS Express, refer to this screenshot of Web project properties showing the tiny little settings

在我的情况下,作为64位操作系统,我必须显式设置x64(在bitness字段上).将其设置为Default或x86并没有运行我的mvc应用程序.

In my case, being 64 bit OS, i had to set the x64 explicitly (on the bitness field). Having it as Default or x86 didnt had my mvc app run.

这篇关于无法添加具有唯一键属性“名称"设置为"ASP.Net_4.0_64bit"的“过滤器"类型的重复收集条目的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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