Recently, I used Webservice interfaces with QAD for data maintenance. This is a big topic, and the system's log4net cannot be recorded due to many problems. In other words, when QAD calls an interface, it may contain hundreds of fields and QAD is a product. Therefore, the maintenance interface provided by QAD must comply with the interface standard of QAD, the four words are quite cool.
There is no way for us to make a program, and we can get tired again. At this time, I suddenly fell down. webservice is based on IIS, so IIS logs must be available based on IIS, so I will start from IIS logs to solve these problems.
Example: QAD calls our interface and returns the message "<QdocProcessingException> HTTP/1.1 500 Internal Server Error </QdocProcessingException>". The input parameter of this interface is an object, the object contains an encrypted password and a Maintain object. The Maintain object contains hundreds of fields and detailed log records in the interface method. The method returns a defined object. No logs are generated when QAD calls our interface.
Analysis: first, from the perspective of the returned message format, the returned message is not a predefined response object. From the perspective of the returned message content, the message is an obvious 500 error, that is to say, there must be some problems with our interface, but it is unclear where the problem occurs. Secondly, we can clearly understand from the problem that QAD has not called the method in the interface. Otherwise, the log records in the method can capture the exception information. In other cases, QAD has called our interface, however, there was a small error before calling the method to enter the method. It is expected that an error may occur in the input object. However, the object contains hundreds of fields and how to troubleshoot the error. Even if this troubleshooting is successful, next time. At this point, my hairs have all been erected, but it doesn't matter. Who makes us a programmer.
Solution: Is there any IIS log? Note: the iis log only records the 500 error of this request, but the specific error content still needs to be configured. Please refer to the details.
There is a Failed Request Tarcing Rules in the IIS configuration. We have a New Rules.
Let's create a new 500 error. OK. This time we use QAD to call our interface.
This time we found a 500 Error in u_ex120305.txt under C: \ inetpub \ logs \ LogFiles \ w3svc2. let's look at the changes under C: \ inetpub \ logs \ faileqlogfiles \ W3SVC2, at this time, there are some XML files starting with fr0000 added to the path, so let's open this latest file and analyze it.
See the problem in red. It turns out that the type definition of a field is incorrect. As a result, the interface called by QAD reports an error during serialization and the problem is solved.
Author: Tonny Yang
Source: http://www.cnblogs.com/yangtongnet/
Welcome to the. NET SoftWare technology exchange group 78817973. Let's discuss technology, career, and life together.