Hi Morten
Thanks for your quick response.
The web.config setting is
<add key = "MaximumIterations" value="10" />
and in the code
maximumIteration =
Convert.ToInt32(System.Configuration.Configuration Settings.AppSettings["MaximumIterations"]);
I have got a method to return all the configuration setting. however
this just does not return anything.
private void GetAllAttributes()
{
for( int i = 0;
i<System.Configuration.ConfigurationSettings.AppSe ttings.Count; i++)
{
System.Diagnostics.EventLog.WriteEntry("My
Application",System.Configuration.ConfigurationSet tings.AppSettings[i]);
}
}
Cheers
Prabu Girirajan
Morten Wennevik wrote:
Hi Prabu,
How do you configure web.config?
If you put a key under appSettings you can read it using the
ConfigurationManager.
//web.config
<add key="Mykey" value="MyValue" />
//code
string myKey = ConfigurationManager.AppSettings["MyKey"];
On Mon, 18 Sep 2006 10:55:40 +0200, <pr*************@gmail.comwrote:
Hi,
I have a web application which internally calls certain web methods of
a web service. This web service has a interop to ATL COM Component and
that ATL component calls a .NET assembly.
I would like to access a key value in the .NET assembly. I added this
to the Web.Config of the Web Service however it didnt read the value.
I also tried adding to the Web.config of the Web application however i
am faced with the same problem.
Am I missing any configuration to get this working
Cheers
Prabu
--
Happy Coding!
Morten Wennevik [C# MVP]