I always get the error :
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: Named Pipes Provider, error: 40 - Could not open a connection to SQL Server)
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.
Now, I want to redirect my project to one page that show the message “We will back soon” or something else beside that error message that occurred.
Could anyone can tell me how can I do this in my asp.net mvc 2.0 project?
Thanks.
You could use the
Application_Errorevent in yourGlobal.asax: