locked
protecting physical files / downloads RRS feed

  • Question

  • User-1232255770 posted

    Where can i find information about protecting physical files / downloads , using ASP.Net authentication, authorization, membership, roles ?

    The goal is to only allow authenticated users with permissions to specified files to download those files.

    thank you.

    Bradly

    Wednesday, April 23, 2014 4:18 AM

Answers

  • User913442891 posted

    if this does not help you maybe it because I did not get your question right,

    let say you do not want annomynous user to access a picture nameed

    Hydrangeas.jpg

    stored in a folder named Images

    you would write your web.config file like this

        <location path="Images/Hydrangeas.jpg">
            <system.web>
                <authorization>
                    <deny users="?"/>
                </authorization>
            </system.web>
        </location>
    	

    mark as answered so everyone will know this works

    if you need more help please contact me 

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Wednesday, April 23, 2014 7:04 PM
    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Sunday, April 27, 2014 4:38 AM

All replies

  • User-933257319 posted

    disable anonymous access from IIS settings

    Wednesday, April 23, 2014 4:24 AM
  • User913442891 posted

    if this does not help you maybe it because I did not get your question right,

    let say you do not want annomynous user to access a picture nameed

    Hydrangeas.jpg

    stored in a folder named Images

    you would write your web.config file like this

        <location path="Images/Hydrangeas.jpg">
            <system.web>
                <authorization>
                    <deny users="?"/>
                </authorization>
            </system.web>
        </location>
    	

    mark as answered so everyone will know this works

    if you need more help please contact me 

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Wednesday, April 23, 2014 7:04 PM
    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Sunday, April 27, 2014 4:38 AM