Click here to Skip to main content
15,891,777 members
Home / Discussions / ASP.NET
   

ASP.NET

 
AnswerRe: Text search from database Pin
amit20119-Sep-08 5:54
amit20119-Sep-08 5:54 
AnswerRe: Text search from database [modified] Pin
Rutvik Dave9-Sep-08 6:28
professionalRutvik Dave9-Sep-08 6:28 
Questionhow to implement single signon service? Pin
srinivassam9-Sep-08 4:48
srinivassam9-Sep-08 4:48 
AnswerRe: how to implement single signon service? Pin
Manas Bhardwaj9-Sep-08 5:28
professionalManas Bhardwaj9-Sep-08 5:28 
QuestionASP.NET Treeview not refreshing Pin
Blumen9-Sep-08 4:46
Blumen9-Sep-08 4:46 
QuestionDirectory/File Permissions with ASP.NET Pin
Lea Hayes9-Sep-08 4:36
Lea Hayes9-Sep-08 4:36 
AnswerRe: Directory/File Permissions with ASP.NET Pin
Manas Bhardwaj9-Sep-08 5:31
professionalManas Bhardwaj9-Sep-08 5:31 
GeneralRe: Directory/File Permissions with ASP.NET Pin
Lea Hayes9-Sep-08 12:06
Lea Hayes9-Sep-08 12:06 
Hi,

Let's assume that the series of web.config files allows the user 'Bob' to access anything and everything. If 'Bob' tries to access the URL "webserver.com/users/bob/picture.jpg", he can...if anyone else tries to access this file a not authorized page appears to the user. This part works fantastic.

The Directory.GetDirectories method returns an array of paths which are relative to the server itself (i.e. "c:\wherever\users\bob\"). I have just found out that I could use the UrlAuthorizationModule. This would mean doing something like the following:
string[] files = Directory.GetFiles(path);

string rootPath = Page.ResolveClientUrl("~/filesroot");
foreach(string file in files)
{
   string tempPath = file.Replace(rootPath, "~/filesroot/");
   if (UrlAuthorizationModule.CheckUrlAccessForPrincipal(tempPath, Page.User, "GET"))
   {
       // Do rendering here...
   }
}
I have two questions:

1) Is there a better way of doing this, or a way which uses mapped paths instead of virtual paths? I tried using the FileAuthorizationModule but got completely lost as this takes an IntPtr token instead of an IPrinciple.

2) What do you mean by impersonation?

Thanks,
Lea Hayes
Questioni want to connect Secure Ftp(SFTP) through my web application...... Pin
Shaik Haneef9-Sep-08 4:15
Shaik Haneef9-Sep-08 4:15 
Questionwhat is the problem with this piece of code? Pin
snouto9-Sep-08 3:12
snouto9-Sep-08 3:12 
AnswerRe: what is the problem with this piece of code? Pin
Manas Bhardwaj9-Sep-08 3:31
professionalManas Bhardwaj9-Sep-08 3:31 
QuestionSID is same for every User Pin
Piyush Vardhan Singh9-Sep-08 2:01
Piyush Vardhan Singh9-Sep-08 2:01 
QuestionReading from excel file. Pin
hemant.kaushal9-Sep-08 1:50
hemant.kaushal9-Sep-08 1:50 
AnswerRe: Reading from excel file. Pin
Dilip H. Patel9-Sep-08 2:08
Dilip H. Patel9-Sep-08 2:08 
GeneralRe: Reading from excel file. Pin
hemant.kaushal9-Sep-08 3:01
hemant.kaushal9-Sep-08 3:01 
QuestionHow to find Password from Active directory using SID? Pin
sumit70349-Sep-08 1:14
sumit70349-Sep-08 1:14 
AnswerRe: How to find Password from Active directory using SID? Pin
Ashfield9-Sep-08 1:49
Ashfield9-Sep-08 1:49 
GeneralRe: How to find Password from Active directory using SID? Pin
sumit70349-Sep-08 1:56
sumit70349-Sep-08 1:56 
GeneralRe: How to find Password from Active directory using SID? Pin
Ashfield9-Sep-08 4:37
Ashfield9-Sep-08 4:37 
AnswerRe: How to find Password from Active directory using SID? Pin
Abhijit Jana9-Sep-08 17:58
professionalAbhijit Jana9-Sep-08 17:58 
Questioncreating dynamic pages in asp.net c# Pin
VijayVishwakarma9-Sep-08 0:32
VijayVishwakarma9-Sep-08 0:32 
AnswerRe: creating dynamic pages in asp.net c# Pin
eyeseetee9-Sep-08 0:46
eyeseetee9-Sep-08 0:46 
GeneralRe: creating dynamic pages in asp.net c# Pin
VijayVishwakarma9-Sep-08 0:50
VijayVishwakarma9-Sep-08 0:50 
GeneralRe: creating dynamic pages in asp.net c# Pin
Manas Bhardwaj9-Sep-08 1:29
professionalManas Bhardwaj9-Sep-08 1:29 
GeneralRe: creating dynamic pages in asp.net c# Pin
VijayVishwakarma9-Sep-08 2:25
VijayVishwakarma9-Sep-08 2:25 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.