1

In Visual Studio 2013 i have a web api solution with 2 project:

1)StrokeInModel(that is entity framework database first)

2)MyProject (Web Api 2 with Individual Accounts project with reference to StrokeInModel project to access to the database)

Now i have changed the connection string in the Web.config to connect to my existing database:

<add name="StrokeInEntities" connectionString ......... />

And in the "StrokeInModel.Context.cs" i have the following code:

public partial class StrokeInEntities : DbContext
{
    public StrokeInEntities()
        : base("name=StrokeInEntities")
    {
    }
    ...
}

Now, for example, when i call this url:

http://localhost:port/api/Account/Register

passing this parameter as POST:

{
 "UserName": "Alice",
 "Password": "password123",
 "ConfirmPassword": "password123"
}

seems that the registration is Ok. Anyway i can't see in the SQL Server Management the table where the user's username and password are stored in the existing database. If i recall the registration with the same parameters there's an error that the user is yet registered. Where is the user table in the existing database? (I don't have added any tables)

In the server explorer window i see the connection to my database with all my tables but don't see the user table!! So where is stored the user's signup information?

enter image description here

1
  • I have seen that the user is created under the LocalDB under DefaultConnection database!! How is it possible if i have changed the connection strings? Commented May 20, 2014 at 16:25

1 Answer 1

1

Because the IdentityDbContext use the default connection string named "DefaultConnection", so you will have to change it as well.

More from here

Why is Asp.Net Identity IdentityDbContext a Black-Box?

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.