Saturday, February 25, 2012

Problem creating ASPNETDB under SQL Server 2005

Hi All... We're cloning an application currently under development on Server 2003 / SQL Server 2005 / dotnet 2.0. The clone's going to live on an XPSP2 box with SQL Server 2003 - it's for demo purposes... The application's able to get to our own database, but it's having a hard time creating the ASPNETDB that dot net likes to have.

Aside from the OS, the only difference between the two SQL Servers is that on the working system, we're using windows authentication on the database while on the non-working system, we're using SQL Server authentication. But we've tuned the connection strings appropriately - again, we can get to our own db just fine.

We have the following lines in our web.config:

<connectionstrings>
<clear />
<add name="LocalSqlServer" connectionstring="Server=localhost; Database=ASPNETDB; UID=sa; PWD=mypassword" />
</connectionstring>

On the working system, the Server is an actual IP address, integrated security is set to true, and of course the uid/pwd is a bit different. But again, using a very similar connection string, we able to get to OUR database on the non-working system...

The error we're getting at runtime is:

Cannot open database "ASPNETDB" requested by the login. The login failed. Login failed for user 'sa'.

When we poke into the database from SQL Server Management Studio - on a remote machine - we can see our own database is there, but the ASPNETDB isnt there. Yet... I suspect it failing getting in to just create the db...

Any thoughts? Thanks for the help!!! -- Curt

Did you Attach the aspnet db to the server?

|||

Thanks for the reply, Lock. Good question - and the answer is no. I did that and it worked. I guess somehow I thought ASPNET would create the database if it wasnt there - after all, I swear when using 2005 Express, if I delete the mdf, it magically comes back. Perhaps not... Back on my bike though - many thanks. -- Curt

No comments:

Post a Comment