"Specified user does not have valid profile ,Unable to load assmebly"
string _path="C:\\TTG\\Tools\\TtgUpdate\\" 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\\TTGTT\\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);
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)