asp.net - How can I store application specific info in web.config such as number of threads to be run? -


itemprop = "text">

I have a module that uses multithreading. I want to store the number of threads created by the module in the web.config file.

Which tags should I use?

Place it in the App Settings section.

  & lt; App settings and gt; & Lt; Add Key = "myModuleThreadCount" value = "4" /> & Lt; / AppSettings & gt;  

Then in your code, reference it as:

  var thread = int.Parse (WebConfigurationManager.AppSettings ["myModuleThreadCount"]);  

Comments

Popular posts from this blog

c++ - Linux and clipboard -

What is expire header and how to achive them in ASP.NET and PHP? -

sql server - How can I determine which of my SQL 2005 statistics are unused? -