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.
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.
You can try throwing an exception inside of your default.aspx:
throw new HttpException (404, "");