限制访问文件夹

编程入门 行业动态 更新时间:2024-10-28 14:22:10
本文介绍了限制访问文件夹的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述 嗨 我的根目录中有一个文件夹,其中包含一个文本文档.我想限制对该文档的访问.在default.aspx页面中,存在一个按钮. 我的文件夹结构看起来像 -NewFolder1 (我要限制此文件夹) Secret.txt web.config -Default.aspx Default.aspx.cs web.config 我一直在寻找解决方案,但我无法完成 我在web.config(NewFolder1)文件里面写的:

< system.web > < 授权 > < 拒绝 用户 =" *" / > < /authorization > < /system.web >

还有一些我发现喜欢的地方

< 位置 路径 =" NewFolder1" > < system.web > < 授权 > < 拒绝 用户 =" *" / > < /authorization > < /system.web > < /位置 >

但还是一样,请建议我如何解决这个问题. 谢谢.

解决方案

请参考以下链接: www.sitefinity/devnet/kb/sitefinity-3-x/how-to-restrict-the-access-to-a-given-folder-for-a-specific-role. aspx [ ^ ] stackoverflow/questions/3776847/how-to- limit-folder-access-in-asp-net [ ^ ] www.dotnetfunda/forums/thread10590- how-to-restrict-access-to-specific-folder.aspx [ ^ ] --Amit

您好 可能是< allow users ="*"> 的问题 请参考:,将得到更多的澄清 > stackoverflow/questions/8987860/forms-authentication-not-working-发布后 [ ^ ] http: //www.asp/web-forms/tutorials/deployment/deploying-web-site-projects/Users-and-Roles-On-The-Production-Website-cs [ ^ ] 世居

hi I have a folder in my root directory and it contain a text document.I want to restrict that document from being access.In my default.aspx page a button is present. My folder structure looks like - NewFolder1 (I want to restrict this folder) Secret.txt web.config - Default.aspx Default.aspx.cs web.config I was googling for come over this but i am unable I wrote inside web.config(NewFolder1) file:

<system.web> <authorization> <deny users="*"/> </authorization> </system.web>

and some where i found to do like

<location path="NewFolder1"> <system.web> <authorization> <deny users="*"/> </authorization> </system.web> </location>

but still the same please suggest me how would i come across the problem. Thanks.

解决方案

Hi, Refer the links below: www.sitefinity/devnet/kb/sitefinity-3-x/how-to-restrict-the-access-to-a-given-folder-for-a-specific-role.aspx[^] stackoverflow/questions/3776847/how-to-restrict-folder-access-in-asp-net[^] www.dotnetfunda/forums/thread10590-how-to-restrict-access-to-particular-folder.aspx[^] --Amit

Hi May be the problem with <allow users="*"> Please Ref:,will get more clarification stackoverflow/questions/8987860/forms-authentication-not-working-after-publish[^] www.asp/web-forms/tutorials/deployment/deploying-web-site-projects/Users-and-Roles-On-The-Production-Website-cs[^] Shiju

更多推荐

限制访问文件夹

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

发布评论

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

>www.elefans.com

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