开发者

How to test an ASP page?

开发者 https://www.devze.com 2023-01-14 02:15 出处:网络
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 do

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


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.

0

精彩评论

暂无评论...
验证码 换一张
取 消