473,406 Members | 2,745 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,406 software developers and data experts.

Debug VB based COM object from ASP?

Hello,

I'm trying to figure out how to debug a very simple COM object I developed
in VB.

I'm very new to VB and ASP so I have a lot to learn.

That said, I found what I thought was perfect article which covers this:

http://support.microsoft.com/default...en-us;299633#2

However, I'm running on Windows 2003 and at step 4c) I don't have an
"Internet Service Manager" but rather "Internet Information Services (IIS)
Manager". OK, fine, I assume the name changed.

However, I'm not sure what to do in step 5).

Specifically, that says:

In Internet Services Manager, right-click the virtual directory that
contains the ASP page that calls your component, and then click Properties.
Under Anonymous Access, click Edit, and set the Directory Security of this
virtual directory to anything other than Anonymous.

I placed a simple ASP page in a directory I created, i.e.,
c:\inetpub\wwwroot\MYASP.

From the IIS Manager, I right click my directory under "Web Sites", "Default
Web Site" and selected properties. I then get confused as I don't have an
"Anonymous Access' tab. I tried going to "Directory Security" and clicking
the Edit in the Authentication and Access control" but I couldn't figure out
what to do. I tried clearing the check box "Enable Anoymous Access" but
that didn't seem to work. I couldn't even get pages to load then.

So, bottom line, how do I step into a method of my VB COM object if that com
object is used from an ASP page???

Thanks!

Grant Schenck
Jul 22 '05 #1
6 4695
I've never gotten debugging to work the way it is "supposed" to but here is
what I do. It requires visual C++ but you can probably do the same thing
with windows debugger.

1. restart IIS with IISRESET
2. compile the dll for debugging (no optimization, create symbols).
3. launch task and not the PIDs running DLLHOST.EXE
4. launch your web application and run it enough to load the DLL.
5. in task manager find the new instance of DLLHOST, right-click on it and
select debug. This will open the debugger.
6. load the VB6 source file for your component (.cls file) and find the
entry point you want to step into. Set a breakpoint.

There are some peculiarities with using the C++ debugger on a VB DLL. Mostly
you will find that you cannot view the contents of complex objects such as
classes and arrays. You may need to insert some code to set data into simple
variables so that you can see it.

I'm sure that someone else can direct you to a cleaner way to do this but it
works for me.

--
--Mark Schupp
Head of Development
Integrity eLearning
www.ielearning.com
"Grant Schenck" <sc******@optonline.net> wrote in message
news:eA**************@TK2MSFTNGP09.phx.gbl...
Hello,

I'm trying to figure out how to debug a very simple COM object I developed
in VB.

I'm very new to VB and ASP so I have a lot to learn.

That said, I found what I thought was perfect article which covers this:

http://support.microsoft.com/default...en-us;299633#2

However, I'm running on Windows 2003 and at step 4c) I don't have an
"Internet Service Manager" but rather "Internet Information Services (IIS)
Manager". OK, fine, I assume the name changed.

However, I'm not sure what to do in step 5).

Specifically, that says:

In Internet Services Manager, right-click the virtual directory that
contains the ASP page that calls your component, and then click
Properties.
Under Anonymous Access, click Edit, and set the Directory Security of this
virtual directory to anything other than Anonymous.

I placed a simple ASP page in a directory I created, i.e.,
c:\inetpub\wwwroot\MYASP.

From the IIS Manager, I right click my directory under "Web Sites",
"Default
Web Site" and selected properties. I then get confused as I don't have an
"Anonymous Access' tab. I tried going to "Directory Security" and
clicking
the Edit in the Authentication and Access control" but I couldn't figure
out
what to do. I tried clearing the check box "Enable Anoymous Access" but
that didn't seem to work. I couldn't even get pages to load then.

So, bottom line, how do I step into a method of my VB COM object if that
com
object is used from an ASP page???

Thanks!

Grant Schenck

Jul 22 '05 #2
If anyone else know how to do this without MSVC, please chime in! ;-)

That said, I have a pretty stupid follow up question:

My ASP page simply creates the object and invokes a method.

In your step 4 you say to run my web app enough to load the DLL.

How would I do that? Is there some idea that the ASP could show a button
which could be clicked to invoke the method I want to debug? Some simple
code to show how to do that would be very much appreciated.

