If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Data Access, Manipulation & Batch Languages > ASP > Security Problem(URL Authorization)

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 05-31-06, 07:23
mehdi mehdi is offline
Registered User
 
Join Date: Sep 2003
Posts: 11
Security Problem(URL Authorization)

Hi,

I want to view a file in my web form (in an ASP.NET application) from an http folder, in other hand everyone can Type the URL address in the address bar and view the file outside of my application.
If I set a password for my web folder, it’s ok but when users work with application they must enter username and password of my web folder.
I tried several ways to solve my problem but I couldn’t.
I appreciate if anybody can help me

Best regards,
mehdi
Reply With Quote
  #2 (permalink)  
Old 05-31-06, 17:54
wayneph wayneph is offline
Registered User
 
Join Date: Aug 2005
Location: D/FW, Texas, USA
Posts: 78
One option might be to hide the video from users and have an .aspx page that reads the file off of the FileSystem and then Streams it to the browser that way. (Response.WriteFile() or something similar. I don't recall the exact method)

In your file you can check to see if they have an active session and are using the Application. Have the main page set a session variable that it's ok to use the video, and then have the video page clear it after it's been checked.

Just one idea...
__________________
--wayne
SELECT * FROM Users WHERE Clue>0
0 rows returned
Reply With Quote
  #3 (permalink)  
Old 06-01-06, 01:55
mehdi mehdi is offline
Registered User
 
Join Date: Sep 2003
Posts: 11
Hi

thanks for your Reply.how we could read File system.

Best regards
mehdi
Reply With Quote
  #4 (permalink)  
Old 06-01-06, 14:46
wayneph wayneph is offline
Registered User
 
Join Date: Aug 2005
Location: D/FW, Texas, USA
Posts: 78
Since you're using .NET Response.WriteFile will do all the dirty work for you.
Just set the correct header for the type of videos that you have.

Code:
Response.AddHeader("Content-Type","video/avi")
Response.WriteFile("c:\NotInWebDirecory\myMove.avi")
Response.End
__________________
--wayne
SELECT * FROM Users WHERE Clue>0
0 rows returned
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On