不同 Windows 上无法识别的属性“multipleSiteBindingsEnabled”问题
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/6413003/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
Unrecognized attribute 'multipleSiteBindingsEnabled' issue on different Windows
提问by Vladimir Dorokhov
I have a project built with target platform 3.5. I deployed it:
我有一个用目标平台 3.5 构建的项目。我部署了它:
- IIS 7
- Windows 7
- there is .NET 4 installed on machine
- Microsoft .NET Framework Version:2.0.50727.4961(from AppPool)
- ASP.NET Version:2.0.50727.4955(from AppPool)
- IIS 7
- Windows 7的
- 机器上安装了 .NET 4
- Microsoft .NET 框架版本:2.0.50727。4961(来自应用程序池)
- ASP.NET 版本:2.0.50727。4955(来自应用程序池)
Application failed.Parser Error Message: Unrecognized attribute 'multipleSiteBindingsEnabled'.Note that attribute names are case-sensitive.
申请失败。解析器错误消息:无法识别的属性“multipleSiteBindingsEnabled”。请注意,属性名称区分大小写。
I installed SP1 for Windows 7and now configuration is:
我为 Windows 7 安装了 SP1,现在配置是:
- IIS 7
- Windows 7
- there is .NET 4 installed on machine
- Microsoft .NET Framework Version:2.0.50727.5444(from AppPool)
- ASP.NET Version:2.0.50727.5420(from AppPool)
- IIS 7
- Windows 7的
- 机器上安装了 .NET 4
- Microsoft .NET 框架版本:2.0.50727。5444(来自应用程序池)
- ASP.NET 版本:2.0.50727。5420(来自应用程序池)
and now it works.
现在它起作用了。
Is this Windows 7 SP1 fix described somewhere? What about other Windows (XP, 2003, 2008 R2), is it some fix for them?
是否在某处描述了此 Windows 7 SP1 修复程序?其他 Windows (XP, 2003, 2008 R2) 怎么样,对它们有什么修复吗?
回答by patricgh
The problem is Application Pools. If the target .net framework is 4.0 on your Visual studio then convert the .net framework version from 2.0 to 4.0 in App pool. because when you host an application, by default it is set to version 2 in the pool. By clicking on the application pool which is for the app you can change the version to 4.0.
问题是应用程序池。如果您的 Visual Studio 上的目标 .net 框架是 4.0,则在应用程序池中将 .net 框架版本从 2.0 转换为 4.0。因为当您托管应用程序时,默认情况下它在池中设置为版本 2。通过单击应用程序的应用程序池,您可以将版本更改为 4.0。
回答by atconway
Since the attribute is only applicable to applications that target the .NET Framework 4.0, I would suggest removing it all together from your configuration. Even if you couldfind some notes buried in the documented SP1 release, it still does not help you any if you are targeting an older Framework like 3.5.
由于该属性仅适用于面向 .NET Framework 4.0 的应用程序,我建议将其从您的配置中全部删除。即使您可以在记录在案的 SP1 版本中找到一些注释,但如果您的目标是像 3.5 这样的旧框架,它仍然对您没有任何帮助。
MSDN link describing 'multipleSiteBindingsEnabled' attribute and its support: http://msdn.microsoft.com/en-us/library/system.servicemodel.servicehostingenvironment.multiplesitebindingsenabled.aspx
描述“multipleSiteBindingsEnabled”属性及其支持的 MSDN 链接:http: //msdn.microsoft.com/en-us/library/system.servicemodel.servicehostingenvironment.multiplesitebindingsenabled.aspx