dynamics crm 2011 - Reading the registry -
my development machine virtualbox window server 2008 r2. using crm2011 roll-up 12. development use framework 4
from crm call aspx-page, page contains grid records can select. after made selection, press button , passes selection assembly. assembly has function checks if key in registry available. if continues, if not returns.
the problem i'm facing here receive error trying read registry using opensubkey() telling me i'm not authorized so. use code below retrieve key. assembly not signed. signing assembly doesn't change result.
registrykey localkey = null; if (environment.is64bitoperatingsystem) { localkey = registrykey.openbasekey(microsoft.win32.registryhive.currentuser, registryview.registry64); } else { localkey = registrykey.openbasekey(microsoft.win32.registryhive.currentuser, registryview.registry32); }
doing same thing console application using same assembly giving no problems.
regards, martin
verify applicationpool identity has read access registry key in question.
check user application pool using in iis open registry key in regedit , check permissions.
Comments
Post a Comment