yes.. I just found out that's one way of doing it... but I checked on a
sample project by ASP.NET Community Stater kit and they config their
application like this..
<configuratio n>
<configSections >
<sectionGroup name="community StarterKit">
<section name="Isp"
type="ASPNET.St arterKit.Commun ities.Communiti esSectionHandle r,ASPNET.Starte r
Kit.Communities " />
<section name="pagePaths "
type="ASPNET.St arterKit.Commun ities.Communiti esSectionHandle r,ASPNET.Starte r
Kit.Communities " />
<section name="database"
type="ASPNET.St arterKit.Commun ities.Communiti esSectionHandle r,ASPNET.Starte r
Kit.Communities " />
<section name="services"
type="ASPNET.St arterKit.Commun ities.Communiti esSectionHandle r,ASPNET.Starte r
Kit.Communities " />
</sectionGroup>
</configSections>
<communityStart erKit>
<Isp>
<add key="IspUsernam e" value="admin" />
<add key="IspPasswor d" value="a1854928 " />
</Isp>
<pagePaths>
<add key="basePage" value="/communityDefaul t.aspx" />
<add key="baseServic e" value="/communityServic e.asmx" />
</pagePaths>
<database>
<add key="connection String"
value="server=l ocalhost;uid=sa ;pwd=secret;dat abase=community StarterKitNEW"
/>
</database>
<services>
<add key="enableServ iceTimer" value="true" />
</services>
</communityStarte rKit>
<system.web>
<compilation debug="false" />
......
I wonder how they come up with that. And notice that they have
<configSections > section above at the start of it. I can't find any info
about that anywhere.
Thanks.
----------------------------------------------------------------------------
---- -----------------------------------------------------------------------
---------
"Ken Cox [Microsoft MVP]" <BA************ @sympatico.ca> wrote in message
news:OP******** ******@TK2MSFTN GP09.phx.gbl...
You've got to use the correct keywords and syntax. You can't make up your
own hierarchy like that. You'll want something like this:
<appSettings>
<add key="Applicatio n1" value="MyApplic ation1" />
<add key="Setting1" value="MySettin g" />
</appSettings>
See the hierarchy here:
http://msdn.microsoft.com/library/de...ionsschema.asp
Ken
"Razak" <ra***@mmsc.com .my> wrote in message
news:Or******** ******@TK2MSFTN GP12.phx.gbl... Hello, I'm new with ASP.NET.
I've seen samples which has custom 'entry' in Web.Config which works
well. But when I enter my 'entry', it produces app error:
The entry is like below:-
<?xml version="1.0" encoding="utf-8" ?>
<configuratio n>
<myAspApp>
<database>
<add key="connection String" value="Server=s qlserver; uid=sa;
pwd=1234; database=testDB " />
</database>
</myAspApp>
<system.web>
.
.
.
</system.web>
</configuration>
Why doesn't it work for me whereas the samples implement the same method
for
configuring its app db connection?
Please help. Thanks.
--------------------------------------------------------------------------
--
---- ---------------------------------------------------------------------
--
---------