Common Methods for troubleshooting Web development exceptions

Source: Internet
Author: User

Exception

If a common program encounters an error, debugging is usually used in the development environment, and viewing logs in the production environment. However, in some cases, this is an error I encountered during Silverlight development:

If debugging is enabled, "Sorry, the program has crashed and cannot be attached to the process ". What should I do? Too little information is prompted, and blind suspicion of where the program is written wrong will only make the problem worse, delaying the time to solve the problem.

Troubleshooting

In this case, we should check which request caused the error by using the developer tool of the browser: Press f12 for IE8 or above, press ctrl + shift + I for chrome, and switch to "network ", start capturing:

Here we get a 500 error, knowing that it was an error in request. svc. Double-click to view the response body or directly copy the request url to the browser for more detailed error information:

We can see that the call Stack has not started to call our code, and it has nothing to do with our own code. At this time, I went to google (the programmer gave up baidu) and did not find any solution to the problem. We can only judge the problem of DomainService based on the actual situation of our program. Because this error does not occur in programs written step by step at ordinary times, but this time it is the DomainService in the referenced class library, so it must be caused by missing dll. The lazy solution: manually add a "domain service class" to the project, VS automatically add the required dll, and configure web. config. Run again to solve the problem.

Conclusion

I am most afraid of encountering very few errors with such error prompts, because it is inexplicable and cannot be found, which makes people crazy. Sometimes an error is wasted in the afternoon, and it may not be solved yet. The method is to analyze specific problems. Based on the actual situation of the program, combined with your own success experience, more google will certainly be able to solve. Of course, if you solve the problems that google cannot find, you 'd better send them to cnblogs as a mentor to serve everyone. This is also the thing that tech experts are most willing to do.

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.