views:

59

answers:

2

I would like to set /directory/default.aspx to return 404 even though file and folder exist. How is this possible to do in IIS7 settings?

Update: I would like to do this in IIS Manager, not on code.

+1  A: 

You can try throwing an exception inside of your default.aspx:

throw new HttpException (404, "");
Developer Art
I would like to do this in IIS 7 settings.
jpkeisala
+1  A: 

As far as I know, there is no IIS setting for this purpose.

Lex Li