1

我在生产环境中遇到了在开发环境中没有的奇怪错误:使用 4 个用户进行测试时,应用程序运行良好且没有错误,但是当 10 个用户同时使用该应用程序时,我遇到了多个错误,例如或者我设法通过在我的连接字符串上启用 MARS 并使用“使用块”来处理我的连接对象来纠正这个错误connection is already opendatareader needs a valid connection. 但我仍然有其他错误,例如

An error occurred while executing the command definition. See the inner exception for details.*InnerExceptionSystem.Data.SqlClient.SqlException (0x80131904): A severe error occurred on the current command.  The results, if any, should be discarded.

或者

Unable to set field/property Address on entity type System.Data.Entity.DynamicProxies.User_B22E7C85832E5768701582412113F0C185707EA5275299E638DA68EECEC6CCE5. See InnerException for details.*Inner exceptionSystem.IndexOutOfRangeException: Index was outside the bounds of the array.

经过几次测试,我Object reference not set to an instance of an object在大多数功能上都有错误,用户无法使用该应用程序,我必须重新启动 IIS 以便用户再次使用该应用程序。

是否有任何特定的 IIS 7 或/和 SQL SERVER 2008 R2 配置要做?或代码更改?

谢谢你的帮助。

4

0 回答 0