I've been trying to reinitialize the membership database, but something stops me.
I have tried deleting aspnetdb.mdf from the App_Data folder. This works fine, and then a new one is created when I use the asp.net adminstration tool. I can use the server explorer to view the table content (all null).
Although I can open the asp.net configuration page, the problem occurs when I select security. Then I get the error
There is a problem with your selected data store. This can be caused by an invalid server name or credentials, or by insufficient permission. It can also be caused by the role manager feature not being enabled. Click the button below to be redirected to a page where you can choose a new data store.
The following message may help in diagnosing the problem:Database 'C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\asp.netwebadminfiles\App_Data\ASPNETDB.MDF' already exists. Could not attach file 'C:\Documents and Settings\Jeff Leese\My Documents\world\my work\current\counsellor\App_Data\ASPNETDB.MDF' as database 'ASPNETDB_devjeffleese'.
All this seems to have happened after I modified my connection info in the web.config file:
<connectionStrings>
<removename="LocalSqlServer"/>
<addname="LocalSqlServer"connectionString="Data Source=.\SQLEXPRESS; AttachDbFilename=|DataDirectory|\ASPNETDB.MDF; user instance=true; Integrated Security=True; Initial Catalog=ASPNETDB_devjeffleese;"
providerName="System.Data.SqlClient" />
</connectionStrings>
So, two questions:
1) What are the sections about? They seem to have been inserted automatically at some point, and I wonder if its just formatting info or should I remove them?
2) How can I get security going again. How do I deal with the 'already exists' problem that prevents 'attaching' ?
Would greatly appreciate guidance in how to start over...
Hi,
I had a similar problem with the install of the ASPNET DB, and I'll try to recall how I got it running.
What I tried first was to hae the DB istalled automatically from the WS I have running VS 2005, which is networked to a server running SQL Server 2005 (Standard). I wanted the DB installed on that SQL Server instance, but ran into problem. Even pre-creating the DB ther didn't seem to help. I'm not saying it can't be done, but it wasn't worth the effort to me. I DL'ed and installed an instance of SQL Server Express on the WS that has VS, did the aspnet_regsql.exe, and things worked Ok. I figure I can transfer the DB to the full SQL Server when/if I need to, but where it is is fine for development work. (Side note: I installed the Full version client tools on the WS, so I'd have these, rather than the Expess manager - but getting the uninstall/install sequence right was a hassle).
I didn't see a mention of aspnet_regsql.exe in your post. If you havent used it, do a search on msdn.microsoft.com for how and why to use it. You should find it in your Windows\Microsoft.net\Framework\(the version you are running). You should find it there, in the same place as the reg for IIS (if you need that too).
Good luck, hop eit helps. BRN..
No comments:
Post a Comment