Click here to Skip to main content
15,881,882 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Is there any way by which we can secure our data from the clients.

Or

Can we put authentication over parent directory.

examples:Generally to access the images used in website can be accessed like this:

www.websitename.com/images/

How to put limit on that.
Posted

You can disable directory browsing. Refer:
How to enable directory browsing with IIS7 web.config [^]

Further, using authentication and authorization, you can put security permissions on any folder of your application:
ASP.NET authentication and authorization[^]
MS Support: HOW TO: Control Authorization Permissions in an ASP.NET Application[^]
 
Share this answer
 
Comments
footballpardeep 21-Sep-12 14:05pm    
thanks
Sandeep Mewara 21-Sep-12 14:10pm    
Welcome.
footballpardeep 21-Sep-12 14:21pm    
<configuration>
<system.web>
<authorization>
<deny users="?">




I added this code to subdirectory of images.But still i am able to access it.
Sandeep Mewara 21-Sep-12 14:23pm    
Did you go through the links I shared?
footballpardeep 21-Sep-12 14:26pm    
http://www.tarkia.com/blog/tag/asp-net-authorization/ , i used this link, to restrict access to subdirectory
URL Authorization in ASP.NET – Securing your websites[^] explains how to set security permissions on individual web pages, web services and sub directories.

Please have a look.
 
Share this answer
 
Comments
footballpardeep 21-Sep-12 14:05pm    
thanks
Anytym... My pleasure...

Thanks a lot...
footballpardeep 21-Sep-12 14:20pm    
I added it to subdirectory. But i still able to access.

<pre>

<configuration>
<system.web>
<authorization>
<deny users="?">




</pre>
There is nothing in between the pre tags...
You have missed something I guess...
footballpardeep 21-Sep-12 14:28pm    
i pasted the code, but is not visible, i used ur link, of restricting access to subdirectory

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900