Newbie Question About Using configSource in web.config

J

jdp

I'm able to use the configSource property of the <connectionStrings>
element and all is well. As an experiment, I also set configSource on
the <profile>, <membership>, <roleManager>, and <sessionState>
elements to point to respective config files. Again all seems to work
well. However; I notice in each of the respective configSource files,
minus the one used for <connectionStrings>, I get a blue squiggly line
and the tip that is displayed states "The element is not declared.'
Why is this showing for all elements save <connectionStrings>?

As an example, I have <membership configSource="devMembership.config"
/> in web.config. In devMemberhip.config, the blue squiggly line is
displayed under <membership>.

Is this something I should be worried about? Should this not be done
at all?

Any feedback would be appreciated.

Thanks.
 
C

Cowboy \(Gregory A. Beamer\)

The main reason for configSource is for config elements that might have to
be changed at runtime. If you put them in the web.config, you will end up
with a locked file. If you manually change, you recompile and boot all live
sessions. Yuck!

It is not the wisest use to use this on elements that a built in object
calls, unless you know the object in question makes a call whenever it needs
the information. SOme objects cache config items and changing will not do
anything. This is why going overboard on configSource is not a good idea.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,770
Messages
2,569,584
Members
45,075
Latest member
MakersCBDBloodSupport

Latest Threads

Top