views:

76

answers:

4
A: 

First What is the reason behind using impersonation? Second, you need to have a valid user Windows name/password to impersonate the user?

Thanks

nitroxn
i am tryin to impersonate because i need to set access permissions through code.
ZX12R
A: 

What is "Plesk credentials"? Are they the ones used to log in to Plesk? If yes, I think they do not necessary correspond to the account on the machine with the web server.

wRAR
yes.by plesk credentials i mean the user name and password i use to login to the plesk. If i cannot use this to impersonate can you pls explain what you mean by -"account on the machine woth the web server".
ZX12R
Why do you think you are allowed to do impersonation on your hosting?You can only impersonate valid accounts and you don't necessarily have one on the web server machine.
wRAR
A: 

face the similar issue yesterday, what you need to do is to ensure the user account you want to impersonate already exist in your debugging machine.

CliffC
A: 

I believe the answer to your question is in the error message: the account you are using does not exist or you supplied an incorrect password.

The question being where the user does not exist. If you are using <authentication mode="Windows"/> in Web.config (which I guess you are) it would mean that your Active Directory (the domain controller for your domain (NS1)) or your Windows-box (if NS1 is the name of your (devel or server) machine) does not know the user. Actually I am unsure how (if?) impersonation works with something else than AD/Windows.

Btw: your format is correct. UserName like <domain>\<username> and a (valid) password in "password".

More information can as often be found on the Microsoft website.

scherand