Continued & ldquo; poor & rdquo; Design

Source: Internet
Author: User

Because of the problem, we know how to make progress. Several problems mentioned in "bad design" are what I have and are dealing. Some have been solved, and some have not yet. Many may ask why these situations have not been taken into consideration at the beginning? Remember one sentence: Rome was not built in one day, and any excellent product was not designed perfectly once.

This article mainly shares three questions. I believe it will be helpful to many friends who use C #. NET to develop information systems.

1) connection problems

1.1 data transfer between two Web information systems with different protocols

When a Web system submits data to another Web System in POST mode, the following error message is displayed:

Cocould not establish trust relationship for the SSL/TLS secure channel.

Note that this error message is not encountered every time. In addition, the Web system for information submission is the HTTP protocol, and the Web system for receiving information is the HTTPS protocol. After everyone's efforts, I found some information on the Internet and finally solved the problem. The solution is simple: add the code in the red box below.

650) this. width = 650; "border =" 0 "height =" 257 "src =" http://www.bkjia.com/uploads/allimg/131228/140SMD4-0.png "alt =" image "title =" image "style =" border-bottom: 0px; border-left: 0px; border-top: 0px; border-right: 0px "/>

For details, refer to the following two online documents:

A. RemoteCertificateValidationCallback Delegate

B. SSL Encrypted Session with ServerCertificateValidationCallback


1.2 WebService timeout exception

Because we are used to setting the web Service connection timeout in Web. config. For example, 300 here is 300 Second.

650) this. width = 650; "border =" 0 "height =" 22 "src =" http://www.bkjia.com/uploads/allimg/131228/140SMP1-1.png "alt =" image "title =" image "style =" border-bottom: 0px; border-left: 0px; border-top: 0px; border-right: 0px "/>

However, the connection timeout length in the Code is set to 300 ms and self-righteous to 300 seconds) in the site responsible For the payment transfer), resulting in a connection timeout exception from time to time. In addition, this problem is not often encountered. In general, our first response to technical support and service engineers is network speed. Regardless of the possible cause of the timeout Exception: Network, database, and transaction processing, we recommend that you try three times when Timed Out Exception occurs at one end of the request.

650) this. width = 650; "border =" 0 "height =" 222 "src =" http://www.bkjia.com/uploads/allimg/131228/140SM308-2.png "alt =" image "title =" image "style =" border-bottom: 0px; border-left: 0px; border-top: 0px; border-right: 0px "/>

2) cache Problems

This is a strange question! A few seconds ago, we saved the data in the Cache and suddenly lost it inexplicably, causing the entire payment process to fail. Later, I checked some system logs and found that a process in IIS was recycled, and all the data stored in the Cache was cleared. Finally, I found that IIS is automatically recycled every 29 hours by default. To avoid problems caused by the automatic collection of Application Pool, we recommend that you modify the Application Pool settings of IIS and recycle them at a fixed time, such as a.m.

650) this. width = 650; "border =" 0 "height =" 108 "src =" http://www.bkjia.com/uploads/allimg/131228/140SJA2-3.png "alt =" image "title =" image "style =" border-bottom: 0px; border-left: 0px; border-top: 0px; border-right: 0px "/>

650) this. width = 650; "border =" 0 "height =" 345 "src =" http://www.bkjia.com/uploads/allimg/131228/140SKU6-4.png "alt =" image "title =" image "style =" border-bottom: 0px; border-left: 0px; border-top: 0px; border-right: 0px "/>

650) this. length = 650; "width =" 584 "border =" 0 "height =" 408 "src =" http://www.bkjia.com/uploads/allimg/131228/140SH644-5.png "alt =" image "title =" image "style =" border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-right-: "/>

3) concurrency issues

This problem is even more strange! Generally speaking, concurrency means that multiple users operate on one thing at a time. The concurrency problem mentioned here is that a user submits the same request information multiple times at the same time. For example, I buy a product on a website and then go to a third party to pay for it. After the third party pays the fee, the third-party site will "Callback" a page of the original site. According to the normal situation, the original site only needs to process according to the unique ID code passed back. However, a third-party site does not know the intention of calling back the same interface multiple times with the same information. The interval between the two requests is very short, that is, the first request has not been processed, and the second request is submitted, resulting in two payment records being created. Note: The callback here refers to a third-party site submitting data through POST)

Many people think about using locks. The question is how to make good use of these locks ". Two steps are required: 1) Support for simultaneous payment by multiple users; 2) one payment record of the same user cannot be processed in multiple transactions at the same time. Just like: A few people can withdraw money from different ATMs at the same time, but the same user cannot withdraw money from different ATMs at the same time.

650) this. width = 650; "border =" 0 "height =" 306 "src =" http://www.bkjia.com/uploads/allimg/131228/140SJI5-6.png "alt =" image "title =" image "style =" border-bottom: 0px; border-left: 0px; border-top: 0px; border-right: 0px "/>

Remarks

From the customer's feedback on these issues, we have been using e-mails for communication until the problem is solved, and it took a long time before and after. In many cases, we do not try to work hard, but often use different testing environments. Therefore, many problems cannot easily find the root cause of the problem. Of course, technical capabilities and experience are also a huge factor. However, with this kind of work experience under pressure from customers, we can truly feel the feelings of customers and users-They trust our technical engineers very much!

This article is from the "CTO-360" blog, please be sure to keep this source http://penzhaohui.blog.51cto.com/3311602/637823

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.