I was trying out making a website with asp.net to see how data binding works but when I launch the application, it throws this error.
Failed to generate a user instance of SQL Server due to failure in retrieving the user's local application data path. Please make sure the user has a local user profile on the computer. The connection will be closed.
I checked the internet and I found a lot of possible solutions but none of them worked for me.
I created a custom database in the App_Data folder of the project and the connection string is
Data Source=.\SQLEXPRESS;AttachDbFilename=|DataDirectory|\Database.mdf;Integrated Security=True;User Instance=True