4

I have a ASP.NET 4.5 web app built using VS 2013. When I set debug to false in the web.config file, my aspx pages throw 404s in production (IIS 8.5). I publish using the VS publish option.

Is this an issue with a known cause or work-around?


EDIT:

I created a brand new empty ASP.NET app with no references and uploaded it with debug=false, and it loaded correctly. I then went ahead and added the Nuget packages and other settings that my other app had until I hit it. It's the FriendlyUrls.

After adding the FriendlyUrls package, it still worked OK. It wasn't until after I actually enabled it, by adding RouteConfig.RegisterRoutes(RouteTable.Routes); to the Global.asax file that it threw me a 404 error. I then set debug=true, and sure enough it loaded fine.

Can anyone else reproduce this in IIS 8.5, or is this issue specific to my hosting environment?

Edit 2:

I just hit up a test website on Windows Azure with the FriendlyUrls enabled, and debug=false, and it worked like a charm. This is proving to be a RACKSPACE-Cloud-Site-only issue, unless the behavior is different on other IIS versions (which version are Azure websites currently running on?).

What would the core issue be though? What's the underlying configuration of FriendlyUrls that would conflict with debug=false in certain scenarios, and mostly, what would that scenario or IIS setting perhaps be (so I can bring this to Rackspace's attention)?

Update:

Rackspace believes it's a permission issue. More updates to come as I get more info.

Rivka
  • 2,172
  • 10
  • 45
  • 74
  • So your site works perfectly with debug="true"? – citronas Mar 25 '14 at 17:49
  • @citronas yup - works fine with debug set to true. – Rivka Mar 25 '14 at 17:49
  • Doesn't make a lot of sense. 404 is page not found which indicates the deployment may have went wrong. How are you deploying the site? – L_7337 Mar 25 '14 at 17:50
  • 2
    Load up fiddler and make sure all of the requests look correct. – BNL Mar 25 '14 at 17:52
  • What is the sub-status next to the 404 in the http logs? – Peter Hahndorf Mar 25 '14 at 17:55
  • @L_7337 I'm publishing it using the Publish option in VS and it deploys it to a shared hosting environment with FTP. – Rivka Mar 25 '14 at 18:11
  • @BNL requests look normal in Fiddler - a/t specific I should be looking for? – Rivka Mar 25 '14 at 18:11
  • @PeterHahndorf I don't have instant access to the logs unfortunately since it's a shared environment... but the error looks like the standard IIS 8.5 404 error if that helps... – Rivka Mar 25 '14 at 18:12
  • @Rivka - there are many reasons for 404s, to the client they all look the same. debug="true" shouldn't normally trigger any of the 404 reasons. This will be hard to debug if you don't have full access to the server. Can you use failed request tracing? – Peter Hahndorf Mar 25 '14 at 18:41
  • @Rivka What kind of Rackspace setup do you have? You say it's a shared hosting environment? Not a VM? – Owen Davies Oct 04 '14 at 14:14
  • 1
    @OwenDavies yup, shared hosting environment (called Cloud Sites in their terms). It ended up being a permissions issue on the content folder which contained the app files. – Rivka Oct 06 '14 at 16:11

1 Answers1

0

It could be that the request isn't handled by isappi module , but by Statick handler, because it isn't pointing to real file, try look at HandlerMapping in IIS, and make sure that thers is handler that mapped no extention requests to Isapi module

  • Interesting answer...would you mind having a look at this issue of mine where it works in 1 case and not in another: http://stackoverflow.com/questions/34080141/routeconfig-file-throws-404-when-routing-urls-multiple-levels-deep – Adam Dec 04 '15 at 14:29