473,624 Members | 2,290 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Cost of using web.config


What's the cost of using a web.config key in a web method?

Is the value cached at start up? Or at first run? Or read on each
access?

Is web.config always "read off the disk" or can the file be cached?
I'm debating putting in a AppSetting[] entry versus hard coding for a
web service handling many hundreds of requests per hour.

--
Texeme Construct
http://www.myspace.com/texeme

Aug 15 '06 #1
4 1233
The web.config is read at app startup and everything in it is cached.

--
HTH,

Kevin Spencer
Microsoft MVP
Chicken Salad Surgery

Orange you bland I stopped splaying bananas?
"John Bailo" <ja*****@texeme .comwrote in message
news:o8******** *************** *******@speakea sy.net...
>
What's the cost of using a web.config key in a web method?

Is the value cached at start up? Or at first run? Or read on each
access?

Is web.config always "read off the disk" or can the file be cached?
I'm debating putting in a AppSetting[] entry versus hard coding for a web
service handling many hundreds of requests per hour.

--
Texeme Construct
http://www.myspace.com/texeme

Aug 15 '06 #2
In Addition, if you change web.config, the web application will restart
automatically to get the changes.

On Tue, 15 Aug 2006 21:42:26 +0200, Kevin Spencer <uc*@ftc.govwro te:
The web.config is read at app startup and everything in it is cached.


--
Happy Coding!
Morten Wennevik [C# MVP]
Aug 16 '06 #3
Kevin,

I could be mixing things up a bit here - I rememebr something about
AppSetting values are not cached and the AppSetting collection is read in
its entirety each time you request a value from it. So, read it once and
stick it in the app object if you want it cached.

Has it changed with 2.0 or am I wrong about it anyway?

--
--
Regards

John Timney (MVP)
"Kevin Spencer" <uc*@ftc.govwro te in message
news:%2******** ********@TK2MSF TNGP06.phx.gbl. ..
The web.config is read at app startup and everything in it is cached.

--
HTH,

Kevin Spencer
Microsoft MVP
Chicken Salad Surgery

Orange you bland I stopped splaying bananas?
"John Bailo" <ja*****@texeme .comwrote in message
news:o8******** *************** *******@speakea sy.net...
>>
What's the cost of using a web.config key in a web method?

Is the value cached at start up? Or at first run? Or read on each
access?

Is web.config always "read off the disk" or can the file be cached?
I'm debating putting in a AppSetting[] entry versus hard coding for a web
service handling many hundreds of requests per hour.

--
Texeme Construct
http://www.myspace.com/texeme


Aug 16 '06 #4
Hello John
The value is cached at first run . whenever the web.config file changes, the
value is again read from web.config file.
I would recommend using web.config file because of the flexibility it brings
to the table than hard coding.
Thanks
Deepak

"John Bailo" wrote:
>
What's the cost of using a web.config key in a web method?

Is the value cached at start up? Or at first run? Or read on each
access?

Is web.config always "read off the disk" or can the file be cached?
I'm debating putting in a AppSetting[] entry versus hard coding for a
web service handling many hundreds of requests per hour.

--
Texeme Construct
http://www.myspace.com/texeme

Aug 24 '06 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
3580
by: Dan | last post by:
I am a relatively new user on Oracle 9.2.0.1 and I am having trouble performance tuning this production database. I am running a large query that joins two tables, document(3 mil) and entity(9 mil). I have reorganized my tablespaces so that the two tables are on different tablespaces, different disks. They both have their indexes stored on a third tablespace. Before reconfiguring the production database, I was getting a range scan on...
2
3096
by: Dan | last post by:
I am a relatively new user on Oracle 9.2.0.1 and I am having trouble performance tuning this production database. I am running a large query that joins two tables, document(3 mil) and entity(9 mil). I have reorganized my tablespaces so that the two tables are on different tablespaces, different disks. They both have their indexes stored on a third tablespace. Before reconfiguring the production database, I was getting a range scan on...
6
4815
by: Billy Jacobs | last post by:
I have a website which has both secure and non-secure pages. I want to uses forms authentication. How do I accomplish this? Originally I had my web.config file in the root with Forms Authentication set up and it worked just fine. Then I realized that I needed to have some pages unsecure. I then created 2 directories. One named Secure and the other named Public. I placed my web.config file in my
5
1877
by: Pedro Alves | last post by:
Hi. I'm having some trouble on the use of indexes. The querys below are exactly the same but refer to different months. One case uses indexes, the other doesn't. Is there anything I can do? Increasing index mem size? Query 2 hash 9105 entries matching the given conditions Query 2 hash 9248 entries matching the given conditions
41
3063
by: Matt Alanzo | last post by:
Our SOHO 2 person compay sells furniture (not programmers). In '98 we paid $,$$$ for a VBA -Access '97 accounting application, including VBA source code .... an huge investment for us then (and now!). The application publisher went belly up years ago. Over time we've made a number of VBA code changes (< 500 lines total). Now our CPA is urging us to switch to Quickbooks Premier for Contractors at a cost of $,$$$ plus data entry. Argh, no...
4
1474
by: John Bailo | last post by:
What's the cost of web.config parameters? Low or high? Is web.config read into memory? Or is there disk access each time a parameter is read ? -- W '04 <:> Open Source
2
4854
by: elissa | last post by:
hi guys i really wish if some one could help me with this problem , well i solved it but the output is always wrong so can some one help me: the Question is in this link: http://people.westminstercollege.edu/faculty/ggagne/fall2006/306/handouts/hw2/index.html can some one please help me with the dynamic programing part of the question this is what i did so far: --------------------------------- #include <iostream> using...
5
4584
by: jamesnkk | last post by:
I want to calculate the average price, I have a cost price table- tblcostPrice as below,Same part no can be purchase from different supplier at different cost. In my tblcostPrice I have 2 suppliers for the same part at different cost Part No - KN-12345 Product ID....SUPPLIER......Qty......Cost price A0123.........AAA CO.......1000..... 0.90 A0123.........AAA CO...... 5000..... 0.70 A0123.........AAA CO.......9000..... 0.55
12
3249
code green
by: code green | last post by:
I need to monitor the change in the cost price of products. The historic cost of every product is stored in a table 'trade' So by comparing the latest two entries per product based on the field 'last_updated' I can measure the change in cost price. But I am struggling with the query. I think I need to JOIN the same table using aliases so- SELECT lastprice.part, lastprice.cost, lastprice.last_updated, thisprice.cost, thisprice.last_updated...
0
8177
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
8681
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
8629
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
8341
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
7170
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
6112
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
4084
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
4183
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
1793
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.