Thanks,

Grant Schenck

"Mark Schupp" <no******@email.net> wrote in message
news:#d**************@TK2MSFTNGP10.phx.gbl...
I've never gotten debugging to work the way it is "supposed" to but here is what I do. It requires visual C++ but you can probably do the same thing
with windows debugger.

1. restart IIS with IISRESET
2. compile the dll for debugging (no optimization, create symbols).
3. launch task and not the PIDs running DLLHOST.EXE
4. launch your web application and run it enough to load the DLL.
5. in task manager find the new instance of DLLHOST, right-click on it and
select debug. This will open the debugger.
6. load the VB6 source file for your component (.cls file) and find the
entry point you want to step into. Set a breakpoint.

There are some peculiarities with using the C++ debugger on a VB DLL. Mostly you will find that you cannot view the contents of complex objects such as
classes and arrays. You may need to insert some code to set data into simple variables so that you can see it.

I'm sure that someone else can direct you to a cleaner way to do this but it works for me.

--
--Mark Schupp
Head of Development
Integrity eLearning
www.ielearning.com
"Grant Schenck" <sc******@optonline.net> wrote in message
news:eA**************@TK2MSFTNGP09.phx.gbl...
Hello,

I'm trying to figure out how to debug a very simple COM object I developed in VB.

I'm very new to VB and ASP so I have a lot to learn.

That said, I found what I thought was perfect article which covers this:

http://support.microsoft.com/default...en-us;299633#2

However, I'm running on Windows 2003 and at step 4c) I don't have an
"Internet Service Manager" but rather "Internet Information Services (IIS) Manager". OK, fine, I assume the name changed.

However, I'm not sure what to do in step 5).

Specifically, that says:

In Internet Services Manager, right-click the virtual directory that
contains the ASP page that calls your component, and then click
Properties.
Under Anonymous Access, click Edit, and set the Directory Security of this virtual directory to anything other than Anonymous.

I placed a simple ASP page in a directory I created, i.e.,
c:\inetpub\wwwroot\MYASP.

From the IIS Manager, I right click my directory under "Web Sites",
"Default
Web Site" and selected properties. I then get confused as I don't have an "Anonymous Access' tab. I tried going to "Directory Security" and
clicking
the Edit in the Authentication and Access control" but I couldn't figure
out
what to do. I tried clearing the check box "Enable Anoymous Access" but
that didn't seem to work. I couldn't even get pages to load then.

So, bottom line, how do I step into a method of my VB COM object if that
com
object is used from an ASP page???

Thanks!

Grant Schenck

Jul 22 '05 #3
run the script once
set the breakpoint
run the script again

--
--Mark Schupp
Head of Development
Integrity eLearning
www.ielearning.com

"Grant Schenck" <sc******@optonline.net> wrote in message
news:OA**************@TK2MSFTNGP15.phx.gbl...
If anyone else know how to do this without MSVC, please chime in! ;-)

That said, I have a pretty stupid follow up question:

My ASP page simply creates the object and invokes a method.

In your step 4 you say to run my web app enough to load the DLL.

How would I do that? Is there some idea that the ASP could show a button
which could be clicked to invoke the method I want to debug? Some simple
code to show how to do that would be very much appreciated.

Thanks,

Grant Schenck

"Mark Schupp" <no******@email.net> wrote in message
news:#d**************@TK2MSFTNGP10.phx.gbl...
I've never gotten debugging to work the way it is "supposed" to but here

is
what I do. It requires visual C++ but you can probably do the same thing
with windows debugger.

1. restart IIS with IISRESET
2. compile the dll for debugging (no optimization, create symbols).
3. launch task and not the PIDs running DLLHOST.EXE
4. launch your web application and run it enough to load the DLL.
5. in task manager find the new instance of DLLHOST, right-click on it
and
select debug. This will open the debugger.
6. load the VB6 source file for your component (.cls file) and find the
entry point you want to step into. Set a breakpoint.

There are some peculiarities with using the C++ debugger on a VB DLL.

Mostly
you will find that you cannot view the contents of complex objects such
as
classes and arrays. You may need to insert some code to set data into

simple
variables so that you can see it.

I'm sure that someone else can direct you to a cleaner way to do this but

it
works for me.

