DLLs that Use GetObjectContext and Response crash in Debug 
Author Message
 DLLs that Use GetObjectContext and Response crash in Debug

Not sure if this is your problem but, try reading post from Robert
Johnson date 5/18/00

 - Tom



Mon, 11 Nov 2002 03:00:00 GMT  
 DLLs that Use GetObjectContext and Response crash in Debug
Thanks Tom, but Robert's is a different problem

Quote:
> Not sure if this is your problem but, try reading post from Robert
> Johnson date 5/18/00

>  - Tom



Tue, 12 Nov 2002 03:00:00 GMT  
 DLLs that Use GetObjectContext and Response crash in Debug
fyi....
I found a solution that so far seems to work. It is at
http://www.asptoday.com/articles/19991105.htm

Adrian


Quote:
> Hi all,

> I have a simple bit of code in a VB DLL (thats called from an ASP page)
that
> works when I compile the DLL and run it but I cant debug the dll in the VB
> IDE. The code crashes when I try to get at the response object. Its
> something that I have overlooked but being slightly new to this I cant
> figure out what. The code is as follows (I have also attached a zip file
> with the code) :

> (Default.asp)

> <LANGUAGE=VBScript RUNAT=Server>
>   Dim obj
>   Set obj = Server.CreateObject("MyDLL.MyClass")
>   obj.Main

> </SCRIPT>

> (VB DLL MyDLL Class MyClass)

> Sub Main()
>   Dim ObjCtx, objResponse As Response
>   Set ObjCtx = GetObjectContext()
>   Set objResponse = ObjCtx("Response")

>   objResponse .Write ("Hello World")

> End Sub

> As you can see there is nothing too complex above. I have an ASP
application
> set up IIS 5 with a application protection level of Low (in process). I
have
> the dll installed on w2k as a component in COM+ to run as a library
package.
> When I call default.asp from ie it works fine with the compiled DLL.
However
> I cant debug the VB DLL. When I go to debug it it crashes at Set
objResponse
> = ObjCtx("Response") line. A watch on the objects ObjCtx sees its set at
> nothing. Therefore GetObjectContext() returns nothing. I know I am missing
> something but what. The above code is to demonstrate the problem. I need
to
> be able to debug as the project I am working on we hope to use this quiet
> extensively however if we can't debug our code we wont use it.Up to now we
> were using on start page event passing in the scripting context and 2
global
> objects to store response and Request. But this wont work where we call
> different methods of  the same class in the same 1 ASP pages ( as on start
> page is triggered once and the second time we go into the class the 2
global
> objects are set to nothing, anyway we prefer not to use global objects).
> Hope you can help as I have tried everything but just cant debug. Please
> have a look at the attached code and see if you can help.

> Cheers
> Adrian



Sat, 16 Nov 2002 03:00:00 GMT  
 
 [ 3 post ] 

 Relevant Pages 

1. DLLs that Use GetObjectContext and Response crash in Debug

2. GetObjectContext in VB6, using debugging

3. GetObjectContext in VB6, using debugging

4. getobjectcontext("response")

5. How to debug using GPF Crash address?

6. VB6 IDE crashes when reference local DLL that uses a remote MTS DLL

7. How to debug in vb for this code GetObjectContext("Response")

8. How to get time response using WSOCK32.DLL ?

9. ASP Request object and GetObjectContext in VB DLL

10. ASP Request object and GetObjectContext in VB DLL

11. DLL loading using debug

12. Crashed when using sqldmo.dll in VB.Net Beta 2 SR1

 

 
Powered by phpBB® Forum Software