I get the following error when trying to view my website.
Cannot open database requested by the login. The login failed. Login failed for user 'NT AUTHORITY\SYSTEM'.
I have tried just about everything I can think of, including suggestions from similar questions on SO. I can't find anything wrong with my connection string, and it was working earlier. I had to delete the database to start fresh, and as far as I can gather that caused the problem -- but I thought the DB is created automatically? It was the first time I ran the website.
At one point I had fixed this, but I don't remember what I did...
The user in question has sysadmin rights.
Stack trace: https://paste.ee/p/cJfj9
Connection string: "Data Source=.\SQLEXPRESS;AttachDbFilename=|DataDirectory|\aspnet-EDB-20170516.mdf;Initial Catalog=aspnet-EDB-20170516;Integrated Security=True;User Instance=True"
Edit: The suggested duplicate appears to differ from my question in a significant way. They are talking about remoting in, I have IIS and SQL Server running on the same machine I am attempting to access from.