I have an asp.net web app running on IIS, and everything is fine, until I try to access the database I get this error:
I have read the 2 parts of the Using LocalDB with Full IIS: 1 Part | 2 Part
I followed the instructions and still get the error, is there a way to check that I have followed the steps correctly?
Is there anything else I can check for that may be causing this error?
Note: I tryed this with asp.net and asp.net core applications, the core one doesn't give any description at all so I am testing this with asp.net. The database that I am using is the one that visual studio provides. If you would like me to provide any further information ill be happy to, I have been stuck with this issue for a while now and can't seem to resolve it.
Turns it's not too complicated, but my inexperience with both IIS and Databases made it confusing. Hopefully this can help someone in the future. There might be some minor steps/tweaks I missed out but that's because the whole solution took a while to setup.
Other useful points:
AttachDbFilename=|DataDirectory|\your_database_name_here.mdf
located in the connectionString.publishOptions
.To further help you understand how the whole process works, thank you to gofr1 read here. Didn't solve the issue but worth a read.
Might include more stuff in here later if I remember I missed anything out.