Hi,

I`d like to know if it is possible to configure a dll dinamically. I want to
change the dll.config values and make the dll take those new values.

If this is possible I'd like to go a bit further. I wrote a dll in c#
(usercontrol) which I use as an active X in asp.NET:

<object id="ActiveX" classid="HDControlesX.dll#HDControlesX.AccesoAdmin"
style="width: 150px; height: 100px"></object>

Id like to be able to configure this dll in the server without having to
compile the library again. At the moment, I have to compile the library in
order to make the settings changes work, but what I need is just to change a
file and that the dll takes the new arguments.

Thanks in advance

RE: dll configuration by dotNetDave

dotNetDave
Fri Mar 14 14:25:01 CDT 2008

Generally, it's standard practice to have settings for an dll sent into it
either via parms in the constructor of the class or properties. DLL's should
not have a configuration file. This way they can be easily used by mutiple
applications.

David

======================================
David McCarter [Microsoft MVP]
www.dotNetTips.com
David McCarter''''s .NET Coding Standards available at:
http://www.cafepress.com/geekmusicart.1654787045


"Cetel Sistemas" wrote:

> Hi,
>
> I`d like to know if it is possible to configure a dll dinamically. I want to
> change the dll.config values and make the dll take those new values.
>
> If this is possible I'd like to go a bit further. I wrote a dll in c#
> (usercontrol) which I use as an active X in asp.NET:
>
> <object id="ActiveX" classid="HDControlesX.dll#HDControlesX.AccesoAdmin"
> style="width: 150px; height: 100px"></object>
>
> Id like to be able to configure this dll in the server without having to
> compile the library again. At the moment, I have to compile the library in
> order to make the settings changes work, but what I need is just to change a
> file and that the dll takes the new arguments.
>
> Thanks in advance

Re: dll configuration by Cowboy

Cowboy
Fri Mar 14 15:30:56 CDT 2008

If you want fully dynamic assemblies, consider looking into Reflection. With
Emit, you can write a complete assembly from scratch. I am not sure about
changing the assembly in the way you envision, however.

--
Gregory A. Beamer
MVP, MCP: +I, SE, SD, DBA

Subscribe to my blog
http://gregorybeamer.spaces.live.com/lists/feed.rss

*************************************************
| Think outside the box!
|
*************************************************
"Cetel Sistemas" <CetelSistemas@discussions.microsoft.com> wrote in message
news:340280C4-A4A8-4A87-8357-0D212F578C1E@microsoft.com...
> Hi,
>
> I`d like to know if it is possible to configure a dll dinamically. I want
> to
> change the dll.config values and make the dll take those new values.
>
> If this is possible I'd like to go a bit further. I wrote a dll in c#
> (usercontrol) which I use as an active X in asp.NET:
>
> <object id="ActiveX" classid="HDControlesX.dll#HDControlesX.AccesoAdmin"
> style="width: 150px; height: 100px"></object>
>
> Id like to be able to configure this dll in the server without having to
> compile the library again. At the moment, I have to compile the library in
> order to make the settings changes work, but what I need is just to change
> a
> file and that the dll takes the new arguments.
>
> Thanks in advance