“The system cannot find the file specified”

后端 未结 10 787
执念已碎
执念已碎 2020-11-29 11:17

I saw many questions on SO with this error. But none were related to forms. I just hosted my application server after testing locally. I think it worked for a few mins but I

相关标签:
10条回答
  • 2020-11-29 11:22

    start the sql server agent, that should fix your problem

    0 讨论(0)
  • 2020-11-29 11:23

    I had the same problem - for me it was the SQL Server running out of memory. Freeing up some memory solved the issue

    0 讨论(0)
  • 2020-11-29 11:24

    Considering that a LocalDb instance only intended for use in development. LocalDb is not available for production servers When you deploy the final result.

    I think your connection string is pointing to a LocalDb instance and you need to take certain steps to turn it into the SQL Server database. It's not just a matter of copying an mdf file either. It will possibly differ from one hosting company to another, but typically, you need to create a backup of your existing database (a .bak file) and then restore that to the hosting company's SQL Server. You should ask them where you can find instructions on deploying your database into production.

    0 讨论(0)
  • 2020-11-29 11:27

    I got this error when starting my ASP.NET application and in my case the problem was that the SQL Server service was not running. Starting that cleared it up.

    0 讨论(0)
  • 2020-11-29 11:28

    A network-related or instance-specific error occurred while establishing a connection to SQL Server. The server was not found or was not accessible. text

    Generally issues like this are related to any of the following need to be looked at:

    • firewall settings from the web server to the database server
    • connection string errors
    • enable the appropriate protocol pipes/ tcp-ip

    Try connecting to sql server with sql management server on the system that sql server is installed on and work from there. Pay attention to information in the errorlogs.

    0 讨论(0)
  • 2020-11-29 11:28

    The most common reason could be the database connection string. You have to change the connection string attachDBFile=|DataDirectory|file_name.mdf. there might be problem in host name which would be (local),localhost or .\sqlexpress.

    0 讨论(0)
提交回复
热议问题