--
--Mark Schupp
Head of Development
Integrity eLearning
www.ielearning.com
"Grant Schenck" <sc******@optonline.net> wrote in message
news:eA**************@TK2MSFTNGP09.phx.gbl...
> Hello,
>
> I'm trying to figure out how to debug a very simple COM object I developed > in VB.
>
> I'm very new to VB and ASP so I have a lot to learn.
>
> That said, I found what I thought was perfect article which covers
> this:
>
> http://support.microsoft.com/default...en-us;299633#2
>
> However, I'm running on Windows 2003 and at step 4c) I don't have an
> "Internet Service Manager" but rather "Internet Information Services (IIS) > Manager". OK, fine, I assume the name changed.
>
> However, I'm not sure what to do in step 5).
>
> Specifically, that says:
>
> In Internet Services Manager, right-click the virtual directory that
> contains the ASP page that calls your component, and then click
> Properties.
> Under Anonymous Access, click Edit, and set the Directory Security of this > virtual directory to anything other than Anonymous.
>
> I placed a simple ASP page in a directory I created, i.e.,
> c:\inetpub\wwwroot\MYASP.
>
> From the IIS Manager, I right click my directory under "Web Sites",
> "Default
> Web Site" and selected properties. I then get confused as I don't have an > "Anonymous Access' tab. I tried going to "Directory Security" and
> clicking
> the Edit in the Authentication and Access control" but I couldn't
> figure
> out
> what to do. I tried clearing the check box "Enable Anoymous Access"
> but
> that didn't seem to work. I couldn't even get pages to load then.
>
> So, bottom line, how do I step into a method of my VB COM object if
> that
> com
> object is used from an ASP page???
>
> Thanks!
>
> Grant Schenck


Jul 22 '05 #4
Make sense...

BTW, I think I got a pure VB solution to work.

This article covers it pretty well:

http://support.microsoft.com/default...en-us;299633#2

The trick was two fold. I'm running IIS 6.0 so the methods are different.
Once I disable anoymous access I then have to provide my Windows login
information and then the first time there is a pause of around 30 second but
then, low and behold it pops up in the debugger. I think I got this
behviour earlier but got impatient and assume the browser was hung.

So, thanks for the help.

Grant Schencl

"Mark Schupp" <no******@email.net> wrote in message
news:#8**************@TK2MSFTNGP09.phx.gbl...
run the script once
set the breakpoint
run the script again

--
--Mark Schupp
Head of Development
Integrity eLearning
www.ielearning.com

"Grant Schenck" <sc******@optonline.net> wrote in message
news:OA**************@TK2MSFTNGP15.phx.gbl...
If anyone else know how to do this without MSVC, please chime in! ;-)

That said, I have a pretty stupid follow up question:

My ASP page simply creates the object and invokes a method.

In your step 4 you say to run my web app enough to load the DLL.

How would I do that? Is there some idea that the ASP could show a button which could be clicked to invoke the method I want to debug? Some simple code to show how to do that would be very much appreciated.

Thanks,

Grant Schenck

"Mark Schupp" <no******@email.net> wrote in message
news:#d**************@TK2MSFTNGP10.phx.gbl...
I've never gotten debugging to work the way it is "supposed" to but here
is
what I do. It requires visual C++ but you can probably do the same
thing with windows debugger.

1. restart IIS with IISRESET
2. compile the dll for debugging (no optimization, create symbols).
3. launch task and not the PIDs running DLLHOST.EXE
4. launch your web application and run it enough to load the DLL.
5. in task manager find the new instance of DLLHOST, right-click on it
and
select debug. This will open the debugger.
6. load the VB6 source file for your component (.cls file) and find the
entry point you want to step into. Set a breakpoint.

There are some peculiarities with using the C++ debugger on a VB DLL.

Mostly
you will find that you cannot view the contents of complex objects such
as
classes and arrays. You may need to insert some code to set data into

simple
variables so that you can see it.

I'm sure that someone else can direct you to a cleaner way to do this

but it
works for me.

--
--Mark Schupp
Head of Development
Integrity eLearning
www.ielearning.com
"Grant Schenck" <sc******@optonline.net> wrote in message
news:eA**************@TK2MSFTNGP09.phx.gbl...
> Hello,
>
> I'm trying to figure out how to debug a very simple COM object I

