[英]ASP.NET Webforms Accessing Files not in application directory
How can I programmatically access files via a url that are located in a directory not in the application directory? 如何通过编程方式通过不在应用程序目录中的目录中的URL访问文件? For example, if I have a url like mysite.com that paths to c:\\mysite, I want to have a url like: mysite.com/reports that paths to c:\\reports.
例如,如果我有一个类似于mysite.com的URL,它指向c:\\ mysite,则我想有一个类似URL:mysite.com/reports的c:\\ reports路径。
Am I able to write code that enables to sniff the incoming url request and map it to the appropriate directory? 我可以编写代码来嗅探传入的url请求并将其映射到适当的目录吗?
您可以尝试使用已经可以访问该文件夹的帐户来使用模拟,或者为IIS工作进程授予对所需文件夹的访问权限。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.