IIS Express Error http 404.17 – not found running a WCF service
Asked Answered
P

3

11

I just created a WCF Service Application in VS2013 with framework 3.5. for exposing some methods I have in a class library project.

Everything went fine but when I tried to see if the service runs, it doesn't. Instead I got the next error.

HTTP Error 404.17 - Not Found The requested content appears to be script and will not be served by the static file handler.

Most likely causes: The request matched a wildcard mime map. The request is mapped to the static file handler. If there were different pre-conditions, the request will map to a different handler.

Things you can try: If you want to serve this content as a static file, add an explicit MIME map.

I have dealt with it on IIS, but now in IIS Expres I'm kinda lost.

I don't have IIS installed on this machine since I'm using a remote one, but I need to debug some things and I'm stuck. Thanks for any help.

I also did run servicesmodelreg -i with visual command prompt, but error persists.

UPDATE

It may be usefull to clarfy it only happens in IIS Express so it is impacting development. I have VS2013 updated to the latest patch running on Win 8.1 64bit

Palmira answered 5/3, 2014 at 15:11 Comment(0)
C
19

Try to run "C:\Program Files\IIS Express>Wscript.exe WCF35Setup.js install" that is a script for enabling WCF 3.5 service on IIS Express. Reference : http://www.iis.net/learn/extensions/introduction-to-iis-express/iis-75-express-readme

Collagen answered 11/3, 2014 at 11:38 Comment(6)
How? I just did that but the error persist. I also found this, but not working either. I just updated a bit the entryPalmira
this gasparnagy.com/2014/01/enable-net-4-0-wcf-hosing-in-iis-8/…Palmira
When running the command you indicate, does not seem to happen anything, nor good nor bad. And the mistake still persists. Any clarification would be gladPalmira
I used the exact following command on cmd.exe: C:\Program Files\IIS Express>Wscript.exe WCF35Setup.js install Worked smoothly thanks.Cammiecammy
This was also my error on Windows 8.1 Using VS 2013 on iis express.Stauffer
Not working for me. Again, need clarification for this answer.Albino
H
7

Seems WCF mapping are not registered with IIS.

To solve the above error:

  • Navigate to "

    %SYSTEMROOT%\Microsoft.NET\Framework\v3.0\Windows Communication Foundation

" at the Visual Studio command prompt.

  • Execute "servicemodelreg -i" to install the mappings manually.

For more details refer :ServiceModel Registration Tool (ServiceModelReg.exe) on MSDN.

-

Alternatively,

enable HTTP Activation for WCF services in Windows features.

  1. Click the Start button, and then click Control Panel.
  2. Click Programs, and then click Programs and Features.
  3. On the Tasks menu, click Turn Windows features on or off.
  4. Select the WCF Non-Http Activation Components box and save the setting.

enter image description here

Source :

http://msdn.microsoft.com/en-us/library/ms732012(v=vs.110).aspx

Hoffert answered 7/7, 2014 at 8:53 Comment(4)
I have done that, and I suppose if I deploy it to my IIS, it should work... I´ll give it a try just to see how linked are IIS and IISExpress. This issue is only on debugging. The component is already deployed on customer servers and working smoothPalmira
Might be WCF mapping are not registered with IIS on your machine but since it is good on customer server where is hosted it works...Hoffert
it is also causing that I can not add a service reference on dev time. I post that issue here #24560058Palmira
Enabling HTTP Activation solved my problem. ThanksMellette
W
2

After trying all the recommended solutions suggested here up to this point:

  • servicemodelreg -i
  • Wscript.exe WCF35Setup.js install
  • enable HTTP Activation

And a few others suggested elsewhere:

  • Run Visual Studio as Admin
  • Use "Local IIS" instead of IIS Express

I finally determined what my issue was. The WCF code was targeting .NET framework 3.0, and I had not enabled IIS support for 3.0/3.5! The solution was simple. Enable ".NET Extensibilty 3.5 and ASP.NET 3.5".

Enable Features

Watt answered 8/2, 2017 at 17:20 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.