Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
242 views
in Technique[技术] by (71.8m points)

Cannot serve WCF services in IIS on Windows 8

When I try to serve a WCF service on IIS in a Windows 8 machine, I get the well known error

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.

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. (...).

What would be the work around?

(I have successfully enabled regular aspx pages already, so most of the IIS config seems healthy.)

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)

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

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

1.4m articles

1.4m replys

5 comments

56.9k users

...