禁止最终用户查看文件. [英] prohibit end User to see a file.
本文介绍了禁止最终用户查看文件.的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我在服务器上有XML文件.
路径:根\ Myfolder \ .xml文件
我正在使用IIS 6,它具有读写权限,因为它们用于存储日志和某些数据.
一切正常,但是假设我键入www.mydomain.com \ Myfolder \ abc.xml,它将显示该文件的所有包含内容.
我如何限制它,以便它会显示一些消息(假设FOBIDDEN消息).
Prathamesh
Hi,
I have my XML files on Server.
path : root\Myfolder\.xml files
I am using IIS 6, it has Read and write permissions as they are used to store Logs and some Data.
It all work fine, But Suppose i Type www.mydomain.com\Myfolder\abc.xml it shows all the contains of the file.
How can i Restrict it so it will display some message suppose FOBIDDEN Message..
Prathamesh
推荐答案
将Web.Config文件添加到以下文件夹:
Add a Web.Config file to the folder:
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<system.web>
<authorization>
<deny users="*" />
</authorization>
</system.web>
</configuration>
这篇关于禁止最终用户查看文件.的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文