Ensures that ASP. NET applications and Web Services are securely inaccessible to resources

Source: Internet
Author: User

To disable downloading protected resources and files over HTTP, map these resources and files to ASP. NET's HttpForbiddenHandler.

Map protected resources to HttpForbiddenHandler
The HTTP handler is located under the

The following file extensions are mapped to the HTTP handler in Machine. config:
 
. Aspx is used for ASP. NET pages.
 
. Rem and. soap are used for remote processing.
 
. Asmx is used for Web Services.
 
Asax ,. ascx ,. config ,. cs ,. csproj ,. vb ,. vbproj ,. webinfo ,. asp ,. licx ,. resx and. resources are protected resources mapped to System. web. httpForbiddenHandler.
 


For. NET Framework resources, if the file extension is not used, the extension is mapped to System. Web. HttpForbiddenHandler in Machine. config, as shown in the following example:

<Add verb = "*" path = "*. vbproj" type = "System. Web. HttpForbiddenHandler"/>

In this example, the. vbproj file extension is mapped to System. Web. HttpForbiddenHandler. If the client request ends with. vbproj, ASP. NET returns a message indicating "This type of page is not served" (This type of page cannot be provided ).

• The following guidelines apply to processing. NET Framework file extensions:
 
• Map unused extensions to HttpForbiddenHandler. If no ASP. NET page is provided, the. aspx is mapped to HttpForbiddenHandler. If you do not use Web Services, map. asmx to HttpForbiddenHandler.
 
• Disable remote processing on a Web server that accesses the Internet. Map the remote processing extension (. soap and. rem) on the Web server that accesses the Internet to HttpForbiddenHandler.
 

Kang standing's blog

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.