Securing files for download.

Ask a Question related to ASP.NET Security, Design and Development.

  1. #1

    Default Securing files for download.

    Hi,

    I am trying to work out how I can secure files available for download on a
    website.

    I have forms authentication set and can deny access to aspx file in a
    directory using the web.config file which redirects to the login page and
    works fine, however, if i have a downloadable in this directory people can
    enter the URI of the file and download it without any login. I understand
    that the web.config approach only secures .Net based resources but would
    like to know if anyone has a solution/work around for this. I have thought
    about storing the files in SQL which would require an aspx page to
    authenticate to the server, I think this would work but SQL space costs much
    more than web space ..

    The webserver is a shared hosting solution so i do not have acces to the
    windows level accounts.

    Would appreciate some direction on this.

    Thanks very much

    Steve


    Steve Lloyd Guest

  2. Similar Questions and Discussions

    1. Multiple files download?
      Originally posted by: 2JZ Hi all, I am using FileReference's download() to download file. However, it seems that donwload() only donwload one...
    2. No Files for download...?
      just got a new pc so im reinstalling everything. went to download the latest flash player but the link to the .exe doesnt work!? ...
    3. Unable to download files with IE
      I've got a strange bug with IE. Whenever I try and download a file, it goes through the motions of downloading as expected, but as soon as it...
    4. Securing and Accessing XML Files
      I’m not very experienced with security on a web server, so what I’m asking might be really stupid. I have an application that is creating XML...
    5. Help needed with download files.
      Hi there, I have some .exe files located on the server in a folder named "download bin" I want to send out e-mail which apart from anything...
  3. #2

    Default Securing files for download.

    ?????????????????????????????????????????????????? ?????????????????????????????????????????????????? ?????????????????????????????????????????????????? ?????????????????????????????????????????????????? ?????????????????????????????????????????????????? ?????????????????????????????????????????????????? ?????????????????????????????????????????????????? ????????????????????????????????????????????.????? ?????????????????????????????????????????????????? ?????????????????????????????????????????????????? ?????????????????????????????????????????????????? ?????????????????????????????????????????????????? ?????????????????????????????????????????????????? ?????????????????????????????????????????????????? ?????????????????????????????????????????????????? ?????????????????????????????????????????????????? ?????????????????????????????????????????????????? ?????????????????????????????????????????????????? ?????????????????????????????????????????????????? ?????????????????????????????????????????????????? ?????????????????????????????????????????????????? ????????????????????>
    Joe Audette Guest

  4. #3

    Default Securing files for download.

    I did not post all those question marks. Not sure what
    happened but I posted some code that I thought would help.
    I recommend storing the download files outside the web
    and open them with a binary stream and use
    Response.BinaryWrite to return them. Too bad it lost the
    code I posted.
    Joe Audette Guest

  5. #4

    Default Re: Securing files for download.

    hello Steve

    An excellent article on that subject

    is at
    [url]http://www.wwwcoder.com/main/parentid/259/site/1795/68/default.aspx[/url]

    Hoppe that suite to you

    Luis Centeio

    "Steve Lloyd" <steveRemoveThisNow@livenowpaylater.co.uk> wrote in message
    news:OF9mizovDHA.2080@TK2MSFTNGP10.phx.gbl...
    > Hi,
    >
    > I am trying to work out how I can secure files available for download on a
    > website.
    >
    > I have forms authentication set and can deny access to aspx file in a
    > directory using the web.config file which redirects to the login page and
    > works fine, however, if i have a downloadable in this directory people can
    > enter the URI of the file and download it without any login. I understand
    > that the web.config approach only secures .Net based resources but would
    > like to know if anyone has a solution/work around for this. I have
    thought
    > about storing the files in SQL which would require an aspx page to
    > authenticate to the server, I think this would work but SQL space costs
    much
    > more than web space ..
    >
    > The webserver is a shared hosting solution so i do not have acces to the
    > windows level accounts.
    >
    > Would appreciate some direction on this.
    >
    > Thanks very much
    >
    > Steve
    >
    >

    Luis Centeio Guest

  6. #5

    Default Re: Securing files for download.

    Hi Steve,

    when you set the IIS to process all files using ASPNET_ISAPI.dll as it does
    with ASPX files. Then you can check if user is authenticated and authorized
    in the following event:

    Sub Application_AcquireRequestState(ByVal sender As Object, ByVal e As
    EventArgs)
    '... your code ....
    End Sub

    You can find a more detailed description in the documentation of PortSight
    Secure Access for .NET (you don't need the component to work this out:

    [url]http://www.portsight.com/downloads/SecureAccess/1_1/Standard/Secure%20Access%20Guide.chm[/url]

    Best Regards,

    Petr PALAS, [email]petrp@portsight.com[/email]
    PortSight - Portals & Components, [url]www.PortSight.com[/url]




    "Steve Lloyd" <steveRemoveThisNow@livenowpaylater.co.uk> wrote in message
    news:OF9mizovDHA.2080@TK2MSFTNGP10.phx.gbl...
    > Hi,
    >
    > I am trying to work out how I can secure files available for download on a
    > website.
    >
    > I have forms authentication set and can deny access to aspx file in a
    > directory using the web.config file which redirects to the login page and
    > works fine, however, if i have a downloadable in this directory people can
    > enter the URI of the file and download it without any login. I understand
    > that the web.config approach only secures .Net based resources but would
    > like to know if anyone has a solution/work around for this. I have
    thought
    > about storing the files in SQL which would require an aspx page to
    > authenticate to the server, I think this would work but SQL space costs
    much
    > more than web space ..
    >
    > The webserver is a shared hosting solution so i do not have acces to the
    > windows level accounts.
    >
    > Would appreciate some direction on this.
    >
    > Thanks very much
    >
    > Steve
    >
    >

    Petr PALAS Guest

Posting Permissions

  • You may not post new threads
  • You may post replies
  • You may not post attachments
  • You may not edit your posts

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139