473,382 Members | 1,766 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,382 software developers and data experts.

limiting access to files with asp.net

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 types, .exe .xsl .xml etc. i want an href to each file but only allow
users who have the right login-info in their session variable to get to the
files in their directory. is there something built into .net for doing this?
do i need to do some kind of isapi filter and then stream them?
Oct 14 '05 #1
1 1728
There are two ways that come to mind.
1) Change the ACL on the file so that it maps to a particular user or group
and have your users log in using Windows Authentication
2) Put in an HTTP Module that will catch the request to the file, look up
the credentials of the user in your sql database and, if the file is not
allowed, change the request or reject the request. See
http://www.15seconds.com/issue/020417.htm

I haven't tried either but the second seems simpler in the long run.

--
--- Nick Malik [Microsoft]
MCSD, CFPS, Certified Scrummaster
http://blogs.msdn.com/nickmalik

Disclaimer: Opinions expressed in this forum are my own, and not
representative of my employer.
I do not answer questions on behalf of my employer. I'm just a
programmer helping programmers.
--
"Daniel" <so*******************@yahoo.com> wrote in message
news:ee**************@TK2MSFTNGP12.phx.gbl...
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 types, .exe .xsl .xml etc. i want an href to each file but only allow
users who have the right login-info in their session variable to get to
the
files in their directory. is there something built into .net for doing
this?
do i need to do some kind of isapi filter and then stream them?

Oct 15 '05 #2

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

Similar topics

3
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...
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...
7
by: Antonio | last post by:
I'm developing the firmware for a slave in a comunication channel. Now there is certain information (namely the addresses of the slave and the master) that must be changeable while the device is up...
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...
2
by: prakashwadhwani | last post by:
I've used Dbase/Clipper for years & Access for a little while now but Access doesn't seem to have any elegant solution to limiting the size of a text box ... i.e. the max number of characters that...
2
by: mrz | last post by:
This may be simple, but I'm not trained in networking. Just thrown into the job by default. Our church has a machine running Windows 2003 server and 10 clients running Windows XP. We have a shared...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
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
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: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

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.