J
Jeff
Hi all!
IDE: Visual Studio 2003 .NET
OS: XP Pro
I'm experimenting with c# and created a webservice. I want to put
configuration settings into the web.config file so that the webservice gets
more flexible...
Below are 3 questions:
Question 1:
<?xml version="1.0" encoding="utf-8" ?>
<configuration>
<appSettings>
<add key="KeyName" value="KeyValue" />
</appSettings>
I have no problem accessing the value of KeyName with
"ConfigurationSettings.AppSettings["KeyName"];". But that doesn't mean it's
correct
My question is: Is my use of <appSettings> inside web.config correct?? I ask
because I thought <appSetting> only was an application setting, and not for
a webservice
Question 2:
KeyName/KeyValue is just for testing. But does .NET have any standards for
the name of a key?? for example for the database name???... or can the
developer use any name he wants to???
Question 3:
Is it correct to put database settings inside <appSetting>, or prefer .NET
to have the database settings elsewhere inside the web.config???
Jeff
IDE: Visual Studio 2003 .NET
OS: XP Pro
I'm experimenting with c# and created a webservice. I want to put
configuration settings into the web.config file so that the webservice gets
more flexible...
Below are 3 questions:
Question 1:
<?xml version="1.0" encoding="utf-8" ?>
<configuration>
<appSettings>
<add key="KeyName" value="KeyValue" />
</appSettings>
I have no problem accessing the value of KeyName with
"ConfigurationSettings.AppSettings["KeyName"];". But that doesn't mean it's
correct
My question is: Is my use of <appSettings> inside web.config correct?? I ask
because I thought <appSetting> only was an application setting, and not for
a webservice
Question 2:
KeyName/KeyValue is just for testing. But does .NET have any standards for
the name of a key?? for example for the database name???... or can the
developer use any name he wants to???
Question 3:
Is it correct to put database settings inside <appSetting>, or prefer .NET
to have the database settings elsewhere inside the web.config???
Jeff