Did you come across this article?

 

https://support.microsoft.com/en-au/kb/2023146

 

 

Regards

 

Adrian Halid 

 

From: ozdotnet-boun...@ozdotnet.com [mailto:ozdotnet-boun...@ozdotnet.com] On 
Behalf Of Greg Keogh
Sent: Wednesday, 18 January 2017 3:19 PM
To: ozDotNet <ozdotnet@ozdotnet.com>
Subject: Re: WebApi all 404

 

It turns out the server with the problem is 2008 6.1.7600 whereas all the other 
trouble-free ones are 6.1.7601 SP1. I'm not sure if this means they have 
different IIS versions.

 

It looks like all REST service requests on the old server are being handled by 
the Static handler and giving a 404. The trick to discovering this was to 
browse to the app from within IIS manager.

 



 

If I put runAllManagedModulesForAllRequests="true" in the Web.config of the old 
server then the REST service starts working. This is ham-fisted and not 
recommended according to many search results, but I can't find an alternative 
and it will do for now.

 

I'm still doing detective work and I'll put the final results in a blog post, 
but at least I found the culprit is the old server/IIS version.

 

Greg K

 

On 18 January 2017 at 13:20, Paul Glavich <subscripti...@theglavs.com 
<mailto:subscripti...@theglavs.com> > wrote:

At a guess I’d say it is routing and perhaps virtual directories.

 

Things to try:

*         Write a delegating handler that just returns a hardcoded response – 
see if it works. If yes, you know it is getting through and its probably 
routing?

*         Change your routing entries :) 

*         Add some logging to a global action filter – log lots of shit to see 
what it is trying to get through.

 

Really just guessing though as I haven’t seen this behaviour.

 

-          Glav

 

From: ozdotnet-boun...@ozdotnet.com <mailto:ozdotnet-boun...@ozdotnet.com>  
[mailto:ozdotnet-boun...@ozdotnet.com <mailto:ozdotnet-boun...@ozdotnet.com> ] 
On Behalf Of Greg Keogh
Sent: Tuesday, 17 January 2017 1:31 PM
To: ozDotNet <ozdotnet@ozdotnet.com <mailto:ozdotnet@ozdotnet.com> >
Subject: WebApi all 404

 

Folks, I just installed a WebApi app on a GoDaddy server and every request 
produces 404. The same app on nearly identical servers all work okay. I've been 
searching and fiddling for over 2 hours now with no progress at all. Every 
sensible suggestion I've found in web searches is useless ... pool settings, 
IIS verbs, framework versions, regiis, etc. A static htm file in the app root 
is visible, so it's something about the app, not the dns, permissions, site, 
binding, etc.

 

Has anyone experienced this and can remember what the trick is?

 

What sh*ts me is that I'm sure this happened to me early last year, and it took 
me hours to get it working, but I can't remember what I did. This time I'll 
make a blog post.

 

Greg K

 

Reply via email to