禁止最终用户查看文件.

编程入门 行业动态 更新时间:2024-10-28 21:18:05
本文介绍了禁止最终用户查看文件.的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述

我在服务器上有XML文件. 路径:根\ Myfolder \ .xml文件 我正在使用IIS 6,它具有读写权限,因为它们用于存储日志和某些数据. 一切正常,但是假设我键入www.mydomain \ 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\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>

更多推荐

禁止最终用户查看文件.

本文发布于:2023-11-13 09:43:44,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1584032.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:最终用户   文件

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!