简体   繁体   English

如何解决“访问路径...”错误?

[英]How to resolve the “Access to the path…” error?

In my asp.net application, I have an xml file in this path: 在我的asp.net应用程序中,我在以下路径中有一个xml文件:

~/Admin/App_Data/myXmlFile.xml

When I try inserting/deleting or updating on this file, it gives me this error: 当我尝试在此文件上插入/删除或更新时,出现以下错误:

Error: Sys.WebForms.PageRequestManagerServerErrorException: Access to the path ... is denied.

How could I resolve this? 我该如何解决?

Thanks, 谢谢,

This looks like similar to what I had faced a while back. 这看起来与我前一段时间遇到的情况类似。 I had a similar problem when website was hosted at C:\\Users\\UserName\\Documents\\My Web Sites . 当网站托管在C:\\Users\\UserName\\Documents\\My Web Sites时,我遇到了类似的问题。 It was because with Windows Vista or Windows 7 it requires Administration Privilege to update anything inside C:\\ (drive where your OS is installed). 这是因为在Windows VistaWindows 7它需要管理权限才能更新C:\\ (安装了操作系统的驱动器)中的任何内容。

Your problem looks like pretty match to that, try hosting your website on different location to diagnose if this is the case. 您的问题看起来很合适,请尝试将您的网站托管在其他位置以诊断是否存在这种情况。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM