WCF .NET 4.5的Windows Server 2008 R2上NET、WCF、Windows、Server

2023-09-02 10:40:00 作者:浮伤年华ㄣ撒下一地悲凉

在Windows Server 2008 R2中,我无法激活WCF的Http / TCP激活窗口功能为.NET 4.5的服务器管理器

In Windows Server 2008 R2, I cannot activate WCF Http/Tcp Activation windows features for .net 4.5 from Server Manager

在Windows Server 2008服务器管理器R2不支持.NET 4.5,尽管.NET 4.5可以安装和使用IIS的Windows Server 2008 R2。

Server manager in Windows Server 2008 R2 does not support .net 4.5, even though .net 4.5 can be installed and used in IIS in Windows Server 2008 R2.

我可以在我的本地Windows 8激活,使用开启/关闭窗口Windows功能。同样打开Windows功能在Windows Server /关闭窗口的链接2008带您进入服务器管理器

I can activate in my local Windows 8, using Turn Windows feature on/off window. The same Turn Windows feature on/off window link in Windows Server 2008 takes you to Server Manager

PowerShell还不能在服务器2008 列出。如何在Windows Server 2008上安装HTTP激活和TCP激活下.NET框架4.5高级服务WCF服务?

Powershell also does not list it on Server 2008. How to install HTTP Activation and TCP Activation for WCF services under .NET Framework 4.5 Advanced Services in Windows Server 2008?

推荐答案

P_G的评论是正确的。如果被选中,后来.net45安装,它有这些特性的安装。

P_G's comment is correct. If that is checked, and .net45 installed later, it installs with those features.

我想打开它的.net45主要是为了修复< system.serviceModel> 部分没有定义的错误,如果WCF激活服务没有运行时出现。

I wanted to turn it on for .net45 primarily to fix the <system.serviceModel> section not defined error, that occurs if WCF activation services are not running.

我还注意到,PowerShell中继续使用时抛出上述错误,设置WebConfigurationProperty 这是因为PowerShell中的Server 2008中试图解析从web.config中。净2.0上下文(.NET 3.5和3.0股的配置文件的位置与.NET 2.0 - C: WINDOWS Microsoft.NET Framework64 V2.0.50727 CONFIG machine.config的)和失败 - 因为在那个位置system.serviceModel是没有定义

I also noticed that powershell continues to throw the above error, when using Set-WebConfigurationProperty This is because powershell in server 2008 tries to parse the web.config from a .net 2.0 context (.net 3.5 and 3.0 shares config files location with .net 2.0 - c:WindowsMicrosoft.NETFramework64v2.0.50727configmachine.config) and fails - because in that location system.serviceModel is not defined there.

应用程序但是工作得很好,因为IIS网站使用( C: WINDOWS Microsoft.NET Framework64 v4.0.30319 CONFIG machine.config的)和它的是的定义存在。

The application however works fine, because the IIS website uses (c:WindowsMicrosoft.NETFramework64v4.0.30319configmachine.config) and it is defined there.

检查复选框定义部分C: WINDOWS Microsoft.NET Framework64 V2.0.50727 CONFIG machine.config的以及 - 这样的PowerShell也可以现在分析的web.config和设置IIS属性。

Checking that checkbox defines the section in c:WindowsMicrosoft.NETFramework64v2.0.50727configmachine.config as well - so powershell can also now parse web.config and set-iis properties.