在 System.Data.SqlClient.SqlInternalConnection.OnError(SqlException exception, Boolean breakConnection)
   在 System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj)
   在 System.Data.SqlClient.TdsParser.Connect(Boolean& useFailoverPartner, Boolean& failoverDemandDone, String host, String failoverPartner, String protocol, SqlInternalConnectionTds connHandler, Int64 timerExpire, Boolean encrypt, Boolean trustServerCert, Boolean integratedSecurity, SqlConnection owningObject, Boolean aliasLookup)
   在 System.Data.SqlClient.SqlInternalConnectionTds.OpenLoginEnlist(SqlConnection owningObject, SqlConnectionString connectionOptions, String newPassword, Boolean redirectedUserInstance)
   在 System.Data.SqlClient.SqlInternalConnectionTds..ctor(DbConnectionPoolIdentity identity, SqlConnectionString connectionOptions, Object providerInfo, String newPassword, SqlConnection owningObject, Boolean redirectedUserInstance)
   在 System.Data.SqlClient.SqlConnectionFactory.CreateConnection(DbConnectionOptions options, Object poolGroupProviderInfo, DbConnectionPool pool, DbConnection owningConnection)
   在 System.Data.ProviderBase.DbConnectionFactory.CreatePooledConnection(DbConnection owningConnection, DbConnectionPool pool, DbConnectionOptions options)
   在 System.Data.ProviderBase.DbConnectionPool.CreateObject(DbConnection owningObject)
   在 System.Data.ProviderBase.DbConnectionPool.UserCreateRequest(DbConnection owningObject)
   在 System.Data.ProviderBase.DbConnectionPool.GetConnection(DbConnection owningObject)
   在 System.Data.ProviderBase.DbConnectionFactory.GetConnection(DbConnection owningConnection)
   在 System.Data.ProviderBase.DbConnectionClosed.OpenConnection(DbConnection outerConnection, DbConnectionFactory connectionFactory)
   在 System.Data.SqlClient.SqlConnection.Open()
   在 System.Data.Common.DbDataAdapter.FillInternal(DataSet dataset, DataTable[] datatables, Int32 startRecord, Int32 maxRecords, String srcTable, IDbCommand command, CommandBehavior behavior)
   在 System.Data.Common.DbDataAdapter.Fill(DataSet dataSet, Int32 startRecord, Int32 maxRecords, String srcTable, IDbCommand command, CommandBehavior behavior)
   在 System.Data.Common.DbDataAdapter.Fill(DataSet dataSet)
   在 Default3.BindView() 位置 c:\Documents and Settings\.huang\My Documents\Visual Studio 2005\WebSites\WebSite9\Default3.aspx.cs:行号 30这段堆栈信息中我只想要最后在 Default3.BindView() 位置 c:\Documents and Settings\.huang\My Documents\Visual Studio 2005\WebSites\WebSite9\Default3.aspx.cs:行号 30
这一段,要怎么做??办法想尽了,可是不清楚堆栈信息处里方法。

解决方案 »

  1.   

    大家理解错了,我是想获得这个异常中的部分信息。比如上面贴出来的全部异常的信息就是 e.StackTrace.ToString()得到的。
    现在我要具体到某一段异常信息,要怎么做?
    E.StackTrace.???
    不是寻求怎么处理这个异常,这是人为的异常,没打开数据库。
      

  2.   

    substring   组合   indexof
    我也考虑过,被否定掉了,严重影响性能,最大客户压力测试人数少了1/4。
    全卡在日志的些入上了