473,400 Members | 2,145 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,400 software developers and data experts.

try 2 : asp session ref to a global obj: Gurus Required

I'm sure that the following is possible, I just need a little help
please.

I have a object which I declare as a application object "gObj".

I need to use "gObj" with all sessions. I need "gObj" to have access
based on the user's id. Is this possible without creating multiple
gObj's?

Code would be something like:

Application_OnStart
set gobj = Server.Create( "someDll" )

gobj.uname = "somename"
gobj.port = 1234
gobj.pwd = "pwd"
End
ASP page code:

<%
gobj.connect

' do stuff.
%>

So, what I want to do is:

<%

gobj.SelectUser( "userName" )
'do stuff

%>

Without this causing problems with "userName2"

<%

'called at the same time
gobj.SelectUser( "userName2" )

%>

Tough One Eh?

Likely not possible?

Thanks Gurus.

Alex.
Jul 19 '05 #1
1 1388
Alex wrote:
I'm sure that the following is possible, I just need a little help
please.

I have a object which I declare as a application object "gObj".


Don't store COM objects in Application (or Session). Especially if they are
ActiveX dll's created with VB. Instantiate the object on each page as
needed. Only free-threaded objects should be stored in Application. VB dll's
are apartment-threaded.

http://www.aspfaq.com/show.asp?id=2053

HTH,
Bob Barrows

--
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.
Jul 19 '05 #2

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

Similar topics

8
by: David Hitillambeau | last post by:
Hi guys, As I am new to Python, i was wondering how to declare and use global variables. Suppose i have the following structure in the same module (same file): def foo: <instructions>...
1
by: Nimmi Srivastav | last post by:
There's a rather nondescript book called "Using Borland C++" by Lee and Mark Atkinson (Que Corporation) which presents an excellent discussion of overloaded new and delete operators. In fact there...
2
by: francois | last post by:
Hi, I would like to redirect the user to the login page after the session time out. I tried to do a trick in the global.aspx.cs protected void Application_BeginRequest(Object sender,...
1
by: Keith-Earl | last post by:
This is an update of an unresolved issue. Windows 2000 Server IIS 5.0 ..NET Framework 1.1 Problem: Every time I press REFRESH in IE I get a new ASP Session ID. This problem only experienced...
0
by: mtcc | last post by:
i try simple web page, for first time i add session "aa" var, and i add button, and i check if session keep aa value in postback. when i add call to Dataadapter.fill method, i lost my session on...
3
by: ESmith | last post by:
I have multi-page form where I pass an object between pages as follows: On each page: // What page to go to next private void btnContinue_Click(object sender, System.EventArgs e) { if...
3
by: vvenk | last post by:
Hello: This was posted in a wrong forum; that's why I am posting here again. Sorry. I just wrote my first ASP.Net application, tested it on my development environment and deployed it on a...
20
by: p175 | last post by:
Hi people, I have a stored procedure that creates many Global temporary session tables. Into each of these tables go the results of various processing using relational division all keyed and...
2
by: jwhite68 | last post by:
The essence of my problem is this. 1. I login to my website with user/password. 2. I select any option, which effectively re-calls index2.php with some additional parameters, to control whats...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
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
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...
0
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
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,...

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.