I have a database hosted on somee.com and I use it for my Membership, Roles and other information tables.
However, by now I only experienced minor troubles with ASPNETDB.mdf that is automatically generated by the ASP.NET Web Administration tool, so I deleted it sometimes and let the tool re-create it, so that some Roles problems will be fixed on the website.
Yesterday I didn't manage to delete it because Windows kept saying it's in use by some other application, so I simply opened the task manager and closed all SQL related tasks. Then, I managed to delete the aspnetdb file, but the tool did not re-create it!
Today I tried again and still, aspnetdb.mdf is not being generated, and also there are no SQL related tasks on task manager :(
If I can just have roles and EVERYTHING without aspnetdb.mdf, just on the somee.com database, I'll be thankful for a solution. Here are some web.config details:
<connectionStrings>
<add name="MembershipProviderDB" connectionString="workstation id=medinadb.mssql.example.com;packet size=4096;user id=user;pwd=password;data source=medinadb.mssql.example.com;persist security info=False;initial catalog=medinadb" providerName="System.Data.SqlClient"/>
</connectionStrings>
<membership defaultProvider="SqlProvider" userIsOnlineTimeWindow="15">
<providers>
<clear/>
<add name="SqlProvider" type="System.Web.Security.SqlMembershipProvider" connectionStringName="MembershipProviderDB" applicationName="AmedinaKom" enablePasswordRetrieval="false" enablePasswordReset="true" requiresUniqueEmail="true" passwordFormat="Hashed" minRequiredPasswordLength="5" minRequiredNonalphanumericCharacters="0"/>
</providers>
</membership>
I'm using the MembershipProviderDB for all usages, though APP_DATA/aspnetdb.mdf is still somewhat required :Z.
By the way, it seems like aspnetdb.mdf is only used for the roles. Unsure about that.
Alright I finally fixed it. I will write the solution incase anyone else is facing this problem or will in the future:
The reason for this was closing the server through task manager. Not sure which one of the tasks was the one responsible for this, but, however - the best way is to re-install the server instance on the local machine.
I'm still looking for a way to have everything on the hosted database but I don't really care as this could be in the website's host..