IIS Q: How can I configure IIS executable extensio

2019-06-10 08:12发布

问题:

Please don't blame this question and I would be grateful if you can give me a specific answer.

I'm using Windows Server 2008 6.0 x86 with MsSQL 08.

1. I want to limit the extension of IIS executable files on my web server.

ex:)

Before set limit.

Executable extension : *.asp | *.aspx ...

After set limit.

Executable extension : only *.asp

When I change values on column 'Path' with '*.cust', *.asp -> *.cust, *.cer -> *.cust, *.aspx -> *.cust on Handler Mappings like this, the browser always return 404 error.

Test file : '\wwwroot\main\test.asp' & '\wwwroot\main\test.cust'

When I call '/main/test.asp', browser returns 404.3 "Not found" error.

When I call '/main/test.cust', browser returns 404.0 "Not found" error.

Why this happens?

I don't know exactly what the Handler Mappings menu is.

2. How to set 404 custerr when I call specified file?

Test file on 'C:\inetpu\wwwroot\main\test.browser'.

When I call this file on browser, it returns 404.7

The request filtering module is configured to deny the file extension.

Why this happens? is there any way to see the content of 'test.browser'? or is it impossible?

Someone please help me. Thank you in advance.

回答1:

1) You can customize executable extension on Handler Mappings pane.

2) You can customize specific error on Request Filtering pane & Error Pages pane.

If you call that URI on browser(Chrome) you will get HTTP Error 404.5 - Not Found.