Using Impersonation for ASP and ASP.NET in Cloud Sites
Your ASP or ASP.NET site (and all websites, in fact) use web servers to show your web content to website visitors. This web server has its own user account on your server. This means you can track the files the web server has read, written to, and scripts it has executed. The web server user often has different permissions than you do as the website administrator.
There are times when you might need the web server user to have the same permissions you do. This is called impersonation: the web server user “impersonates” your site’s main file transfer protocol (FTP) user. This means that it has permission to write to your files, create files, create folders, and perform other activities that would normally require full read, write, and execute permissions. If your content management system (CMS) or application needs these permissions, you must enable impersonation in your web.config file.
Where is my website located?
To find out where your account is located, check the test link for your site. If your test link includes “phx” in the URL, such as:
www.domain.com.asp1-3.phx3-1.websitetestlink.com
then your account is in PHX. It is the same format for ORD or DFW. (PHX = DFW for this statement)
If your site is deployed in our PHX data center, add the following lines to your web.config file:
<configuration>
<system.web>
<identity impersonate="true" userName="dfwUSERNAME" password="PASSWORD" />
</system.web>
</configuration>You must replace “USERNAME” and “PASSWORD” with your website’s main FTP username and password.
If your site is deployed in our LAN data center (LAN = ORD for this statement), add the following lines to your web.config file:
<configuration>
<system.web>
<identity impersonate="true" userName="ordUSERNAME" password="PASSWORD" />
</system.web>
</configuration>You must replace “USERNAME” and “PASSWORD” with your website’s main FTP username and password.