Results 1 to 8 of 8

Thread: asp.net membership

  1. #1

    Thread Starter
    Junior Member DesignGirl's Avatar
    Join Date
    Mar 2007
    Location
    West Palm Beach, FL
    Posts
    31

    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!

  2. #2
    Fanatic Member eSPiYa's Avatar
    Join Date
    Jun 2006
    Location
    in our house
    Posts
    751

    Re: asp.net membership

    What version of ASP.NET are you using?

  3. #3

    Thread Starter
    Junior Member DesignGirl's Avatar
    Join Date
    Mar 2007
    Location
    West Palm Beach, FL
    Posts
    31

    Re: asp.net membership

    Hi eSPiYa

    I'm using asp.net 2.0 and visual web developer 2005.

    Thanks

  4. #4
    Fanatic Member eSPiYa's Avatar
    Join Date
    Jun 2006
    Location
    in our house
    Posts
    751

    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.

  5. #5
    Hyperactive Member kayos's Avatar
    Join Date
    Apr 2004
    Location
    Largo, Florida
    Posts
    306

    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

  6. #6

    Thread Starter
    Junior Member DesignGirl's Avatar
    Join Date
    Mar 2007
    Location
    West Palm Beach, FL
    Posts
    31

    Re: asp.net membership

    Kayos

    Thank you for the article. I've got some time today to go over it.

  7. #7
    I'm about to be a PowerPoster! mendhak's Avatar
    Join Date
    Feb 2002
    Location
    Ulaan Baator GooGoo: Frog
    Posts
    38,170

    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.

  8. #8
    Banned timeshifter's Avatar
    Join Date
    Mar 2004
    Location
    at my desk
    Posts
    2,465

    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:
    1. Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
    2.  
    3.         If Not User.Identity.IsAuthenticated Then
    4.             Response.Redirect("~/accessdenied.aspx")
    5.         End If
    6.  
    7. 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
  •  



Click Here to Expand Forum to Full Width