473,513 Members | 2,428 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Limiting access to user files

I have an old ASP application that I'm converting to ASPNET. The
application allows users to login, enter data, and run simulations on our
computers and the results are stored in a file the user then downloads. In
order to allow users to access only their files, in ASP I used to copy the
files to a temporary directory, allow the user to download them, then delete
the temp directory. I'm looking for a better way to do this. The user
login data is stored in a SQL Server database, and so using Windows-based
security doesnt work. Any ideas???

Thanks

Dave Taylor
Process Engineering Resources, Inc.
Nov 18 '05 #1
5 1661
Here's on idea. If you are storing user login data in a SQL Server
database, why not do the same for the files? Specifically store the path of
the file (e.g. not its contents) in the database and have it related to some
user id or security credentials.

--
Peter O'Reilly
Nov 18 '05 #2
You're right, the temp directory is not a very good approach.
Instead, store these files in a database or a secured directory.
Then you can take manual control of them and only dish them out when you
choose by using functions such as Response.WriteFile
http://msdn.microsoft.com/library/de...efiletopic.asp

Here's another link that details storing the files in SQL Server:
http://www.aspnetpro.com/features/20...200307so_f.asp

--
I hope this helps,
Steve C. Orr, MCSD, MVP
http://Steve.Orr.net
"Dave Taylor" <no*********@processeng.com> wrote in message
news:Oi**************@TK2MSFTNGP11.phx.gbl...
I have an old ASP application that I'm converting to ASPNET. The
application allows users to login, enter data, and run simulations on our
computers and the results are stored in a file the user then downloads. In order to allow users to access only their files, in ASP I used to copy the
files to a temporary directory, allow the user to download them, then delete the temp directory. I'm looking for a better way to do this. The user
login data is stored in a SQL Server database, and so using Windows-based
security doesnt work. Any ideas???

Thanks

Dave Taylor
Process Engineering Resources, Inc.

Nov 18 '05 #3
you can use an httpmodule for this. you will have to map the extenstion of
the file to your module, so there is a little overhead in download because
of the asp.net processing.

if performance is key, write an isapi filter. C++ has wizards for this now.

-- bruce (sqlwork.com)

"Dave Taylor" <no*********@processeng.com> wrote in message
news:Oi**************@TK2MSFTNGP11.phx.gbl...
I have an old ASP application that I'm converting to ASPNET. The
application allows users to login, enter data, and run simulations on our
computers and the results are stored in a file the user then downloads. In order to allow users to access only their files, in ASP I used to copy the
files to a temporary directory, allow the user to download them, then delete the temp directory. I'm looking for a better way to do this. The user
login data is stored in a SQL Server database, and so using Windows-based
security doesnt work. Any ideas???

Thanks

Dave Taylor
Process Engineering Resources, Inc.

Nov 18 '05 #4
You could always use an ASPX page to deliver the documents to the end user.
The documents could remain in a protected folder, and an ASPX page could be
used to open the file and stream it to the browser dynamically.

--
HTH,
Kevin Spencer
..Net Developer
Microsoft MVP
Big things are made up
of lots of little things.

"Dave Taylor" <no*********@processeng.com> wrote in message
news:Oi**************@TK2MSFTNGP11.phx.gbl...
I have an old ASP application that I'm converting to ASPNET. The
application allows users to login, enter data, and run simulations on our
computers and the results are stored in a file the user then downloads. In order to allow users to access only their files, in ASP I used to copy the
files to a temporary directory, allow the user to download them, then delete the temp directory. I'm looking for a better way to do this. The user
login data is stored in a SQL Server database, and so using Windows-based
security doesnt work. Any ideas???

Thanks

Dave Taylor
Process Engineering Resources, Inc.

Nov 18 '05 #5
You could always use an ASPX page to deliver the documents to the end user.
The documents could remain in a protected folder, and an ASPX page could be
used to open the file and stream it to the browser dynamically.

--
HTH,
Kevin Spencer
..Net Developer
Microsoft MVP
Big things are made up
of lots of little things.

"Dave Taylor" <no*********@processeng.com> wrote in message
news:Oi**************@TK2MSFTNGP11.phx.gbl...
I have an old ASP application that I'm converting to ASPNET. The
application allows users to login, enter data, and run simulations on our
computers and the results are stored in a file the user then downloads. In order to allow users to access only their files, in ASP I used to copy the
files to a temporary directory, allow the user to download them, then delete the temp directory. I'm looking for a better way to do this. The user
login data is stored in a SQL Server database, and so using Windows-based
security doesnt work. Any ideas???

Thanks

Dave Taylor
Process Engineering Resources, Inc.

Nov 18 '05 #6

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
1857
by: Mark Hanford | last post by:
The Why: I'm in the process of creating a Linux+Apache+PHP website with a public area and an admin area for configuration and updates. The What: One of the features of the admin area is...
2
3260
by: Jay Moore | last post by:
Greetings, all! I have a project for work, and I'm not sure how to efficiently do what I need to do. I'm hoping someone out there can help. Project is this: I'm creating a web-based...
1
1739
by: Daniel | last post by:
limiting access to files with asp.net is there any way i can make a file only accessible to certain users of my website? my files are to large to copy to a temp directory and they are of many...
6
1822
by: Gerry Abbott | last post by:
Hi all, Have written some code to limit the concurrent users of a database. Use the Autoexec macro to open a form. When the form opens it increments a value in a table. When the form closes...
2
1583
by: Jo Davis | last post by:
access fe and access be. later the be might be sql server I don't want people to pass this application around. And I want control over usage. I want it to 'expire' after a while. I have fairly...
5
3208
by: randyelliott | last post by:
Good Day, I have a MS Access (Access 2000 now upgraded to 2003) database that tracks customer information. One function of this database is to create an encrypted license file for our software,...
4
1614
by: N J | last post by:
Hi, I ahve developed a program using access and am distributing it using MDE's, I ahve had many requests for a demo. I was thinking of limiting the number of records to say 100? If anyone has...
3
244
by: Dave Taylor | last post by:
I have an old ASP application that I'm converting to ASPNET. The application allows users to login, enter data, and run simulations on our computers and the results are stored in a file the user...
4
2380
by: developing | last post by:
Hi All, I have a browse button that the user can click to select a file. The button then fetches the file path. This is all working fine except my boss wants some add functionality. I need it to...
1
1363
by: Paulo | last post by:
Hi, how are you doing? I need to develop an asp application wich allow users to upload files, but I need to limit every user folder with 10MB... How can I do that? not pure asp solution?...
0
7260
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
7160
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
7384
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
5685
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
4746
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
3233
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
3222
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
1594
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
1
799
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.