Prevent access to the Hidden Directories in asp.net mvc2 application

Posted by Santosh.Impossible under ASP.NET MVC on 9/17/2014 | Points: 10 | Views : 1695 | Status : [Member] | Replies : 0
Hi WebGurus,

I want to prevent the user from accessing the Hidden Directories like Scripts, Contents, aspnet_client directly from the browser in a asp.net mvc 2 application. Currently whenever I try to access the above mentioned Hidden Directories it is returning the following error message:

403 - Forbidden: Access is denied.
You do not have permission to view this directory or page using the credentials that you supplied.

I want to show "404 Not Found" error page whenever one tries to access the above mentioned hidden directories.

Can anyone help me with to resolve this issue?

Thanks & Regards,
Santosh Kumar Patro

santosh kumar patro


Responses

(No response found.)

Login to post response