473,394 Members | 1,701 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,394 software developers and data experts.

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 1652
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
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
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
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
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
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
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
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
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
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
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
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
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
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
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

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.