System.Data.SqlClient.SqlException (0x80131904): 建立連接至 SQL Server 時,發生網路相關或執行個體特定的錯誤。找不到或無法存取伺服器。確認執行個名稱是否正確,以及 SQL Server 是否設定為允許遠端連線。 (provider: Named Pipes Provider, error: 40 - 無法開啟至 SQL Server 的連接) ---> System.ComponentModel.Win32Exception (0x80004005): 系統找不到指定的檔案。 於 System.Data.SqlClient.SqlInternalConnectionTds..ctor(DbConnectionPoolIdentity identity, SqlConnectionString connectionOptions, SqlCredential credential, Object providerInfo, String newPassword, SecureString newSecurePassword, Boolean redirectedUserInstance, SqlConnectionString userConnectionOptions, SessionData reconnectSessionData, DbConnectionPool pool, String accessToken, Boolean applyTransientFaultHandling, SqlAuthenticationProviderManager sqlAuthProviderManager) 於 System.Data.SqlClient.SqlConnectionFactory.CreateConnection(DbConnectionOptions options, DbConnectionPoolKey poolKey, Object poolGroupProviderInfo, DbConnectionPool pool, DbConnection owningConnection, DbConnectionOptions userOptions) 於 System.Data.ProviderBase.DbConnectionFactory.CreatePooledConnection(DbConnectionPool pool, DbConnection owningObject, DbConnectionOptions options, DbConnectionPoolKey poolKey, DbConnectionOptions userOptions) 於 System.Data.ProviderBase.DbConnectionPool.CreateObject(DbConnection owningObject, DbConnectionOptions userOptions, DbConnectionInternal oldConnection) 於 System.Data.ProviderBase.DbConnectionPool.UserCreateRequest(DbConnection owningObject, DbConnectionOptions userOptions, DbConnectionInternal oldConnection) 於 System.Data.ProviderBase.DbConnectionPool.TryGetConnection(DbConnection owningObject, UInt32 waitForMultipleObjectsTimeout, Boolean allowCreate, Boolean onlyOneCheckConnection, DbConnectionOptions userOptions, DbConnectionInternal& connection) 於 System.Data.ProviderBase.DbConnectionPool.TryGetConnection(DbConnection owningObject, TaskCompletionSource`1 retry, DbConnectionOptions userOptions, DbConnectionInternal& connection) 於 System.Data.ProviderBase.DbConnectionFactory.TryGetConnection(DbConnection owningConnection, TaskCompletionSource`1 retry, DbConnectionOptions userOptions, DbConnectionInternal oldConnection, DbConnectionInternal& connection) 於 System.Data.ProviderBase.DbConnectionInternal.TryOpenConnectionInternal(DbConnection outerConnection, DbConnectionFactory connectionFactory, TaskCompletionSource`1 retry, DbConnectionOptions userOptions) 於 System.Data.SqlClient.SqlConnection.TryOpenInner(TaskCompletionSource`1 retry) 於 System.Data.SqlClient.SqlConnection.TryOpen(TaskCompletionSource`1 retry) 於 System.Data.SqlClient.SqlConnection.Open() 於 Microsoft.Practices.EnterpriseLibrary.Data.Database.OpenConnection() 於 Microsoft.Practices.EnterpriseLibrary.Data.Database.ExecuteNonQuery(DbCommand command) 於 MaxFrame2005.Base.ExecuteSqlServerDAL.ExecuteSQLString(String cmdText) 於 C:\Inetpub\wwwroot\TCFP\TCFP.Services\ExecuteSqlServerDAL.cs: 行 123 ClientConnectionId:00000000-0000-0000-0000-000000000000 Error Number:2,State:0,Class:20

 


执行阶段错误

'/2013' 应用程式中发生伺服器错误。

执行阶段错误

描述: 伺服器上发生应用程式错误。此应用程式的目前自订错误设定因安全性考量,防止他人从远端看见应用程式错误的详细资讯。然而,可以使用本机伺服器电脑上的浏览器检视。

详细资料: 若要在远端电脑检视此特定错误讯息的详细资讯,请于目前 Web 应用程式根目录内的 "web.config" 组态档中建立 <customErrors> 标记。然后将 <customErrors> 标记的 "mode" 属性设为 "Off"。


<!-- Web.Config 组态档 -->

<configuration>
    <system.web>
        <customErrors mode="Off"/>
    </system.web>
</configuration>

注意: 可以藉由修改应用程式 <customErrors> 组态标记的 "defaultRedirect" 属性,使其指向自订错误页面的 URL,以便使用自订错误页面取代您目前看到的错误页面。


<!-- Web.Config 组态档 -->

<configuration>
    <system.web>
        <customErrors mode="RemoteOnly" defaultRedirect="mycustompage.htm"/>
    </system.web>
</configuration>