简体   繁体   English

文件夹权限IIS 7服务器。 拒绝访问Web浏览器的文件夹

[英]Folder Permissions IIS 7 server. Denying acces to folder to web browsers

I'm new to servers and i would like to ask a simple question. 我是服务器的新手,我想问一个简单的问题。

I've got a website (aspx) with a folder where i store images. 我有一个网站(aspx),其中包含一个用于存储图像的文件夹。

Mobiles connect through http client (generic handlers) and can download images from the folder, but i want to deny the access to this folder to web browsers so the images can't be seen. 手机通过http客户端(通用处理程序)连接,可以从该文件夹下载图像,但是我想拒绝Web浏览器对该文件夹的访问,以便看不到图像。

How could i do that? 我该怎么办?

Thanks in advance 提前致谢

I think you could use something like this 我想你可以用这样的东西

<configuration>
<location path="MySubDirectory">
    <system.web>
        <authorization>
            <deny users="*"/> <!-- Denies all users -->
        </authorization>
    </system.web>
</location>

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM