473,503 Members | 1,657 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

vb dll instancing in Session variables

Disclaimer: I'm fully aware that the following is not the proper way to
do things, and that one should never, ever create objects in Session
scope, but it's all I've got to work with until the next version of the
application is released. That aside...

I'm in charge of a web application that creates a Apartment-threaded VB
dll and places it in a Session variable for each user during
Session_OnStart. The dll controls all database transactions (Access
database) and holds specific user info. The idea is that each user
accessing the web application would get their own instance of the dll
and that there would be no shared data among users logged in.

The application has worked fine for the last 4 years. Recently, the
dll code was changed to include .bas modules (the previous version used
only classes). More recently still, I noticed that information one
user was entering into the application was being saved into another
user's record that the second user was editing. I haven't been able to
reproduce the error, although when the original error occurred there
were around 15 concurrent users online.

Thinking it had something to do with the recent change, the dll was
reworked to get rid of the .bas modules. I still haven't been able
reproduce the error but I'm still leery as to whether the problem was
truly fixed or if the application has been "broken" all along and it
took 15 concurrent users to create the problem.

That's a long way around to my question, which is this: Does the setup
mentioned above actually create a new instance of the dll for each user
and is that instance "safe" from other users? I want to be sure that
each user has access to his own separate instance of the dll and only
that instance.

Thanks,
-KyleC

Oct 10 '05 #1
2 1366
IMO this is caused by the module stuff. It doesn't create a "DLL" instance
but a class instance. So if each class instance has its own data, no
problem. If they use a variable level module, they will share the same
value... (as modules are not instanciated).

--

Patrice

"KyleC" <so***********@charter.net> a écrit dans le message de
news:11**********************@g43g2000cwa.googlegr oups.com...
Disclaimer: I'm fully aware that the following is not the proper way to
do things, and that one should never, ever create objects in Session
scope, but it's all I've got to work with until the next version of the
application is released. That aside...

I'm in charge of a web application that creates a Apartment-threaded VB
dll and places it in a Session variable for each user during
Session_OnStart. The dll controls all database transactions (Access
database) and holds specific user info. The idea is that each user
accessing the web application would get their own instance of the dll
and that there would be no shared data among users logged in.

The application has worked fine for the last 4 years. Recently, the
dll code was changed to include .bas modules (the previous version used
only classes). More recently still, I noticed that information one
user was entering into the application was being saved into another
user's record that the second user was editing. I haven't been able to
reproduce the error, although when the original error occurred there
were around 15 concurrent users online.

Thinking it had something to do with the recent change, the dll was
reworked to get rid of the .bas modules. I still haven't been able
reproduce the error but I'm still leery as to whether the problem was
truly fixed or if the application has been "broken" all along and it
took 15 concurrent users to create the problem.

That's a long way around to my question, which is this: Does the setup
mentioned above actually create a new instance of the dll for each user
and is that instance "safe" from other users? I want to be sure that
each user has access to his own separate instance of the dll and only
that instance.

Thanks,
-KyleC

Oct 10 '05 #2
Thanks for the reply. That was what I was hoping to hear.

-Kyle

Oct 11 '05 #3

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

Similar topics

6
2365
by: Al Jones | last post by:
This is a repost form the vbscript newgroup - if this isn't the appropriate group would you point me toward one that is. Basically, I seem to be losing session data part way though preparing an...
6
656
by: Lina Manjarres | last post by:
Hello, I have a session variable in a login page. Then I go to a form page where I uses the ProfileID and the UserID. Then I go to a result page where I would like to use the UserID as a filter,...
4
5573
by: PJ | last post by:
A particular page seems to be having issues with correctly setting Session variables. I am setting a couple of session variables on the Page_Unload event. While stepping through code, the...
31
6967
by: Harry Simpson | last post by:
I've come from the old ASP camp where session variables were not used. When i started using ASP.NET in 2001, I started using them again because it was ok from what I'd read. I've been merrily...
10
3478
by: tshad | last post by:
I have been using the default session state (InProc) and have found that I have been loosing my information after a period of time (normally 20 minutes). Is there anyway to find out how much...
3
2889
by: Alan Wang | last post by:
Hi there, Once my application gets complicated and complicated. I found it's really hard to keep track of Session value I am using in my asp.net application. I am just wondering if anyone have...
3
2664
by: Phillip N Rounds | last post by:
I'm writing a user control which has two states: Active & InActive. I additionally am required that there to be only one active control per page, and all logic has to be contained within the...
18
3401
by: BillE | last post by:
When a user opens a new IE browser window using File-New-Window the integrity of an application which relies on session state is COMPLETELY undermined. Anyone who overlooks the fact that...
26
3576
by: BillE | last post by:
Some ASP.NET applications use Session Variables extensively to maintain state. These should be re-written to use viewstate, hidden fields, querystring, etc. instead. This is because if a user...
0
7072
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...
0
7271
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,...
0
7319
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...
1
6979
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...
0
7449
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...
0
5570
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,...
1
4998
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...
0
1498
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 ...
0
373
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...

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.