I am developing an asp.net website which uses a System.Data.SQLClient connection to transfer data between the database and the web application. At first glance everything seems to be working properly as all data is displayed as it should be,and all functions do the work they're meant to do. However,at random time intervals - about 24 hours,usually - ,a freak error occurs: The responses given to the application from the database seem to be abnormal,like giving a "User not found" message to all users of the app when they try to login (they work properly before the "hang"!) or a "table not found" error message for a table that is there and was working fine 5 minutes earlier.
In order to get the application working,I must refresh the website,either via IIS - I guess this refreshes the AppPool - or reupload the application's .dll files to the server,without changing anything.
Any idea on what is causing the issue? I have never experienced it before and it's been frustrating me for quite some time now.
I use VB.Net/WebForms and .net framework 4.5.2
What I have tried:
- Changing the session timeout values
- Changing my "SELECT..." queries to not include "*"
- Contacting my hosting provider - they were unable to help -
- Checking if the connection exists and/or hangs - it exists/doesn't hang -