views:

141

answers:

3
+1  Q: 

app.config

Hello,

for an easiness of my application I would need to have "runtime" element of app.config in separate file.

Tried something like

<runtime file="runtime.conf" />

and also

<runtime configFile="runtime.conf" />

and in runtime.conf I have:

<runtime>
 <assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1"> 
            .......
 </assemblyBinding>
</runtime>

But it is ignored ...

Is there a way to find out what is wrong.

Of course when I copy runtime section directly into app.config it works.

I somewhere found that when using configFile="..." included file must lay in a subdirectory. Tried it but it also doesn't work...

Seems including is not working for runtime section.

+1  A: 

Try this:

<runtime configSource="runtime.conf"/>
Andrew Hare
unfortunately the same result. I was trying it with configSource first and than also with "file" and copied code to my answer... But originally it should be "configSource", it simple ignores it damn :D
RomanT
A: 

Hi is your runtime.conf is in your bin folder of the application

It is exactly in the directory where app.config is.
RomanT
A: 

Hi, one draw back is that asp.net runtime does not detect when the external file like runtime.config changes. Are you failing to get the values after the runtime.config is changed

I don't get ANY values, in detail I make bindingredirection there to point an application to another version of particular DLL so I only check it using some monitor of DLL associated to my application that reports still older version of associated DLL.
RomanT