简体   繁体   中英

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

在此输入图像描述

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.

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 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's comment is correct. If that is checked, and .net45 installed later, it installs with those features.

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.

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.

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.

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.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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