Thursday, February 12, 2009

A severe error occurred on the current command. The results, if any, should be discarded.

Error message:
A severe error occurred on the current command. The results, if any, should be discarded.
A severe error occurred on the current command. The results, if any, should be discarded.

Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

Exception Details: System.Exception: A severe error occurred on the current command. The results, if any, should be discarded.
A severe error occurred on the current command. The results, if any, should be discarded.

Error Message in DB:
The connection has been dropped because the principal that opened it subsequently assumed a new security context, and then tried to reset the connection under its impersonated security context. This scenario is not supported. See "Impersonation Overview" in Books Online

Solution:
Implement coding workaround, non-dba issue.
Issue: Web.config setting for connection strings "Connection Reset" does not work for newer versions of .NET2.0. This issue starts once .NET 2.0 SP1 or greater is installed on the application server machine. You'll have to change your code where you are impersonating someone.

Immediate solution:
In your web.config database connection string turn off pooling, Pooling=false;

2 comments:

शशी said...

AS per you information the issue is related to .net coding not related to sql server but below link tell us that issue is in MS-Sql Server
http://support.microsoft.com/kb/910416

Mohammad Rahman said...

excellent solution it works for me