无法在 Windows 8 上的 IIS 中提供 WCF 服务 [英] Cannot serve WCF services in IIS on Windows 8

查看:31
本文介绍了无法在 Windows 8 上的 IIS 中提供 WCF 服务的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

当我尝试在 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 -i,但此命令似乎已在 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.)

推荐答案

似乎很简单;应使用 Programs and Features -> 启用 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屋!

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