Fiddler / Load and Save User Preferences / extention -


i have created fiddler extension working great. decided add more functionality, , save user preferences configuration file. works great if run extension own directory. eg.i navigate c:\users\richa\documents\fiddler2\scripts, , run application.

however, when fiddler run c:\programs..., , fiddler picks extension user directory, fails. took me awhile find it, fails silently, without info in fiddler logs (and yes turn verbosity)

here screen shot of error: enter image description here

i captured attaching debugger fiddler... using system.configuration failing when attempts open/create/write file.

specifically section of code:

 if (_configuration == null)   {     // current configuration file.     _configuration = configurationmanager.openexeconfiguration(configurationuserlevel.none);   }    // add custom section application   // configuration file.   if (_configuration.sections[nameof(webhookparametersection)] == null)   {     _configuration.sections.add(nameof(webhookparametersection), _webhookconfiguration);     // save application configuration file.     _webconfigurationmanagement.savewebconfigurationparameters();   }    _webhookconfiguration = _configuration.getsection(nameof(webhookparametersection)) webhookparametersection; 

so thought need elevated permissions open/create/write file context of when fiddler running it's installed directory. however, running fiddler in admin mode didn't help.

my question is, how can prefs saved in fiddler extension?

it hard goes on without having code of extension.

the deal fiddler loads extensions reflection. extension ends in fiddler app domain. depending on how use system.configuration api either read settings stored in fiddler.exe.config or try modifying it. don't want anyways. prevents doing when running fiddler admin windows uac.


Comments

Popular posts from this blog

amazon web services - S3 Pre-signed POST validate file type? -

c# - Check Keyboard Input Winforms -