无法在Windows 8上的IIS中提供WCF服务 [英] Cannot serve WCF services in IIS on Windows 8
问题描述
当我尝试在Windows 8计算机上的IIS上提供WCF服务时,我得到众所周知的错误
When I try to serve a WCF service on IIS in a Windows 8 machine, I get the well known error
页面你由于扩展配置,请求无法提供服务。如果页面是脚本,请添加处理程序。如果要下载文件,请添加MIME地图。
The page you are requesting cannot be served because of the extension configuration. If the page is a script, add a handler. If the file should be downloaded, add a MIME map.
旧的工作是运行 aspnet_regiis - 我
但是这个命令似乎在Windows 8中已被弃用,产生响应此版本的操作系统不支持此选项。 (...)
。
The old work around was to run aspnet_regiis -i
but this command seems to have been deprecated in Windows 8 yielding response This option is not supported on this version of the operating system. (...)
.
会有什么工作?
(我已成功启用常规 aspx
页面,因此大多数IIS配置看起来都很健康。)
(I have successfully enabled regular aspx
pages already, so most of the IIS config seems healthy.)
推荐答案
似乎没有脑子;应使用程序和功能 - >启用WCF服务。在控制面板中打开或关闭Windows功能
。转到 .NET Framework高级服务 - > WCF服务
并启用 HTTP激活
,如这篇关于mdsn的博客文章。
Seemed to be a no brainer; the WCF service should be enabled using Programs and Features -> Turn Windows features on or off
in the Control Panel. Go to .NET Framework Advanced Services -> WCF Services
and enable HTTP Activation
as described in this blog post on mdsn.
从命令提示符(作为管理员),您可以运行:
From the command prompt (as admin), you can run:
C:\> DISM /Online /Enable-Feature /FeatureName:WCF-HTTP-Activation
C:\> DISM /Online /Enable-Feature /FeatureName:WCF-HTTP-Activation45
如果收到错误则使用以下
If you get an error then use the below
C:\> DISM /Online /Enable-Feature /all /FeatureName:WCF-HTTP-Activation
C:\> DISM /Online /Enable-Feature /all /FeatureName:WCF-HTTP-Activation45
这篇关于无法在Windows 8上的IIS中提供WCF服务的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!