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

查看:29
本文介绍了Windows Server 2008 R2 上的 WCF .NET 4.5的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在 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,即使 .net 4.5 可以在 Windows Server 2008 R2 的 IIS 中安装和使用.

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 Server 2008 中相同的打开/关闭 Windows 功能"窗口链接会将您带到服务器管理器

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 也没有在 Server 2008 上列出.Windows Server 2008 下.NET Framework 4.5 Advanced Services下的WCF服务如何安装HTTP激活和TCP激活?

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 启用它,主要是为了修复 部分未定义错误,如果 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.

我还注意到,在使用 Set-WebConfigurationProperty 时,powershell 继续抛出上述错误,这是因为 server 2008 中的 powershell 试图从 .net 2.0 上下文(.net3.5 和 3.0 与 .net 2.0 共享配置文件位置 - c:WindowsMicrosoft.NETFramework64v2.0.50727configmachine.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:WindowsMicrosoft.NETFramework64v4.0.30319configmachine.config) 并且它 在那里定义.

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

检查复选框定义了 c:WindowsMicrosoft.NETFramework64v2.0.50727configmachine.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.

这篇关于Windows Server 2008 R2 上的 WCF .NET 4.5的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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