拒绝访问路径或如何为rackspace站点添加模拟?

时间:2014-01-25 20:45:09

标签: c# asp.net .net rackspace-cloud

写入网站中的XML文件,并在rackspace云托管上面临“访问路径xxx被拒绝”错误?

答案必须是模仿,但秘诀是什么?

这是Q& A风格。请参阅下面的答案。

1 个答案:

答案 0 :(得分:0)

更新:在以管理员身份登录时设置文件夹的安全性,我的FTP客户端为“其他”,但没有模拟。允许通过网络应用进行更新。

写入网站中的文件需要假冒。在这种环境中,我无法模拟使用代码,因此唯一的选择是web.config解决方案。

用户是您已设置的FTP用户。您可以而且应该为此设置FTP用户并限制其安全权限。真正的密钥是要知道您是 ORD 用户还是 DFW 用户。这些是当前的机架空间数据中心。以下是ord数据中心的模拟示例。

<configuration>
  <system.web>
    <identity impersonate="true" userName="ord\USERNAME" password="PASSWORD" />
  </system.web>
</configuration>

为了了解您的网站所在的数据中心,您可以尝试使用另一个数据中心,也可以登录控制面板查看您网站的测试链接。

登录manage.rackspacecloud.com&gt;托管&gt;云网站&gt; [您的网站]&gt;一般设置&gt;查看和编辑&gt;测试网址

如果您的链接中包含“ord”,那么您的帐户就在其他地方,您的帐户就是dfw。

完成此配置更改后,请确保从控制面板重建应用程序。

机架空间网站说明了以下内容,但我认为这是真的:

    You **must** use the username which is configured to be the primary FTP 
         account for the cloud site you are working with. If the site was created
         under your main account, this will be your main control panel login 
         credentials. If the site was created under a client, please use the 
         client's main account credentials. When in doubt, you can always click 
         the security tab for a cloud site to confirm the primary ftp account.