developed
> in VB.
>
> I'm very new to VB and ASP so I have a lot to learn.
>
> That said, I found what I thought was perfect article which covers
> this:
>
> http://support.microsoft.com/default...en-us;299633#2
>
> However, I'm running on Windows 2003 and at step 4c) I don't have an
> "Internet Service Manager" but rather "Internet Information Services

(IIS)
> Manager". OK, fine, I assume the name changed.
>
> However, I'm not sure what to do in step 5).
>
> Specifically, that says:
>
> In Internet Services Manager, right-click the virtual directory that
> contains the ASP page that calls your component, and then click
> Properties.
> Under Anonymous Access, click Edit, and set the Directory Security of

this
> virtual directory to anything other than Anonymous.
>
> I placed a simple ASP page in a directory I created, i.e.,
> c:\inetpub\wwwroot\MYASP.
>
> From the IIS Manager, I right click my directory under "Web Sites",
> "Default
> Web Site" and selected properties. I then get confused as I don't
have an
> "Anonymous Access' tab. I tried going to "Directory Security" and
> clicking
> the Edit in the Authentication and Access control" but I couldn't
> figure
> out
> what to do. I tried clearing the check box "Enable Anoymous Access"
> but
> that didn't seem to work. I couldn't even get pages to load then.
>
> So, bottom line, how do I step into a method of my VB COM object if
> that
> com
> object is used from an ASP page???
>
> Thanks!
>
> Grant Schenck



Jul 22 '05 #5
Thanks for the link. I'll have to try it out myself.

--
--Mark Schupp
Head of Development
Integrity eLearning
www.ielearning.com

"Grant Schenck" <sc******@optonline.net> wrote in message
news:%2****************@TK2MSFTNGP12.phx.gbl...
Make sense...

BTW, I think I got a pure VB solution to work.

This article covers it pretty well:

http://support.microsoft.com/default...en-us;299633#2

The trick was two fold. I'm running IIS 6.0 so the methods are different.
Once I disable anoymous access I then have to provide my Windows login
information and then the first time there is a pause of around 30 second
but
then, low and behold it pops up in the debugger. I think I got this
behviour earlier but got impatient and assume the browser was hung.

So, thanks for the help.

Grant Schencl

"Mark Schupp" <no******@email.net> wrote in message
news:#8**************@TK2MSFTNGP09.phx.gbl...
run the script once
set the breakpoint
run the script again

--
--Mark Schupp
Head of Development
Integrity eLearning
www.ielearning.com

