Debugging component technology for ASP server

Source: Internet
Author: User
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 to run well, but once put into the ASP to generate the call failure information background:

In the first case: can you see this information in your browser?

Error ' ASP 0115 ' unexpected error/<web name>/<asp file Name>.aspa trappable error occurred in
External object. The script cannot continue running.

This is the ASP 0115 error that makes every programmer have a headache, and this error can be caused by many reasons. Maybe many people will speculate that it may be due to Microsoft
itself as a result of 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 due to the wrong access in the code you wrote yourself
The process of Inetinfo.exe.

The second situation: whether you have encountered this embarrassing situation, write your own code if it is in an EXE project species can be well run, but once you from a
ASP page to call it, it will fail?

Again, there are many reasons for this phenomenon, and most of them are due to the fact that the ASP is running under a specific system account, and in this context
, the permissions it runs are a problem that cannot be overlooked.

I think, for so long programmers, many people have a rich experience in debugging an EXE program independently, but when you are writing running in the IIS environment
program, you will face more challenges with traditional debugging.

Although you can use VB or VC + + to write the ASP components, but the VC + + debugger will be your best debugging tools.

Get your components ready.

In order to debug the components you write, you have to have the information needed for debugging. Symbols allows you to display the first of the code you wrote when your component went wrong
There was an error in the line.

So how do we generate the symbols of the components needed in VB?

If your component is written using VB, you can create a debug letter for your component by selecting the ProjectProperties command in the Compile menu.
Interest.

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 ' from the Build menu
Project Configuration '. You'll find the ' Win32 Debug ' option. Or, you can manually define the debugging error information that the component needs to include, select
Choose Settings from 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 the Attach to Process dialog box, select Show System
Processes. Locate the process Inetinfo from the list box, and then click OK.

Next, you want to make sure that the symbols has been reprinted into memory. From the Project menu, click Settings to select the Debug page, and select from the Category Drop-down box
Additional DLLs ' If you don't see the component you've written in the list, click the first line blank, and then enter the filename, or select the ' ... ' button to
Look for this file name and 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
If your component is written using VB, make sure that you select all the file types in the Files of type Drop-down box, and then locate the file you want, and then click Open.

OK, now you can put breakpoints in your code, set observations, look at the call stack, and so on 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.