Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Running Windows 7 Pro Running local IIS 7.5 ( for web development purposes )

Edited hosts file to be able to use http://www.sitestepper.dev

Site build in subfolder of the inetpub/wwwroot/staplijst

Site can be viewed using http://www.sitestepper.dev/staplijst/whatever-page.htm

I have an http://www.sitestepper.dev/p.asp page I would like to call when an unknown page is requested. This technique works fine on the deployed version of this web site ( deployed on an Windows 2003 server running IIS 7 - not sure about the 7 but it is the version deployed with Windows 2003 server ).

I tried ( in the Edit Custom Error Dialog ) :

  • Execute a URL on this site: with value /staplijst/p.asp

and

  • Respond with a 302 redirect: with value http://www.sitestepper.dev/staplijst/p.asp

I tried this in the properties of the 'Default Web Site' , and I tried this at the staplijst level.

  • Even tried it with values without the /staplijst.

I restarted the default web site after each change. And even stopped/started the Web service.

But nothing seems to work, I keep getting the 'Server Error In Application "DEFAULT WEB SITE"' , HTTP Error 404.0 error.


What am I missing here - probably something obvious, but I don't see it ?

Thanks in advance

share|improve this question
add comment

1 Answer

To answer my own question: I needed to set the Error response to Custom error pages in the Edit feature settings... of the relevant site for this to work. It was set to 'Detailed errors for local requests and custom error pages for remote requests'.

I never had to do this in previous version of IIS, but maybe in those versions this was implied. Or maybe the host setting www.sitestepper.dev is causing the pages always to behave as local requests - anyway this has changed in IIS 7.5 I'm sure.

I searched for this solution without seeing the answer of 'Kev'. As a rule I tend not to edit config files directly if a solution can be found using the presented user interface panels.

I will accept his response as solution though.

Custom error pages setting needed to be checked for the IIS 7.5 'execute url on this site' to work

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.