473,698 Members | 2,371 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Multithreaded access to HTTPApplication State

I am new to multithreading concepts and want to ensure i am doing the
following correctly:

I am planning to create a custom object and store it in the
HTTPApplication State of an ASP.Net application. This custom object will be
created at startup and not modified thereafter. The object will have one
property which holds a Hashtable. The Hashtable uses strings for keys and
ListDictionarie s for values. Each ListDictionary uses strings for keys and
strings for values. The custom object will have a method that looks up and
returns strings stored in the ListDictionarie s.

The .NET help file says "A Hashtable can safely support one writer and
multiple readers concurrently" without using a "Synchroniz ed" wrapper or
using the syncroot. Is this also true of a ListDictionary? Can I call my
lookup method on the custom object without having to worry about
multithreading since the objects are never modified after they are created,
and only read thereafter? Do I need to synchronize read access to the
property on my custom object that holds the Hashtable?

Thank you for your help,
Bob Reader
Jul 21 '05 #1
0 1166

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

Similar topics

3
5317
by: Anthony | last post by:
Hi, How does (Can?) the stream mechanism work in multithreaded programs? I want to implement cout in my multithreaded program.
2
6635
by: pradyumna | last post by:
In Project settins - C/C++ - Code Generation, what is the difference between the option "Multithreaded" and "Multithreaded DLL". I understand that on selecting multithreaded option, single and multithreaded applications can both use that dll, but what about multithreaded DLL option. Thanks
6
2784
by: Dan Kelley | last post by:
We have a multithreaded app that responds to events, and writes these events to a text file. This text file is used by an external system for further processing. We want to be able to write multiple entries to the file, and then rename it and copy it to a new location when the file reaches a certian size, or a certain time span elapses (which ever comes first). I have created a static/shared timer member variable in class that writes...
1
2341
by: daniel.bron | last post by:
I'm maintaining a C++ application written by a developer who has now left. The app is a multithreaded client/server app for financial data. My compiler is MS visual C++ 6.0. I'm a C++ neophyte. I took some C (not C++) courses in college, this is the only production C++ code I've worked with. I'm trying to add some logging, and having problems. My logging scheme is to have a global ofstream, which I initialize in a
0
404
by: Bob Reader | last post by:
I am new to multithreading concepts and want to ensure i am doing the following correctly: I am planning to create a custom object and store it in the HTTPApplicationState of an ASP.Net application. This custom object will be created at startup and not modified thereafter. The object will have one property which holds a Hashtable. The Hashtable uses strings for keys and ListDictionaries for values. Each ListDictionary uses strings...
0
993
by: Ajay Choudhary | last post by:
Hi, I have a custom SoapExtension class and in the "ProcessMessage" method I would like to get a handle of HttpApplicationState object. How can I do that ? Thanks, Ajay
2
3134
by: moi | last post by:
Hello, Dim strConn As String = "PROVIDER=Microsoft.Jet.OLEDB.4.0;DATA SOURCE=" & Application.StartupPath & "\app_data\aaaaaa.mdb;" Application.StartupPath does'nt work with ASP.NET 2 : BC30456: 'StartupPath' n'est pas un membre de 'System.Web.HttpApplicationState'
6
3474
by: Stephen Carson | last post by:
I'm trying to build a Web Service that will kick off threads as logging requests come in. These threads will then log to the database. I have been able to make a simple Web Service. I have been able to get a simple multi-threaded example working. I have been used the SqlDataAdapter and DataSet classes extensively to access databases in a deployed Windows Service. But I'm getting confused how to put the pieces together. For example, I...
1
2828
by: =?Utf-8?B?bW5vd29zYWQ=?= | last post by:
We have an ASP.NET 2.0 web site, running on IIS version 6.0, Windows 2003 server. On the Application_Start event of the Global.asax.cs, we load configuration values to the HttpApplicationState dictionary, to be used throughout by all web site pages, on a read-only fashion. The problem we are experiencing is that, after running for some hours, the values of the HttpApplicationState are lost. Our code never assumes there is a possibility...
0
9170
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
8871
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
1
6528
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
5862
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4371
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
4622
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
3052
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
2336
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2007
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.