By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
434,711 Members | 2,144 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 434,711 IT Pros & Developers. It's quick & easy.

Session Variables holding VB COM objects (Apartment Threading)

P: n/a
I have read couple of articles warning against the use of storing VB COM
objects (Apartment Threading) in Session Variables due to the fact that
these variables could go bad.

My question is what's the workaround this?

I have also read about making ASP Stateless...I'm guessing that means
turning the session and application variables off and if you do that
then how do you pass information for a particular user from one page to
another?

I'm confused about how to get an ASP site working without using
Application and Session variables as well as not storing VB COM objects
in Session Variables.

Any explanation in this regard would be very much appreciated.

Thanks,
Andy.

*** Sent via Developersdex http://www.developersdex.com ***
Dec 8 '05 #1
Share this Question
Share on Google+
4 Replies


P: n/a
Andy Kasotia wrote:
I have read couple of articles warning against the use of storing VB
COM objects (Apartment Threading) in Session Variables due to the
fact that these variables could go bad.

My question is what's the workaround this?
All you can do is create arrays or xml documents containing the data
contained in the COM objects ans store them in session/application instead.

I have also read about making ASP Stateless...I'm guessing that means
turning the session and application variables off You can only turn session off.
and if you do that
then how do you pass information for a particular user from one page
to another?

You would have to use a database, or txt/xml files on the web server

--
Microsoft MVP -- ASP/ASP.NET
Please reply to the newsgroup. The email account listed in my From
header is my spam trap, so I don't check it very often. You will get a
quicker response by posting to the newsgroup.
Dec 8 '05 #2

P: n/a
Bob,

Appreciate your response. I'm not sure if I understand how to implement
what you're mentioning. Are you suggesting that whatever data retrieved
from VB COM Ojects should be stored in XML files and to include the XML
files on every ASP page? If that's what you are referring to then,
wouldn't we be creating lots of XML files for each user that logs in and
how would be make sure that the data in the XML files corresponds to the
user that requested the data? If you or anyone else reading this post,
just on a high-level explain the process and setup flow, I would
appreciate that.

Thanks much,
Anand.
*** Sent via Developersdex http://www.developersdex.com ***
Dec 8 '05 #3

P: n/a
Bob Barrows or can anyone else give a high-level explanation of how the
above can/should be designed?

Appreciate all your responses in advance.

Anand.

*** Sent via Developersdex http://www.developersdex.com ***
Dec 9 '05 #4

P: n/a
Andy Kasotia wrote:
Bob,

Appreciate your response. I'm not sure if I understand how to
implement what you're mentioning. Are you suggesting that whatever
data retrieved from VB COM Ojects should be stored in XML files and
to include the XML files on every ASP page?
You've got it. That's exactly what i was talking about. You need a way to
persist the data from the COM object between pages, right? There's really no
need to persist the functionality in your COM object since it can be
instantiated whenever a page needs it.
If that's what you are
referring to then, wouldn't we be creating lots of XML files for each
user that logs in
Yes. A database may be a better solution ...
and how would be make sure that the data in the XML
files corresponds to the user that requested the data?


The naming convention for the files would include a reference to the user
that created them. It's up to you how this should be implemented. You could
even use the Session ID as part of the name of the files.
Again, a database would likely be better for this if you anticipate a lot of
user activity.

Bob Barrows
--
Microsoft MVP - ASP/ASP.NET
Please reply to the newsgroup. This email account is my spam trap so I
don't check it very often. If you must reply off-line, then remove the
"NO SPAM"
Dec 9 '05 #5

This discussion thread is closed

Replies have been disabled for this discussion.