IIS starts serving 404's (works for a while!)

0

This is a funny one that's just started happening. Changes I've recently made:

  • Updated website (not major update, small code changes/bug fixes)
  • Added URL re-write rules to 301 forum to different domain

Site otherwise has been untouched for many many weeks (perhaps months).

All re-written URL's seem to be affected. The URL's work fine for a while, then all of a sudden we start getting:

404 directory not found

On these URL's. I can't for the life of me work out why this is, and what's causing it. Event viewer doesn't seem to show anything relevant.

Rebooting server fixes it temporarily, as does restarting IIS. Recycling app pool sometimes works temporarily.

Server
Windows Server 2008 R2
Latest updates
Website target framework 4.5.2
IIS 6.1 Build 7601 SP1
IIS app-pool framework 4.0
Single application app-pool (not shared)

Does anyone have any ideas on what could be causing this, or how to investigate further? This could start hurting us badly. Any help much appreciated.

More info

Got it to return detailed error information, and is returning this:

Detailed Error Information
Module  IIS Web Core
Notification    MapRequestHandler
Handler StaticFile
Error Code  0x80070002
Requested URL   https://www.scirra.com:443/tutorials/top
Physical Path   C:\inetpub\wwwroot\Scirra\tutorials\top
Logon Method    Anonymous
Logon User  Anonymous

Obviously the physical path requested doesn't exist.

Here's a sample from the log file, where the 2 appears to be ERROR_FILE_NOT_FOUND

2018-06-02 17:26:44 108.xx.xx.xx GET /store - 443 - 172.xx.xx.xx Mozilla/5.0+(Windows+NT+10.0;+Win64;+x64)+AppleWebKit/537.36+(KHTML,+like+Gecko)+Chrome/66.0.3359.181+Safari/537.36 404 0 2 280
windows-server-2008-r2
asp.net
http-status-code-404
web.config
asked on Server Fault Jun 1, 2018 by Tom Gullen • edited Jun 4, 2018 by roaima

1 Answer

1

IIS 6 seems to have a problem with this every once in a while, especially with the 4.0 framework. The fix that usually works is:

Just add a DWORD registry key "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\ASP.NET\4.0.30319.0\EnableExtensionlessUrls" with a value of "0" then restart IIS to fix the issue.

The reason being is that the round of windows updates seems to blow away that registry key.

Shamelessly scraped from:

https://blogs.msdn.microsoft.com/tmarq/2010/06/18/how-to-disable-the-asp-net-v4-0-extensionless-url-feature-on-iis-6-0/

answered on Server Fault Jun 4, 2018 by AggrostheWroth

User contributions licensed under CC BY-SA 3.0