简体   繁体   English

Windows Server 2008 R2上的WCF .NET 4.5

[英]WCF .NET 4.5 on Windows Server 2008 R2

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的WCF Http / Tcp激活窗口功能

在此输入图像描述

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 Server 2008 R2中的服务器管理器不支持.net 4.5,即使.net 4.5可以在Windows Server 2008 R2的IIS中安装和使用。

I can activate in my local Windows 8, using Turn Windows feature on/off window. 我可以使用Turn Windows功能开/关窗口在我的本地Windows 8中激活。 The same Turn Windows feature on/off window link in Windows Server 2008 takes you to Server Manager Windows Server 2008中相同的Turn Windows功能开/关窗口链接将您带到服务器管理器

在此输入图像描述

Powershell also does not list it on Server 2008 . Powershell也没有在Server 2008上列出它 How to install HTTP Activation and TCP Activation for WCF services under .NET Framework 4.5 Advanced Services in Windows Server 2008? 如何在Windows Server 2008中的.NET Framework 4.5高级服务下为WCF服务安装HTTP激活和TCP激活?

P_G's comment is correct. P_G的评论是正确的。 If that is checked, and .net45 installed later, it installs with those features. 如果选中此选项并稍后安装.net45,则会安装这些功能。

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. 我想为.net45打开它主要是为了修复<system.serviceModel>部分未定义错误,如果WCF激活服务没有运行则会发生错误。

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:\\Windows\\Microsoft.NET\\Framework64\\v2.0.50727\\config\\machine.config ) and fails - because in that location system.serviceModel is not defined there. 我还注意到,当使用Set-WebConfigurationProperty时,powershell继续抛出上述错误这是因为服务器2008中的powershell尝试从.net 2.0上下文解析web.config(.net 3.5和3.0共享配置文件位置.net 2.0 - c:\\Windows\\Microsoft.NET\\Framework64\\v2.0.50727\\config\\machine.config )并失败 - 因为在那个位置system.serviceModel没有在那里定义。

The application however works fine, because the IIS website uses ( c:\\Windows\\Microsoft.NET\\Framework64\\v4.0.30319\\config\\machine.config ) and it is defined there. 然而,应用程序工作正常,因为IIS网站使用( c:\\Windows\\Microsoft.NET\\Framework64\\v4.0.30319\\config\\machine.config ),它定义在那里。

Checking that checkbox defines the section in c:\\Windows\\Microsoft.NET\\Framework64\\v2.0.50727\\config\\machine.config as well - so powershell can also now parse web.config and set-iis properties. 选中该复选框也会定义c:\\Windows\\Microsoft.NET\\Framework64\\v2.0.50727\\config\\machine.config中的部分 - 所以powershell现在也可以解析web.config和set-iis属性。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM