|
-
Mar 26th, 2007, 02:06 PM
#1
Thread Starter
Junior Member
asp.net membership
Hi
I'm designing a site and the client wants to restrict access to some pdf files.
I got handed a excel sheet with members names & info [couple hundred]. These are the people who can look at the files.
Is there a way to load the worksheet, set up parameters and update the tables aspnetdb.mdf. If its possible, can someone point me to an article?
Thank in advance!
-
Mar 26th, 2007, 02:41 PM
#2
Fanatic Member
Re: asp.net membership
What version of ASP.NET are you using?
-
Mar 26th, 2007, 02:48 PM
#3
Thread Starter
Junior Member
Re: asp.net membership
Hi eSPiYa
I'm using asp.net 2.0 and visual web developer 2005.
Thanks
-
Mar 26th, 2007, 02:58 PM
#4
Fanatic Member
Re: asp.net membership
You may upload the worksheet then immediately update your tables w/ the data from the worksheet. I did it before but I can't find my source code. 
About restriction of files, you may use the directory restriction.
-
Mar 26th, 2007, 05:35 PM
#5
Hyperactive Member
Re: asp.net membership
ok, the first thing you will need to do is get that excel file open and expose the data programmatically. once you have achieved that, this article should be enough to show you what to do with the data:
http://msdn2.microsoft.com/en-us/library/ms998347.aspx
If this post helps, please RATE MY POST!
Using Visual Studio 2005 SE
-
Mar 27th, 2007, 07:55 AM
#6
Thread Starter
Junior Member
Re: asp.net membership
Kayos
Thank you for the article. I've got some time today to go over it.
-
Mar 27th, 2007, 02:03 PM
#7
Re: asp.net membership
I suggest using HttpHandlers and HttpModules. You can specify a specific file type (PDF, XLS) to be handled by the HttpHandler/HttpModule in your application's web.config. In the HttpHandler or HttpModule you write, check the session object that contains the user's information and their authentication level or any other information you may need. If they pass, give them the file. If they fail, send them a nasty picture of a llama shedding its skin.
-
Mar 29th, 2007, 12:03 PM
#8
Re: asp.net membership
If you have an Access Denied page to tell users, then it's not hard to verify a user's status and redirect them if they lack sufficient access rights.
vb Code:
Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
If Not User.Identity.IsAuthenticated Then
Response.Redirect("~/accessdenied.aspx")
End If
End Sub
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|