English 中文(简体)
Error on IIS for ASP. 净额
原标题:Error on IIS for ASP.Net Application

我偶尔会遇到这一错误。 当我重新启动国际调查制度时,这个问题就得到解决。 网站服务器有10多个网站,因此可以同时重新启用。

System.Data.SqlClient.SqlException: Distributed transaction completed. Either enlist
    this session in a new transaction or the NULL transaction. at 
    System.Data.SqlClient.SqlConnection.OnError(SqlException exception, Boolean 
    breakConnection) at System.Data.SqlClient.SqlInternalConnection.OnError(SqlException 
    exception, Boolean breakConnection) at 
    System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj) at 
    System.Data.SqlClient.TdsParser.Run(RunBehavior runBehavior, SqlCommand cmdHandler, 
    SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject 
    stateObj) at System.Data.SqlClient.SqlDataReader.ConsumeMetaData() at 
    System.Data.SqlClient.SqlDataReader.get_MetaData() at 
    System.Data.SqlClient.SqlCommand.FinishExecuteReader(SqlDataReader ds, RunBehavior 
    runBehavior, String resetOptionsString) at         
    System.Data.SqlClient.SqlCommand.RunExecuteReaderTds(CommandBehavior cmdBehavior, 
    RunBehavior runBehavior, Boolean returnStream, Boolean async) at 
    System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior 
    runBehavior, Boolean returnStream, String method, DbAsyncResult result) at 
    System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior 
    runBehavior, Boolean returnStream, String method) at 
    System.Data.SqlClient.SqlCommand.ExecuteReader(CommandBehavior behavior, String method) at 
    System.Data.SqlClient.SqlCommand.ExecuteReader() at MyLibrary.LoadDDList(DropDownList& 
    curDDL, String strTextField, String strValueField, String strTable, String svarconditional)

Please help me find a solution which preferably doesn t involve restarting IIS.

最佳回答

在我的图书馆班子里,你有一个叫LadDDList的职能。

这项职能需要位于ExecuteReader()指挥部周围的Try Catch。

Try
    mySqlCommand.ExecuteReader()
Catch sqlException As SqlClient.SqlException
    If sqlException.ErrorCode >= 10 Then
        Throw
    End If
End Try

在渔获量中,你想要检查差不多于10的出路。 如果不到10岁,那么它只是发出警告,你可以忽视。 如果是10个或10个以上,你需要重新浏览,因为它有实际的空白(缩小错误、无效的表格等)。

看看你的话,这只是警告,应当被忽视。 你需要确定你的代码,以便在你打过这部空洞的警报时,你就打过了车。

问题回答

暂无回答




相关问题
Anyone feel like passing it forward?

I m the only developer in my company, and am getting along well as an autodidact, but I know I m missing out on the education one gets from working with and having code reviewed by more senior devs. ...

How to Add script codes before the </body> tag ASP.NET

Heres the problem, In Masterpage, the google analytics code were pasted before the end of body tag. In ASPX page, I need to generate a script (google addItem tracker) using codebehind ClientScript ...

Transaction handling with TransactionScope

I am implementing Transaction using TransactionScope with the help this MSDN article http://msdn.microsoft.com/en-us/library/system.transactions.transactionscope.aspx I just want to confirm that is ...

System.Web.Mvc.Controller Initialize

i have the following base controller... public class BaseController : Controller { protected override void Initialize(System.Web.Routing.RequestContext requestContext) { if (...

Microsoft.Contracts namespace

For what it is necessary Microsoft.Contracts namespace in asp.net? I mean, in what cases I could write using Microsoft.Contracts;?

Separator line in ASP.NET

I d like to add a simple separator line in an aspx web form. Does anyone know how? It sounds easy enough, but still I can t manage to find how to do it.. 10x!

热门标签