Does anyone know how to limit who can access files on my site?

Discussion in 'Site Programming, Development and Design' started by FishLazyWaters, Oct 26, 2009.

  1. If I have video files somewhere on my site and someone finds out where they are then they can play them without my knowledge and consume all of my "streaming quota".

    If I can tell the server to only allow my web site and one other to access these files that would be great.
     
  2. Ray

    Ray

    Put this file in the folders 'Bin', or 'App_data', or 'App_code', or '_databse'. These folders have special permissions in them that will not allow a browser to directly access them.
     
  3. I tried App_data but then my silverlight media player can't see it.

    I tried putting my wmv files in Clientbin but then they are visible to Windows Media Player.

    It would be nice if there was something line the clientaccesspolicy.xml file.
     
  4. Ray

    Ray

    What is the error message your silver light application displays when you put the wmv files in App_data folder?
     
  5. When I connect a Uri to the MediaElement source I have two choices: absolute or relative address.

    Relative means relative to ClientBin

    If I try absolute I get an http 404.
     
  6. Ray

    Ray

    What is the path your code is calling on? Generally speaking absolute path are more commonly used.
     
  7. @TS

    I think you should access the files in your App_Data folder on the same web application, otherwise it can't be accessed anyway.

    To do this, on the same web application, there must be a component that can access the App_Data privately and this component must be available to your silverlight application.
     
  8. You could also setup membership and roles on your web application and force a login to view them. If you setup a role (admin, for example) and add yourself to it, you can restrict access in your web.config to only that role.
     
  9. Ray

    Ray

    Last edited by a moderator: Oct 14, 2015

Share This Page