简体   繁体   English

拒绝访问路径或如何为机架空间站点添加模拟?

[英]Access to the path is denied or How Do I Add Impersonation for a rackspace site?

Writing to an XML file in the website and facing 'Access to the path xxx is denied' error on rackspace cloud hosting? 在机架云托管上写入网站中的XML文件并面临“拒绝访问xxx路径”错误?

The answer has to be impersonation but what is the secret sauce? 答案必须是冒充,但秘诀是什么?

This is Q&A style. 这是问答式。 See my answer below. 请参阅下面的答案。

UPDATE: Setting the security on the folder while while logged in as admin with my FTP client to "Other" worked without impersonation. 更新:在使用FTP客户端以admin身份登录到“其他”时,在文件夹上设置安全性的工作没有冒充。 Allowing updates through the web app. 允许通过网络应用进行更新。

Write to a file in the website requires impersonation. 写入网站中的文件需要模拟。 In this environment I was unable to get impersonation to work from code behind so the only option was a web.config solution. 在这种环境下,我无法从后面的代码中模拟工作,因此唯一的选择是web.config解决方案。

The user is the FTP user you have set up. 该用户是您设置的FTP用户。 You can and should set up an FTP user just for this and restrict its rights for security. 您可以并且应该为此设置一个FTP用户,并限制其安全权限。 The real key is to know if you are an ORD user or a DFW user. 真正的关键是要知道您是ORD用户还是DFW用户。 These are the current rackspace data centers. 这些是当前的机架数据中心。 Below is an impersonation example for the ord data center. 以下是ord数据中心的模拟示例。

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

In order to discover what data center your site is out of you could try one then the other or you could log into your control panel and look at the testlink for your site. 为了发现您的站点不在哪个数据中心,可以先尝试一个,然后再尝试另一个,或者可以登录控制面板并查看站点的测试链接。

Login to manage.rackspacecloud.com > Hosting > Cloud sites > [your site] > General Settings > Viewing and Editing > Testing URL 登录到manage.rackspacecloud.com>托管>云站点> [您的站点]>常规设置>查看和编辑>测试URL

If your link contains "ord" in it then your account is in ord else your account is in dfw. 如果您的链接中包含“ ord”,则您的帐户为ord,否则您的帐户为dfw。

Once you have made this config change make sure that you rebuild the application from your control panel. 进行此配置更改后,请确保从控制面板重建应用程序。

The rackspace site says the following but I have not found this to be true: 机架网站说以下内容,但我没有发现这是真的:

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.

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

相关问题 使用模拟删除文件-拒绝访问路径 - Delete file using impersonation - access to the path is denied 如何检查是否拒绝对字符串路径的访问? - How do I check if an access to a string path is denied? 如何将文件在线上传到文件夹而不会出现“对路径的访问被拒绝” - How Do I Upload a File To a Folder Online Without Getting "Access to the path is denied" 如何在dotnet core 1.1中使用模拟功能? - How do I use impersonation in dotnet core 1.1? 如何确保我的Windows模拟级别有效? - How do I make sure that my windows impersonation level is valid? 为什么我在尝试清除目录的内容时收到消息“拒绝访问路径 'bootmgr'” - Why do I get message “Access to the path 'bootmgr' is denied ” when trying to clear the contents of a directory 如何解决“拒绝访问路径”错误? - How to fix “Access to the path is denied” error? 为什么我得到System.UnauthorizedAccessException拒绝访问路径&#39;Google.Apis.Auth&#39;被拒绝 - Why do I get System.UnauthorizedAccessException Access to the path 'Google.Apis.Auth' is denied 如何防止“访问路径 .xlxs 被拒绝”错误? - How to prevent the 'Access to the path .xlxs is denied' error? 如何访问 Blazor 中的文件路径? - How do I access a file path in Blazor?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM