aspnet-core-social-network icon indicating copy to clipboard operation
aspnet-core-social-network copied to clipboard

Dtabase connection error when running program

Open NickNck opened this issue 5 years ago • 0 comments

Hi, I seem to be getting an error:

**"System.InvalidOperationException: 'An exception has been raised that is likely due to a transient failure. If you are connecting to a SQL Azure database consider using SqlAzureExecutionStrategy.'

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: TCP Provider, error: 0 - A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond.)

Win32Exception: A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond"**

This error happens when i run the Green.web project using IIS Express at the code "var tasks = query.ToList();" on line 88 in the ScheduleTaskService.cs file.

I am sort of new to this and i would like to know how to solve this solution. I have also followed the instructions such as restoring the nuget packages and running the program but i still get the error. Is there any additional steps needed such as database configuration? Because i am very new to this.

Thanks

NickNck avatar May 24 '19 08:05 NickNck