hello,
I am using membership class for my user management, and it created a database called ASPNETDB.MDF.. I decided to use the same database to handle my other data, and so I added some of my own tables in there...
When I try to access it:
<connectionStrings>
<add name="connString" connectionString="Initial Catalog=MyProject;Data Source=.\SQLEXPRESS;AttachDbFilename=C:\Users\MyName\Documents\Visual Studio 2008\Projects\Project\MyProject\App_Data\ASPNETDB.MDF;Integrated Security=True;User Instance=True" providerName="System.Data.SqlClient" />
</connectionStrings>
Using this:
Dim conn As SqlConnection = New SqlConnection(ConfigurationManager.ConnectionStrings("connString").ToString)
It gives me this error after I log in through Membership class:
Cannot open database "MyProject" requested by the login. The login failed.
Login failed for user 'My-PC\Myuser'.
I am not sure what's going on?
Edit: If i don't use Membership class, I can use the database fine.. but when after I login using the membership class, it stops to work..