ASP.Net 3.5中的发布问题 [英] Publishing issue in ASP.Net 3.5

查看:70
本文介绍了ASP.Net 3.5中的发布问题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述


我正在使用ASP.NET 3.5开发Web应用程序.在应用程序中,有一个包含一些文档的文件夹,这些文档由客户端保存.当我们发布网站时,包含文档的文件夹在已发布文件夹"中可见.有什么办法可以隐藏该文件夹,因为该文件夹包含一些敏感信息.

Hi,
I am Developing a web application using ASP.NET 3.5. In application there is a folder containing some documents, which are saved by the Client. When we publish the website that folder containing document is visible at Published Folder. Is there is any way to hide that folder because folder contains some sensitive information.

推荐答案

是的,您应该将Document文件夹保留在"App_Data"文件夹中.此文件夹是受限制的文件夹,并且Asp.net运行时不允许用户通过浏览器访问此文件夹.

此外,如果要将文档存储在其他文件夹中(不在"App_Data"文件夹中,则可以限制IIS中的文件夹访问.请参见 ^ ]

另一个可能的选择是将上载的文档存储到Web应用程序的根文件夹之外的文件夹中.在这种情况下,用户将永远无法访问该文件夹.
Yes, you should maintain the Document folder within the "App_Data" folder. This folder is a restricted folder and Asp.net runtime does not let user to access this folder via browser.

Besides, if you want to store your documents in some other folder (Not within the "App_Data" folder, you can restrict the folder access in IIS. See http://support.microsoft.com/kb/313075[^]

Another possible option is to store the uploaded documents into a folder that is outside of the web application''s root folder. In that case, user will never be able to access that folder.


这篇关于ASP.Net 3.5中的发布问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