Visual Basic Programming
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
 
 
User Name:
Password:
Remember me
Iron Speed
Go Back   ASP Free ForumsProgrammingVisual Basic Programming

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread ASP Free Forums Sponsor:
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  
Old August 2nd, 2004, 12:59 PM
Micah Micah is offline
Registered User
ASP Free Newbie (0 - 499 posts)
 
Join Date: Aug 2004
Posts: 10 Micah User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 5 h 14 m 29 sec
Reputation Power: 0
Question VB6 COM+ Debug w/ GetObjectContext() in 2003

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!

Reply With Quote
  #2  
Old August 3rd, 2004, 10:16 AM
Micah Micah is offline
Registered User
ASP Free Newbie (0 - 499 posts)
 
Join Date: Aug 2004
Posts: 10 Micah User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 5 h 14 m 29 sec
Reputation Power: 0
Has anyone else hit this bug/problem?

Reply With Quote
  #3  
Old August 3rd, 2004, 11:22 AM
Micah Micah is offline
Registered User
ASP Free Newbie (0 - 499 posts)
 
Join Date: Aug 2004
Posts: 10 Micah User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 5 h 14 m 29 sec
Reputation Power: 0
Lightbulb Got a work around!

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...

Reply With Quote
  #4  
Old August 6th, 2004, 01:34 PM
Micah Micah is offline
Registered User
ASP Free Newbie (0 - 499 posts)
 
Join Date: Aug 2004
Posts: 10 Micah User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 5 h 14 m 29 sec
Reputation Power: 0
Arrow

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!)

Reply With Quote
  #5  
Old August 9th, 2004, 10:31 AM
Micah Micah is offline
Registered User
ASP Free Newbie (0 - 499 posts)
 
Join Date: Aug 2004
Posts: 10 Micah User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 5 h 14 m 29 sec
Reputation Power: 0
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

Reply With Quote
  #6  
Old August 23rd, 2004, 02:32 AM
Katrin Katrin is offline
Registered User
ASP Free Newbie (0 - 499 posts)
 
Join Date: Aug 2004
Posts: 1 Katrin User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Hi Micah,

change in the properties of your Class the MTSTransaction Mode to:

1- No Transaction.

regard
K.

Reply With Quote
Reply

Viewing: ASP Free ForumsProgrammingVisual Basic Programming > VB6 COM+ Debug w/ GetObjectContext() in 2003


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 

Iron Speed




© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 5 hosted by Hostway