I know this is a very old post, but I had basically the same question: "Why is ASPNETDB.mdf created?" Since my site used a SQL database, ASPNETDB.mdf was not previously present. But then suddenly it appeared, and my whole site crashed at the placement. It was a little insidious, because everything worked perfectly in the development environment.
In my case, I wanted to get a list of user roles, and I added <roleManager enabled = "true" / "> to web.config. At that time I wasn’t connecting to create ASPNETDB.mdf. This function is SO post Role management function is not has been included has a good discussion on this topic.
But the fact is that when I turned on the role manager, the MVC infrastructure automatically created ASPNETDB.mdf, causing problems in the placement. I found another way to get roles without activating the default role manager, and my immediate problem was resolved.
I just wanted to add this post in case someone else was surprised by the sudden appearance of ASPNETDB.mdf. This is another way to show what the op question is about.
source share