簡體   English   中英

系統找不到Windows Server 2012中指定的文件

[英]The system cannot find the file specified in Windows Server 2012

我檢查了很多參考站點來解決此問題,但沒有人給出正確的解決方案。 我將應用程序托管在Windows Server 2008/2012上,但無法正常工作。

實際上,它在本地系統上運行良好,但是發布后,我將該應用程序托管在服務器上,則無法正常工作。

以下是錯誤的詳細信息。

該系統找不到指定的文件。

說明:在執行當前Web請求期間,發生了未處理的異常enter code here 請查看堆棧跟蹤,以獲取有關錯誤及其在代碼中起源的更多信息。

異常詳細信息:System.ComponentModel.Win32Exception:系統找不到指定的文件

源錯誤:當前Web請求的執行期間生成了未處理的異常。 可以使用下面的異常堆棧跟蹤來標識有關異常的來源和位置的信息。

Stack Trace:

[Win32Exception (0x80004005): The system cannot find the file specified]

[SqlException (0x80131904): A network-related or instance-specific error occurred while establishing a connection to SQL Server. The server was not found or was not accessible. Verify that the instance name is correct and that SQL Server is configured to allow remote connections. (provider: SQL Network Interfaces, error: 52 - Unable to locate a Local Database Runtime installation. Verify that SQL Server Express is properly installed and that the Local Database Runtime feature is enabled.)]
System.Data.SqlClient.SqlInternalConnection.OnError(SqlException exception, Boolean breakConnection, Action1 wrapCloseInAction)
  +5296071    System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject
  stateObj, Boolean callerHasConnectionLock, Boolean asyncClose) +558

  System.Data.SqlClient.TdsParser.Connect(ServerInfo serverInfo,
  SqlInternalConnectionTds connHandler, Boolean ignoreSniOpenTimeout,
  Int64 timerExpire, Boolean encrypt, Boolean trustServerCert, Boolean
  integratedSecurity, Boolean withFailover) +5308555

  System.Data.SqlClient.SqlInternalConnectionTds.AttemptOneLogin(ServerInfo
  serverInfo, String newPassword, SecureString newSecurePassword,
  Boolean ignoreSniOpenTimeout, TimeoutTimer timeout, Boolean
  withFailover) +145

  System.Data.SqlClient.SqlInternalConnectionTds.LoginNoFailover(ServerInfo
  serverInfo, String newPassword, SecureString newSecurePassword,
  Boolean redirectedUserInstance, SqlConnectionString connectionOptions,
  SqlCredential credential, TimeoutTimer timeout) +920

  System.Data.SqlClient.SqlInternalConnectionTds.OpenLoginEnlist(TimeoutTimer
  timeout, SqlConnectionString connectionOptions, SqlCredential
  credential, String newPassword, SecureString newSecurePassword,
  Boolean redirectedUserInstance) +307

  System.Data.SqlClient.SqlInternalConnectionTds..ctor(DbConnectionPoolIdentity
  identity, SqlConnectionString connectionOptions, SqlCredential
  credential, Object providerInfo, String newPassword, SecureString
  newSecurePassword, Boolean redirectedUserInstance, SqlConnectionString
  userConnectionOptions) +434

  System.Data.SqlClient.SqlConnectionFactory.CreateConnection(DbConnectionOptions
  options, DbConnectionPoolKey poolKey, Object poolGroupProviderInfo,
  DbConnectionPool pool, DbConnection owningConnection,
  DbConnectionOptions userOptions) +225

  System.Data.ProviderBase.DbConnectionFactory.CreatePooledConnection(DbConnectionPool
  pool, DbConnectionOptions options, DbConnectionPoolKey poolKey,
  DbConnectionOptions userOptions) +37

  System.Data.ProviderBase.DbConnectionPool.CreateObject(DbConnectionOptions
  userOptions) +558

  System.Data.ProviderBase.DbConnectionPool.UserCreateRequest(DbConnectionOptions
  userOptions) +67

  System.Data.ProviderBase.DbConnectionPool.TryGetConnection(DbConnection
  owningObject, UInt32 waitForMultipleObjectsTimeout, Boolean
  allowCreate, Boolean onlyOneCheckConnection, DbConnectionOptions
  userOptions, DbConnectionInternal& connection) +1052

  System.Data.ProviderBase.DbConnectionPool.TryGetConnection(DbConnection
  owningObject, TaskCompletionSource1 retry, DbConnectionOptions userOptions, DbConnectionInternal& connection) +78
