|
|
|||||||||
|
|||||||||
|
|||||||||
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
SlickEdit: Code in over 40 languages across 7 platforms. SlickEdit’s unmatched power, speed, and flexibility allows even the most accomplished developers to write better code faster. Download a free trial today! |
|
#1
|
|||
|
|||
|
OS Info:
Windows 2003 Server running IIS 6 and Visual Basic 6.0 SP6 (or SP5) Problem: with this code: Code:
Dim oc As ObjectContext Set oc = GetObjectContext() (oc = Nothing) only in debug mode. You can compile and run the application in IIS and everything works perfect. With Windows 2000 Server I could debug just fine. Is this a limitation of Server 2003 or does something need to be set? (Its rather annoying (and time consuming) that I have to recompile my code constantly instead of being able to put a stop point at X location and modify the code by hand until it works.) Any help would be Great! |
|
#2
|
|||
|
|||
|
Has anyone else hit this bug/problem?
|
|
#3
|
|||
|
|||
|
More Information:
It seems with another Developer here, the ObjectContext works perfectly. The only difference I have seen between our machines currently is that I have Visual Studio .Net 2003 Installed along with my Visual Basic 6. I don't have time to setup another machine to test this theory just yet. I have found a work around for the bug... Current Fix: aspfile.asp Code:
<%@ LANGUAGE="VBSCRIPT"%>
<%
set o=Server.createobject("Project.Class")
o.PublicSub ObjectContext,Response,Request,Server,Application
set o=nothing
%>
my com... (only import info) Code:
Implements ObjectControl
Public Sub PublicSub(Optional ObjectContext As Object = Nothing, _
Optional Response As Object = Nothing, _
Optional Request As Object = Nothing, _
Optional Server As Object = Nothing, _
Optional Application As Object = Nothing)
Dim oc As ObjectContext
Set oc = COMSVCSLib.GetObjectContext()
'Dim wRequest As Request
'Set wRequest = oc.Item("Request") 'Fails with my setup
'Dim wResponse As Response
'Set wResponse = oc("Response") ' Fails with my setup
'the commented lines work outside of debugmode
'wResponse.Write "I am working......<br>"
'wResponse.Write "Response is null? " & CStr((Response Is Nothing))
'This works in all modes
Response.Write "I am working......<br>"
Response.Write "Response is null? " & CStr((Response Is Nothing))
End Sub
btw... Simply passing the ObjectContext from the ASP Script might be enough to make it work correctly (Haven't tested by itself) Interesting Bug/Issue/Problem... |
|
#4
|
|||
|
|||
|
Note for the last post:
I can't pass the ObjectContext from the ASP script - it will still be nothing. To make things worse, when I refer to another COM Object that uses GetObjectContext() (that I am not debugging, just calling from another COM in debug mode) then that call will fail horribly. Not a good workaround.For more information: I checked a Co-Workers machine... It seems that he can debug just fine in VB6 COMs with Visual Studio .Net 2003 install...What could be different? Anyone? I'm lost and confused. (Watch it be some little setting somewhere creating me this pain!) |
|
#5
|
|||
|
|||
|
Another update...
I have used MS Virtual Server 2005 to create a virtual machine with Windows 2003 Enterprise Server installed along with Visual Basic 6 sp6 and Visual Studio .Net 2003. It seems everything is working perfectly... I have no clue as to what is wrong with my machine, still... Micah |
|
#6
|
|||
|
|||
|
Hi Micah,
change in the properties of your Class the MTSTransaction Mode to: 1- No Transaction. regard K. |
![]() |
| Viewing: ASP Free Forums > Programming > Visual Basic Programming > VB6 COM+ Debug w/ GetObjectContext() in 2003 |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|
![]() |
|