how can use configurationmanager.openexeconfiguration() in web asp project?
i cannot change method used config info, since it's part of compiled dll in else's sdk. there no way me change it.
error i'm getting is;
system.argumentexception exepath must specified when not running inside stand alone exe. @ system.configuration.configurationmanager.openexeconfigurationimpl(configurationfilemap filemap, boolean ismachine, configurationuserlevel userlevel, string exepath, boolean preload) @ system.configuration.configurationmanager.openexeconfiguration(configurationuserlevel userlevel)
i tried solving adding following line;
appdomain.currentdomain.setdata("app_config_file", @"\\pathto\web.config");
but not solve issue.
my next bet somehow override configurationmanager.openexeconfiguration()
method whet it's called, should instead call configurationmanager.openwebconfiguration()
web version of same method.
can rout me how accomplish this?
thanks in advanced, -aron
to make sure understand: call openexeconfiguration
in compiled .dll , need override behaves differently?
you can't. seems odd compile library can function in non-web environment unless had ruled out possibility of using other way.
it's long shot, try decompiling jetbrains dotpeek. can export new visual studio project can edit , recompile. i've had on occasions when either didn't have source code or wasn't sure right source code.
in process of decompiling , looking through maybe you'll find way load configuration settings.
Comments
Post a Comment