本文介绍了限制访问文件夹的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
嗨
我的根目录中有一个文件夹,其中包含一个文本文档.我想限制对该文档的访问.在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[^] --AmitHi 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更多推荐
限制访问文件夹
发布评论