[JIRA] Created: (CC-1045) Windows service doesnt start , throws error saying specified user does not have valid profile to load assembly

"tesch (JIRA)" <[email protected]> Thu, 10 Nov 2011 16:24:18 -0600 (CST)
Newsgroups gmane.comp.java.cruise-control.devel
Message-ID <496991298.1320963858145.JavaMail.jira@chidmzhosting02.thoughtworks.com>
Windows service doesnt start ,throws error saying specified user does not have valid profile to load assembly
-------------------------------------------------------------------------------------------------------------

                 Key: CC-1045
                 URL: http://jira.public.thoughtworks.org/browse/CC-1045
             Project: CruiseControl
          Issue Type: Bug
         Environment: c#.net
            Reporter: tesch


Hi
 
I am using shadow copy to update my dll when its in use.When service starts, dll runs from shadowcopied domain as result of which dll remains unlocked and can be updated also.It works well and fine in my machine.
But when we tried running the service on other machine ,service throws the following error:
"Specified user does not have valid profile ,Unable to load assmebly"
 
Cachepath is getting created .but problem is its unable to load from the cachepath .what would be the cause?
find below the code i have used:
string _path="C:\\TTG\\Tools\\TtLUpdate\\"
 AppDomainSetup environment = new AppDomainSetup()
      {
         ApplicationBase = Path.GetDirectoryName(_path)
      };
 
       // instantiate the security policy for the application domain...
  Evidence evidence = AppDomain.CurrentDomain.Evidence;
       //Enable shadow copy option for the newly created domain for  the purpose to            
       // update TTGUpdateDLL when in use
AppDomain.CurrentDomain.SetShadowCopyFiles();
AppDomain.CurrentDomain.SetShadowCopyPath(Path.GetDirectoryName(_path));
environment.ShadowCopyDirectories = Path.GetDirectoryName(_path);
environment.ShadowCopyFiles = "true";
string _installPath = WindowsRegistry.Instance.Read(WindowsRegistry.REGKEYS.HKLM, "\\Software\\TTLTT\\System", "InstallDirectory");
environment.CachePath = _installPath + "\\Tools\\TtgUpdate\\AssemblyCatch";
environment.ApplicationName = "AppName";
string _shadowCopyPath = environment.CachePath + "\\" + environment.ApplicationName;
          
       // instantiate the application domain...
_appDomain = AppDomain.CreateDomain(friendlyName, evidence, environment);
             

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.public.thoughtworks.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

------------------------------------------------------------------------------
RSA(R) Conference 2012
Save $700 by Nov 18
Register now
http://p.sf.net/sfu/rsa-sfdev2dev1