I’ve built an MVC3 application and deployed it to 3rd party hosting. After some serious fiddling with connection strings and the like I finally managed to get it connecting to the SQL DB on the hosting and the application ran fine, allowing all the bells and whistles of MVC to work (Adding, Updating, Deleting ect).
I left the website to run for two or so weeks (making no changes whatsoever), now when I browse to it I get the following error (when custom errors turned off).
> 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.
I know its a problem connecting to the SQL database, but what I want to know is WHY after two weeks of running it’s happened? AND if I fix it will it then happen again after another two weeks?
Cheers.
If it was deployed and running successfully for past 2 weeks. There must be a problem with your Hosting provider’s end. You can open a ticket on your hosting provider’s support system.
Download the copy and run it on local environment with certain changes (db string etc) and check if everything is okay.
I believe, this is the issue with hosting provider’s end.