How to restrict access to particular folder [Resolved]

Posted by Jpchoudhari under ASP.NET on 7/19/2012 | Points: 10 | Views : 4879 | Status : [Member] | Replies : 5
Hi,

How to restrict access to particular folder in asp.net. For ex. Upload Folder on root of my web application.

I use sql server based authentication and while restricting access to the folder from URL I should able to deliver access to the users who own the folders they have creaed.

For ex if User XYZ is created folders like 1120,1152 then he should get the access to that folder but not the folders created by different users

Kind Regards,
Jay



Responses

Posted by: Ranjeet_8 on: 7/20/2012 [Member] [MVP] Gold | Points: 50
Posted by: Rajkatie on: 7/20/2012 [Member] [MVP] Gold | Points: 25

Up
0
Down
You can use <location> section in web.config file

Rajesh Patel
.Net Trainer(MSCD | MCT | MS)
Brainbench (Asp.Net 4.5 and C# 5.0)

Jpchoudhari, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Dotnetrajanikanth on: 7/20/2012 [Member] Starter | Points: 25

Up
0
Down
You can add a webconfig file inside the folder. Which will help in restricting.

<configuration>

<appSettings/>
<connectionStrings/>
<system.web>
<authorization>
<allow user="01"/>
<deny user="02"/>
</authorization>
</system.web>
</configuration>


____________
www.flickr.com/photos/psdesigner/

Jpchoudhari, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Jpchoudhari on: 7/24/2012 [Member] Starter | Points: 25

Up
0
Down
thanx... dat solved my problem

Kind Regards,
Jay

Jpchoudhari, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Patel28rajendra on: 7/24/2012 [Member] Starter | Points: 25

Up
0
Down
Hi

nice link

R D Patel

Jpchoudhari, if this helps please login to Mark As Answer. | Alert Moderator

Login to post response