The system cannot find the file specified. System.ComponentModel.Win32Exception: The system cannot f

Discussion in 'General troubleshooting' started by Sayeed Rahman, Jan 9, 2015.

  1. Hi:
    I am having the following error while deploying a MVC4 web application:

    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.ComponentModel.Win32Exception: The system cannot find the file specified

    Source Error:

    An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.

    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, Action`1 wrapCloseInAction) +5340655
    System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj, Boolean callerHasConnectionLock, Boolean asyncClose) +244
    System.Data.SqlClient.TdsParser.Connect(ServerInfo serverInfo, SqlInternalConnectionTds connHandler, Boolean ignoreSniOpenTimeout, Int64 timerExpire, Boolean encrypt, Boolean trustServerCert, Boolean integratedSecurity, Boolean withFailover) +5350915
    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) +922
    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, SessionData reconnectSessionData) +518
    System.Data.SqlClient.SqlConnectionFactory.CreateConnection(DbConnectionOptions options, DbConnectionPoolKey poolKey, Object poolGroupProviderInfo, DbConnectionPool pool, DbConnection owningConnection, DbConnectionOptions userOptions) +278
    System.Data.ProviderBase.DbConnectionFactory.CreatePooledConnection(DbConnectionPool pool, DbConnection owningObject, DbConnectionOptions options, DbConnectionPoolKey poolKey, DbConnectionOptions userOptions) +38
    System.Data.ProviderBase.DbConnectionPool.CreateObject(DbConnection owningObject, DbConnectionOptions userOptions, DbConnectionInternal oldConnection) +732
    System.Data.ProviderBase.DbConnectionPool.UserCreateRequest(DbConnection owningObject, DbConnectionOptions userOptions, DbConnectionInternal oldConnection) +85
    System.Data.ProviderBase.DbConnectionPool.TryGetConnection(DbConnection owningObject, UInt32 waitForMultipleObjectsTimeout, Boolean allowCreate, Boolean onlyOneCheckConnection, DbConnectionOptions userOptions, DbConnectionInternal& connection) +1057
    System.Data.ProviderBase.DbConnectionPool.TryGetConnection(DbConnection owningObject, TaskCompletionSource`1 retry, DbConnectionOptions userOptions, DbConnectionInternal& connection) +78
    System.Data.ProviderBase.DbConnectionFactory.TryGetConnection(DbConnection owningConnection, TaskCompletionSource`1 retry, DbConnectionOptions userOptions, DbConnectionInternal oldConnection, DbConnectionInternal& connection) +196
    System.Data.ProviderBase.DbConnectionInternal.TryOpenConnectionInternal(DbConnection outerConnection, DbConnectionFactory connectionFactory, TaskCompletionSource`1 retry, DbConnectionOptions userOptions) +146
    System.Data.ProviderBase.DbConnectionClosed.TryOpenConnection(DbConnection outerConnection, DbConnectionFactory connectionFactory, TaskCompletionSource`1 retry, DbConnectionOptions userOptions) +16
    System.Data.SqlClient.SqlConnection.TryOpenInner(TaskCompletionSource`1 retry) +94
    System.Data.SqlClient.SqlConnection.TryOpen(TaskCompletionSource`1 retry) +110
    System.Data.SqlClient.SqlConnection.Open() +96
    System.Data.SqlClient.SqlProviderServices.UsingConnection(SqlConnection sqlConnection, Action`1 act) +79
    System.Data.SqlClient.SqlProviderServices.UsingMasterConnection(SqlConnection sqlConnection, Action`1 act) +379
    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) +169
    System.Data.Entity.ModelConfiguration.Utilities.DbProviderServicesExtensions.GetProviderManifestTokenChecked(DbProviderServices providerServices, DbConnection connection) +32

    [ProviderIncompatibleException: An error occurred while getting provider information from the database. This can be caused by Entity Framework using an incorrect connection string. Check the inner exceptions for details and ensure that the connection string is correct.]
    System.Data.Entity.ModelConfiguration.Utilities.DbProviderServicesExtensions.GetProviderManifestTokenChecked(DbProviderServices providerServices, DbConnection connection) +192
    System.Data.Entity.ModelConfiguration.Utilities.DbConnectionExtensions.GetProviderInfo(DbConnection connection, DbProviderManifest& providerManifest) +39
    System.Data.Entity.DbModelBuilder.Build(DbConnection providerConnection) +46
    System.Data.Entity.Internal.LazyInternalContext.CreateModel(LazyInternalContext internalContext) +62
    System.Data.Entity.Internal.RetryLazy`2.GetValue(TInput input) +123
    System.Data.Entity.Internal.LazyInternalContext.InitializeContext() +461
    System.Data.Entity.Internal.InternalContext.GetEntitySetAndBaseTypeForType(Type entityType) +18
    System.Data.Entity.Internal.Linq.InternalSet`1.Initialize() +52
    System.Data.Entity.Internal.Linq.InternalSet`1.GetEnumerator() +15
    System.Data.Entity.Infrastructure.DbQuery`1.System.Collections.Generic.IEnumerable<TResult>.GetEnumerator() +40
    System.Collections.Generic.List`1..ctor(IEnumerable`1 collection) +369
    System.Linq.Enumerable.ToList(IEnumerable`1 source) +58
    DummyApp.Controllers.HomeController.Index() in C:\Users\Sayeed\Desktop\SayeedWorkSpace\DummyApp\DummyApp\Controllers\HomeController.cs:54
    lambda_method(Closure , ControllerBase , Object[] ) +62
    System.Web.Mvc.ActionMethodDispatcher.Execute(ControllerBase controller, Object[] parameters) +14
    System.Web.Mvc.ReflectedActionDescriptor.Execute(ControllerContext controllerContext, IDictionary`2 parameters) +181
    System.Web.Mvc.ControllerActionInvoker.InvokeActionMethod(ControllerContext controllerContext, ActionDescriptor actionDescriptor, IDictionary`2 parameters) +27
    System.Web.Mvc.Async.<>c__DisplayClass42.<BeginInvokeSynchronousActionMethod>b__41() +28
    System.Web.Mvc.Async.<>c__DisplayClass8`1.<BeginSynchronous>b__7(IAsyncResult _) +10
    System.Web.Mvc.Async.WrappedAsyncResult`1.End() +50
    System.Web.Mvc.Async.AsyncControllerActionInvoker.EndInvokeActionMethod(IAsyncResult asyncResult) +32
    System.Web.Mvc.Async.<>c__DisplayClass39.<BeginInvokeActionMethodWithFilters>b__33() +58
    System.Web.Mvc.Async.<>c__DisplayClass4f.<InvokeActionMethodFilterAsynchronously>b__49() +225
    System.Web.Mvc.Async.<>c__DisplayClass37.<BeginInvokeActionMethodWithFilters>b__36(IAsyncResult asyncResult) +10
    System.Web.Mvc.Async.WrappedAsyncResult`1.End() +50
    System.Web.Mvc.Async.AsyncControllerActionInvoker.EndInvokeActionMethodWithFilters(IAsyncResult asyncResult) +34
    System.Web.Mvc.Async.<>c__DisplayClass2a.<BeginInvokeAction>b__20() +24
    System.Web.Mvc.Async.<>c__DisplayClass25.<BeginInvokeAction>b__22(IAsyncResult asyncResult) +99
    System.Web.Mvc.Async.WrappedAsyncResult`1.End() +50
    System.Web.Mvc.Async.AsyncControllerActionInvoker.EndInvokeAction(IAsyncResult asyncResult) +27
    System.Web.Mvc.<>c__DisplayClass1d.<BeginExecuteCore>b__18(IAsyncResult asyncResult) +14
    System.Web.Mvc.Async.<>c__DisplayClass4.<MakeVoidDelegate>b__3(IAsyncResult ar) +23
    System.Web.Mvc.Async.WrappedAsyncResult`1.End() +55
    System.Web.Mvc.Controller.EndExecuteCore(IAsyncResult asyncResult) +39
    System.Web.Mvc.Async.<>c__DisplayClass4.<MakeVoidDelegate>b__3(IAsyncResult ar) +23
    System.Web.Mvc.Async.WrappedAsyncResult`1.End() +55
    System.Web.Mvc.Controller.EndExecute(IAsyncResult asyncResult) +29
    System.Web.Mvc.Controller.System.Web.Mvc.Async.IAsyncController.EndExecute(IAsyncResult asyncResult) +10
    System.Web.Mvc.<>c__DisplayClass8.<BeginProcessRequest>b__3(IAsyncResult asyncResult) +25
    System.Web.Mvc.Async.<>c__DisplayClass4.<MakeVoidDelegate>b__3(IAsyncResult ar) +23
    System.Web.Mvc.Async.WrappedAsyncResult`1.End() +55
    System.Web.Mvc.MvcHandler.EndProcessRequest(IAsyncResult asyncResult) +31
    System.Web.Mvc.MvcHandler.System.Web.IHttpAsyncHandler.EndProcessRequest(IAsyncResult result) +9
    System.Web.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() +9651116
    System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) +155

    Any help to resolve this problem is much appreciated.

    Best regards,
    Sayeed
     
  2. Elshadriel

    Elshadriel Winhost Staff

    You need to connect your application to a regular SQL Server database. LocalDb is not supported.
     
  3. What is the instance name of the SQL Server 2014 on the Winhost? I have changed the LocalDb to '.\SQLSever2014' which is the instance name of the server on my machine. If you could kindly provide an example of a connection string that a user like myself will use on the web.config of the application that I am trying to deploy, I shall be immensely helped.

    Best regards,
    Sayeed
     
  4. curtis

    curtis Winhost Staff

    When you create a SQL database in the control panel, we display a sample connection string.
     
  5. Thanks a lot. That was helpful. Now I am faced with a different kind of problem. I am trying to clean the files I uploaded onto the root directory. Reason being I uploaded an application that has some files that are conflicting with the later version of the application. This is most likely the reason why the website is not launching. I figure if I can have a clean slate on the root directory to begin with this time around, the problem will go away. How can I clean the root directory?

    Your help is much appreciated.

    Best regards,

    Sayeed
     
  6. Elshadriel

    Elshadriel Winhost Staff

    Hi Sayeed,

    You can just FTP into your account and delete all the files.
     
  7. Hi:
    Thanks again for your reply. I have been trying to FTP into using SSL but keep getting the following message:
    "Server responded "Connection closed by remote host"
    The connection to the remote host was lost. This usually means that the Netowrk Connection has terminated or that the remote host computer was rebooted.

    I am not sure what's happening either with on the server side or what I a doing wrong here. Your help is much appreciated again.

    Best regards,
    Sayeed
     
  8. I have figured it out and has since deleted the unwanted files in the root directory. Thanks again for your time and considerations.

    Best regards,
    Sayeed
     
  9. However, now I am having the following error when I try to deploy the web application using web-deploy:
    Error 10 Web deployment task failed.((2015-01-14 7:52:18 AM) An error occurred when the request was processed on the remote computer.)

    (2015-01-14 7:52:18 AM) An error occurred when the request was processed on the remote computer.
    The database 'DB_84516_dbsidb' could not be created.

    Any help to resolve this is much appreciated.

    Best regards,
    Sayeed


     
  10. I am posting on this forum since I had the same error as Sayeed. However I did as the forum suggested and now I have the following:


    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: 26 - Error Locating Server/Instance Specified)

    Can anyone help I am simply trying to connect to the database.
     
  11. Nevermind developer error, simplememebership configured to use sql express and not full version. All fixed :)
     
    Elshadriel, ComputerMan and Michael like this.

Share This Page