Question

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.

Was it helpful?

Solution

Alright I finally fixed it. I will write the solution incase anyone else is facing this problem or will in the future:

  1. Try to add a aspnetdb.mdf from the internet and see if you face Error 26 of bad connection.
  2. Uninstall the installed instance of Microsoft SQL Server in Control Panel -> Uninstall.
  3. Download the installation from (http://www.microsoft.com/en-us/download/details.aspx?id=29062) and choose the version fitting your OS. (Mine is x64)
  4. Install a server instance. Mine was SQLExpress previously.
  5. Now enter the Administration tool and everything is like it was before.

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..

OTHER TIPS

The aspnetdb is for roles. If you want, like me, to have everything on the database server, learn about roleproviders (like membershipproviders) it just helped me get everything fixed.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top