I am working on an ASP.NET 4.8 project that has been running for 15 years. It always used a standalone sql server (recently upgraded from MSSQL2008 to MSSQL2019). For some time now - strangely - the application reports a network-related or instance-specific error if you try to log in with a nonexistent username. To log in we employ Forms Authentication with a custom login screen (username/password), validating the credentials and setting the auth cookie data.
When the credentials check out, the user is being redirected to it's desired page. If credentials fail, the system used to wait a few seconds presenting the login screen again. But recently, instead, we get said error after 30 seconds or so.
The connection strings are all in order, they worked well all of the time. The stacktrace has only non-user-code and lists a call to System.Web.DataAccess.SqlConnectionHelper.CreateMdfFile(...). I think this relates to the system for some reason trying to create a localDb. Nothing in our code uses localDb, we never did.
I wonder how I can find out more about that problem. Where does localDb come from and how can I get rid of it?
Thank you all very much for any ideas or insight.
Update I'm still desparate to find out why the system tries to Create an MDF file.
Below is the error information.
URL: http://localhost:56900/Shared/Login.aspx?ReturnUrl=/Vertraege.aspx
Stacktrace:
bei System.Web.Management.SqlServices.GetSqlConnection(String server, String user, String password, Boolean trusted, String connectionString)
bei System.Web.Management.SqlServices.SetupApplicationServices(String server, String user, String password, Boolean trusted, String connectionString, String database, String dbFileName, SqlFeatures features, Boolean install)
bei System.Web.Management.SqlServices.Install(String database, String dbFileName, String connectionString)
bei System.Web.DataAccess.SqlConnectionHelper.**CreateMdfFile**(String fullFileName, String dataDir, String connectionString)
Error Message: Keine Verbindung mit der SQL Server-Datenbank. (no connection to sql server)
Connection String in web.config:configuration/connectionStrings:
<add name="connectionname" connectionString="Data Source=tcp:10.0.0.2,1433;Initial Catalog=catalog;User ID=username;Password=secret;application name=appname" providerName="System.Data.SqlClient" />