Newbie Question About Using configSource in web.config

  • Thread starter Thread starter jdp
  • Start date Start date
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.
 
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.

--
Gregory A. Beamer
MVP; MCP: +I, SE, SD, DBA
http://gregorybeamer.spaces.live.com/

*************************************************
Think Outside the Box!
*************************************************
 
Back
Top