我已经构建了一个 MVC3 应用程序并将其部署到 3rd 方托管。在对连接字符串等进行了一些认真的摆弄之后,我终于设法让它连接到主机上的 SQL DB,并且应用程序运行良好,允许 MVC 的所有花里胡哨工作(添加、更新、删除等)。
我离开网站运行了两个星期左右(没有进行任何更改),现在当我浏览它时,我收到以下错误(当自定义错误关闭时)。
> Server Error in '/' Application.
>
> 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)
>
> 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.Data.SqlClient.SqlException: 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)
>
> 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.
我知道这是连接到 SQL 数据库的问题,但我想知道的是为什么在运行两周后会发生这种情况?如果我修复它,它会在两周后再次发生吗?
干杯。