tags:

views:

43

answers:

1

I had to code an Active X DLL which is called from an ASP page.

I am convinced (by debug tracing) that my DLL returns the correct value when its function is invoked from the ASP page, but the page does not display the result as it should.

What's the quickest/easiest way to do some debugging? Can I run ASP locally? If so, I can just add a few print()s (or equivalent), unless there is an easy to use FOSS IDE that will allow me to step through the page in a debugger.

Btw, I notice tags for ASP.Net & ASP-classic. The web page is copyright 2002, so I would guess classic (?)


Update: I should have said, I only ave access the browser's "view page source", not to any files that may have been necessary to create the ASP page originally


Thanks for the help. Yes, control panel add/remove windows components, add IIS then copy the ASP file into c:\inetpub\wwwroot sprinkle a few response.write around the ASP code & Bob's your anutie's live-in lover

+2  A: 

If it is classic ASP, you can try to to run it (or the part relevant to you) locally. Copy the VB code, put it into a .vbs file, make minimal changes (like using WScript.Echo instead of Response.Write).

You can also run VBScript code with minimal modifications in the VBA editor of MS Office. This way you have a chance to debug the code line-by line.

If none of this is feasible for you, sprinkle Response.Write în the critical sections and comment out any On Error Resume Next statements. This way you can try to spot the error while running the code on the server.

Tomalak
Mawg
@mawg: Yes, you would need an IIS Server. There is one in every Windows installation, even the desktop varieties. Install it via Add/Remove Windows Components. I wrote my answer assuming that you deal with classic ASP, which predominantly is VBScript. If serial port access happens within the ActiveX component, I don't see why it would not work within a VBS/VBA environment. If you have VB.NET code, debugging would work best in a native VB.NET IDE, like the free Visual Studio Express (web developer edition).
Tomalak
Mawg
@mawg: No offense, but it looks like you are seriously lacking some background in how web servers work. Based on your update (you don't have any access to the original sources) I'm not even sure if you can debug the problem at all.
Tomalak
Mawg
@mawg: It's exactly the same thing with ASP(.NET) and IIS. You set up the web server, copy the files to the web root directory and it cares for the rest.
Tomalak
Thanks (+1 - and +1 for the "no offence" before :-) I guess I'd better go google how to do that, then ... ;-)
Mawg
Hmmm, I wonder if I could use Visual Web Developer 2010 Express
Mawg
@mawg: Sure you could. You still need IIS though.
Tomalak