System.Data.ProviderBase.DbConnectionFactory.TryGetConnection(DbConnection owningConnection, TaskCompletionSource1 retry, DbConnectionOptions
  userOptions, DbConnectionInternal& connection) +167

  System.Data.ProviderBase.DbConnectionClosed.TryOpenConnection(DbConnection
  outerConnection, DbConnectionFactory connectionFactory,
  TaskCompletionSource1 retry, DbConnectionOptions userOptions) +143
System.Data.SqlClient.SqlConnection.TryOpen(TaskCompletionSource1
  retry) +83    System.Data.SqlClient.SqlConnection.Open() +96

  System.Data.SqlClient.SqlProviderServices.UsingConnection(SqlConnection
  sqlConnection, Action1 act) +79.
System.Data.SqlClient.SqlProviderServices.UsingMasterConnection(SqlConnection sqlConnection, Action`1 act) +384.
System.Data.SqlClient.SqlProviderServices.GetDbProviderManifestToken(DbConnection connection) +241
System.Data.Common.DbProviderServices.GetProviderManifestToken(DbConnection connection) +26

[ProviderIncompatibleException: The provider did not return a ProviderManifestToken string.]
System.Data.Common.DbProviderServices.GetProviderManifestToken(DbConnection connection) +170
System.Web.Providers.ModelHelper.GetStorageMetadata(String providerName, DbConnection connection, String ssdl) +35
System.Web.Providers.ModelHelper.CreateMetadataWorkspace(String providerName, DbConnection connection, String csdl, String ssdl, String msl) +154
System.Web.Providers.ModelHelper.CreateEntityConnection(ConnectionStringSettings setting, String csdl, String ssdl, String msl) +109
System.Web.Providers.ModelHelper.CreateMembershipEntities(ConnectionStringSettings setting) +28
System.Web.Providers.DefaultMembershipProvider.GetPasswordWithFormat(String userName, Boolean updateLastLoginActivityDate, Int32& status, String& password, Int32& format, String& salt, Int32& failedPasswordAttemptCount, Int32& failedPasswordAnswerAttemptCount, Boolean& isApproved, DateTime& lastLoginDate, DateTime& lastActivityDate) +118
System.Web.Providers.DefaultMembershipProvider.CheckPassword(String userName, String password, Boolean updateLastActivityDate, Boolean failIfNotApproved, String& salt, Int32& passwordFormat) +81
System.Web.Providers.DefaultMembershipProvider.ValidateUser(String username, String password) +105
System.Web.Security.Membership.ValidateUser(String username, String password) +26 Staff.Web.Account.Login.OnAuthenticate(Object sender, AuthenticateEventArgs e) in c:\Assembla\SVN\servicesdue\Staff.Web\Staff.Web\Account\Login.aspx.cs:28 System.Web.UI.WebControls.Login.OnAuthenticate(AuthenticateEventArgs e) +9449786 System.Web.UI.WebControls.Login.AttemptLogin() +119.
System.Web.UI.WebControls.Login.OnBubbleEvent(Object source, EventArgs e) +75 System.Web.UI.Control.RaiseBubbleEvent(Object source, EventArgs args) +37
System.Web.UI.WebControls.Button.OnCommand(CommandEventArgs e) +114
System.Web.UI.WebControls.Button.RaisePostBackEvent(String eventArgument) +159.
System.Web.UI.WebControls.Button.System.Web.UI.IPostBackEventHandler.
RaisePostBackEvent(String eventArgument) +10.

如您在堆棧跟蹤中所見。 它告訴你問題所在。 最有可能的是,您與數據庫的連接已斷開,或者您無法連接數據庫服務器。

“建立與SQL Server的連接時發生了與網絡相關或特定於實例的錯誤。找不到服務器或無法訪問該服務器。請驗證實例名稱正確並且已將SQL Server配置為允許遠程連接。(提供者: SQL網絡接口,錯誤:52-無法找到本地數據庫運行時安裝。請驗證是否正確安裝了SQL Server Express並啟用了本地數據庫運行時功能。)]“

此外,您需要研究:

1]從Web服務器到數據庫服務器的Firewall settings
2]連接字符串錯誤
3]啟用適當的協議管道/ tcp-ip
4]檢查SQL Server service運行

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM