Server.Execute() and Application.Lock

E

Elie Grouchko

Hi All

I am using Application.lock to protect a reference to a COM+ object while
calling Server.Execute() to another ASP page. I am doing this to pass the
object's reference to the other page, and I CAN'T rely on the session
object.

Is this a safe way to protect the object reference? i.e. does the
Application object remain locked when calling Server.Execute() ?

Help/advice will be greatly appreciated.

Thanks ahead

Elie Grouchko

**********************************

The code looks like that:

page1.asp
---------------------
dim ObjectRef
set ObjectRef = Server.CreateObject("Server.Object")
....
Application.Lock
set Application("reference") = ObjectRef
Server.Execute("page2.asp")


page2.asp
 
M

Manohar Kamath [MVP]

Elie,

The server.execute actually executes the page as if it were a part of the
page where it is executed. Kinda like "include." Therefore, the application
is locked for the application variables against any modification. If I were
you, I would just do the application lock and unlock on the same page, in
your case on the second one. The Application variables can be accessed but
only for readonly access.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads


Members online

Forum statistics

Threads
473,769
Messages
2,569,580
Members
45,055
Latest member
SlimSparkKetoACVReview

Latest Threads

Top