"Grant Schenck" <sc******@optonline.net> wrote in message
news:OA**************@TK2MSFTNGP15.phx.gbl...
> If anyone else know how to do this without MSVC, please chime in! ;-)
>
> That said, I have a pretty stupid follow up question:
>
> My ASP page simply creates the object and invokes a method.
>
> In your step 4 you say to run my web app enough to load the DLL.
>
> How would I do that? Is there some idea that the ASP could show a button > which could be clicked to invoke the method I want to debug? Some simple > code to show how to do that would be very much appreciated.
>
> Thanks,
>
> Grant Schenck
>
> "Mark Schupp" <no******@email.net> wrote in message
> news:#d**************@TK2MSFTNGP10.phx.gbl...
>> I've never gotten debugging to work the way it is "supposed" to but here > is
>> what I do. It requires visual C++ but you can probably do the same thing >> with windows debugger.
>>
>> 1. restart IIS with IISRESET
>> 2. compile the dll for debugging (no optimization, create symbols).
>> 3. launch task and not the PIDs running DLLHOST.EXE
>> 4. launch your web application and run it enough to load the DLL.
>> 5. in task manager find the new instance of DLLHOST, right-click on it
>> and
>> select debug. This will open the debugger.
>> 6. load the VB6 source file for your component (.cls file) and find
>> the
>> entry point you want to step into. Set a breakpoint.
>>
>> There are some peculiarities with using the C++ debugger on a VB DLL.
> Mostly
>> you will find that you cannot view the contents of complex objects
>> such
>> as
>> classes and arrays. You may need to insert some code to set data into
> simple
>> variables so that you can see it.
>>
>> I'm sure that someone else can direct you to a cleaner way to do this but > it
>> works for me.
>>
>> --
>> --Mark Schupp
>> Head of Development
>> Integrity eLearning
>> www.ielearning.com
>>
>>
>> "Grant Schenck" <sc******@optonline.net> wrote in message
>> news:eA**************@TK2MSFTNGP09.phx.gbl...
>> > Hello,
>> >
>> > I'm trying to figure out how to debug a very simple COM object I
> developed
>> > in VB.
>> >
>> > I'm very new to VB and ASP so I have a lot to learn.
>> >
>> > That said, I found what I thought was perfect article which covers
>> > this:
>> >
>> > http://support.microsoft.com/default...en-us;299633#2
>> >
>> > However, I'm running on Windows 2003 and at step 4c) I don't have
>> > an
>> > "Internet Service Manager" but rather "Internet Information Services
> (IIS)
>> > Manager". OK, fine, I assume the name changed.
>> >
>> > However, I'm not sure what to do in step 5).
>> >
>> > Specifically, that says:
>> >
>> > In Internet Services Manager, right-click the virtual directory that
>> > contains the ASP page that calls your component, and then click
>> > Properties.
>> > Under Anonymous Access, click Edit, and set the Directory Security
>> > of
> this
>> > virtual directory to anything other than Anonymous.
>> >
>> > I placed a simple ASP page in a directory I created, i.e.,
>> > c:\inetpub\wwwroot\MYASP.
>> >
>> > From the IIS Manager, I right click my directory under "Web Sites",
>> > "Default
>> > Web Site" and selected properties. I then get confused as I don't have > an
>> > "Anonymous Access' tab. I tried going to "Directory Security" and
>> > clicking
>> > the Edit in the Authentication and Access control" but I couldn't
>> > figure
>> > out
>> > what to do. I tried clearing the check box "Enable Anoymous Access"
>> > but
>> > that didn't seem to work. I couldn't even get pages to load then.
>> >
>> > So, bottom line, how do I step into a method of my VB COM object if
>> > that
>> > com
>> > object is used from an ASP page???
>> >
>> > Thanks!
>> >
>> > Grant Schenck
>
>



Jul 22 '05 #6
"Grant Schenck" <sc******@optonline.net> wrote in message
news:eA**************@TK2MSFTNGP09.phx.gbl...
I'm trying to figure out how to debug a very simple COM object
I developed in VB.


If you're developing on the same machine as the web server:

Open the project in VB.
Add a few choice breakpoints.
Run the project using Start with Full Compile (Ctrl-F5).

Launch a browser and navigate to the web page that uses your
Component. All other things being equal, your component should
break into the VB IDE when you hit any of your breakpoints.

HTH,
Phill W.
Jul 22 '05 #7

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

Similar topics

9
by: Dan Perl | last post by:
Is there a mechanism or an idiom for adding code for debugging so that it can easily be removed in the production code? I am thinking of something similar to the C/C++ preprocessor statements with...
2
by: John Beschler | last post by:
I have a c# function that runs fine in VS.Net when in debug mode; however, when I switch to Relase mode or compile the app, the function fails with "object refernce not set". Here is the whole...
2
by: Scott Yost | last post by:
I reference a .NET DLL to import some of my custom types. I can build that DLL in debug or release mode, but I usually keep the debug one built so I can debug it. When I want to link to the release...
7
by: Srinivasa Rao | last post by:
I have read in one article that when we compile the application in release mode, all the debug classes and properties will be automatically removed from the code. I tried to implement this thing by...
46
by: Ian Boyd | last post by:
IIS5, on a Windows 2000 Server machine. Debeg.WriteLine "Hello, world!" How can i view it?
5
by: Jonas Hallgren | last post by:
Hello, Is there any general tips on how to solve this problem: my Debug version runs fine but when I do a Release version I get error messages!? I'm hoping it is a simple option somewhere or...
15
by: teppic.xxviii | last post by:
Ok, so this is a little script that I've been working on and off for the past year or so, and finally I think it might be ready to be put to the ultimate test: other people! ...
0
by: Gorkana | last post by:
When doing Server.Transfer I am getting the following error 'Error executing child request ' after I make the change in the web.config debug="true" to debug="false". When set to true the transfer...
8
by: Jothishankar | last post by:
Hi, I am new to c#. I am trying to build an application that does backup of files to an external hard disk. My application behaves strangely. When i run the application under debug mode (F5),...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
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
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
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
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
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
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

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.