views:

216

answers:

2

I just redeployed one of my sites today and suddenly some (but not all) of my .aspx files are redirecting to my 404 handler.

I've scrutinized the security settings on the offending files, comparing them line-by-line with other .aspx files that are serving correctly, with no luck.

The files 404'ing files were indeed ones I had been working on, and were replaced during the deploy. But then again, some of the other files I was working on are coming up fine. Naturally, the changes were not the sort of thing that would cause the errors I'm seeing, and the site runs perfectly in my dev environment.

Any idea what could be causing this?

A: 

Maybe you've already done this, but as you stated you had been recently working on those files, I would start by verifying that the links to the offending pages are correct in the source - check that their declared path is (works out to be) indeed valid. I try and make all links relative with Server.MapPath or something similar, but occasionally one slips my mind.

Superstringcheese
Thanks for that. The links are good (and haven't changed in weeks), and I sanity checked by typing URLs by hand.
Jason Kester
+2  A: 

ANSWER: User Error (as always)

Looks like my deploy script was skipping .ascx files. (One of the minor changes between last deploy and this one was adding a couple usercontrols.) The page would start loading, look for its UserControls, not find them, and throw a 404.

Thanks all for the sympathy. Sorry to waste your time. Hopefully this will at least help the next guy who fat-fingers a deploy script and gets a non-helpful error message.

Jason Kester