Did you ever figure this out?
I am trying to use ClickOnce from a test domain that checks on a published share on the corporate domain.
For impersonation I am using a cleaned up version of this code:
The impersonation code I wrote works as follows:
Impersonator imp = new Impersonator("corp", "user", "password");
bool foo = File.Exists(@"\\server\share\file.txt");
imp.Start();
foo =File.Exists(@"\\server\share\file.txt");
imp.Stop();
foo =File.Exists(@"\\server\share\file.txt");
I then try to use ApplicationDeployment and get an Access Denied:
if (ApplicationDeployment.IsNetworkDeployed)
{
ad = ApplicationDeployment.CurrentDeployment;
imp.Start();
info = ad.CheckForDetailedUpdate();
imp.Stop();
}
I tried adding the domain account to my local machine's Administrators group, but that didn't seem to make a diff.
I guess I could try to set up a trust relationship between my test domain and the corporate domain, but I was really hoping to just impersonate a generic role account and get ClickOnce to work that way. :(
Pv