This article is a mirror article of machine translation, please click here to jump to the original article.

View: 15865|Reply: 1

[ASP.NET] Help page 500 error issue

[Copy link]
Posted on 5/4/2019 7:13:51 PM | | |
Help page 500 error problem:
Website C#+mysql5.7 development, during the operation, the number of visits exceeds 50, the web page will report 500 errors, and the configuration file cannot be read.
Checked the web.config file and there were no errors and no error sections,
Other websites on the same server also use the same application pool, but other websites don't have this problem.
And when there is an error, this website will report 500 errors, and other websites are normal.
It can also be understood that mysql and application pools are correct, but why is the 500 error reported? Where should the problem be?




Previous:Little scumbag, you scumbag come out for me!
Next:How to download Baidu Netdisk large files on Linux system
Posted on 5/5/2019 9:39:32 AM |
500 internal error, it should be that the code threw an exception during execution.

1: It should not be a configuration file problem, if it is a configuration file problem, the website will start with an error.

2: If the concurrency exceeds 50, the error of 500 will occur, is it a database connection pool problem, for example, the maximum number of database connections is 100, and the database connection pool with 50 concurrency may exceed 100, and there will be an exception.
Resolution suggestions:

Add global exceptions, which in turn catch any unhandled exceptions raised by the website. After the specific exception cause is captured, it is processed and resolved according to the line number and reason of the exception prompt.

Resources:

asp.net MVC global exception handling and exception logs
https://www.itsvse.com/thread-3250-1-1.html
(Source: Architect_Programmer)
C# handles exceptions through filters
https://www.itsvse.com/thread-6458-1-1.html
(Source: Architect_Programmer)


Disclaimer:
All software, programming materials or articles published by Code Farmer Network are only for learning and research purposes; The above content shall not be used for commercial or illegal purposes, otherwise, users shall bear all consequences. The information on this site comes from the Internet, and copyright disputes have nothing to do with this site. You must completely delete the above content from your computer within 24 hours of downloading. If you like the program, please support genuine software, purchase registration, and get better genuine services. If there is any infringement, please contact us by email.

Mail To:help@itsvse.com