Some of the previously collected data---How to debug Component technology on ASP server

Source: Internet
Author: User
How to debug component technology for ASP server
This article mainly describes how to debug ASP server-side component technology, including this complex
Error message:
One, ASP 0115 Error.
Second, the code in a separate EXE file inside the operation is good, but once into the ASP
The information that caused the call to fail
Background of this article:
In the first case: can you see this information in your browser?
Error ' ASP 0115 '
Unexpected error
/<web name>/<asp File name>.asp
A trappable error occurred in A external object. The script
Cannot continue running.
This is the ASP 0115 error that makes every programmer have a headache, this error can be caused by many reasons
The result. Many people may speculate that it might be the result of Microsoft's own bugs,
And complained that Microsoft did not give a response to the patch.
In practice there are some that are true, but in most cases this is not the case.
And a lot of it is caused by the wrong access to the Inetinfo.exe process in your own code.

The second situation: Have you ever encountered this embarrassing situation, write your own code if it is in an EXE project type
Can run well, but once you call it from an ASP page, you fail?
Again, there are many reasons for this phenomenon, and most of them are due to the fact that ASP is running
Under a particular system account, in such a context, it runs a permission that is not
Let's ignore the problem.

I think, for so long a programmer, many people have a rich and separate debugging an EXE program
Experience, but when you are writing a program running in an IIS environment, you will face the traditional
More challenges in debugging.
Although you can use VB or VC + + to write the ASP components, but the VC + + debugger will be your
The best debugging tool.

Get your components ready.
In order to debug the components you write, you have to have the information needed for debugging. Symbols allowed in your
Component error indicates that the first few lines of the code you wrote have been faulted.

So how do we generate the symbols of the components needed in VB?
If your component is written using VB, you can select Project in the Compile menu
Properties command to create debugging information for your component.
Make sure you compile the code into ' Native codes ' and use ' No optimization '.

then we in VC + + How to generate components need to symbols it?

If your component is written using VC + +, the easiest way is to choose a debug configuration to generate
Debugging information. Click ' Set Active Project Configuration ' from the Build menu. You
Will find the ' Win32 Debug ' option.
Or, you can manually define the debug error information that the component needs to contain, and select the Project menu
And then to the link page. Make sure generate Debug info is selected.

start the debugging process
As mentioned earlier, we will use VC + + to complete the debugging work. Well, run it,
Of course there is no need to build a project or a workshop.
Select the attach to Process in start Debug in the Build menu. In Attach to
Process dialog box, select Show System processes. Find from list box
Process Inetinfo, and then click OK.

Next, you want to make sure that the symbols has been reprinted into memory. From the Project menu, click
Settings select the Debug page and select additional DLLs from the Category dropdown box.
If you don't see the components you've written in the list, click the first blank line, and then type
File name, or select the ' ... ' button to find the filename, click OK.

Well, now that you've loaded your symbols, you need to load some source code.
Select Open from the File menu. Locate the source file you want to debug. If your component is using VB
Make sure that you select all the file types in the Files of type Drop-down box, and then find your
After the file you want, click Open.

Okay, now you can put breakpoints in your code, set observations, see the call stack
Wait, it's like you're debugging a traditional exe.



Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.