0

I have downloaded the samples from the IdentityServer3 github repo and ran the MembershipReboot project, I changed the connection string to point to a real server but I still don't see how to get it create the database, I thought this used EF code first to do this. I just feel lost right now trying to understand how to use IdMgr and IdSvr.

OutOFTouch
  • 1,017
  • 3
  • 13
  • 30
  • Did you run the MembershipReboot sample project? Using the LocalDB which is bundled with VS2013 it works out of the box for me. – Yoad Snapir Jul 31 '15 at 13:08

1 Answers1

1

You were right, The IDS MembershipReboot project relies on MembershipReboot which in itself uses EF migration scripts to generate the database if it doesn't exist (or upgrade it if it's an old one).
But, note that you need the connection string to use a user with permissions to create the database and tables in it.

Also, as far as I can remember you need to actually hit the (IDS) server with a request to get things spin up and create the DB. Otherwise, IDS would not load anything from the IoC container and the DbContext would not get created. But this is something I cannot verify now.

The configuration database of IDS (scopes, clients, claims etc.) is stored in-memory in the MembershipReboot sample you are using. It could be stored in MSSQL using EF (or any other store if you care to implement it). You can see a working sample that uses EF and MSSQL in the EntityFramework sample project. I guess you can combine the two samples get what you are after.

Yoad Snapir
  • 528
  • 2
  • 10
  • Any idea what url to use to hit IdSvr on say localhost to get it to spin things up? – OutOFTouch Jul 30 '15 at 22:51
  • I also can't get any of the IdSvr Client samples to work, after 4 days of pouring over outdated sample code and blog posts and then looking at the current code repos I am ready to give up. – OutOFTouch Jul 30 '15 at 23:10
  • I just want to take one step at a time since there are 2 databases here one for configuration which is for IdSvr and one for Identity datastore(IdMgr), right now I just want to know how to create the database for IdSvr what url to call for IdSvr to create it's configuration database. – OutOFTouch Jul 31 '15 at 05:11
  • Would really want to help, but please give up more information about how you host IDS, In IIS? Self Hosted OWIN application? – Yoad Snapir Jul 31 '15 at 09:25
  • That seems to work for creating the IdMgr database, I still don't see a database for IdSvr configuration. In this http://stackoverflow.com/questions/22967380/how-to-combine-membershipreboot-and-thinktecture-identityserver @brockAllen says that there are two databases, I am not sure if that still applies to V3 or not. – OutOFTouch Jul 31 '15 at 15:53
  • Now i see what you are after. Edited my answer and hopefully that would lead you on the right path. – Yoad Snapir Jul 31 '15 at 19:02
  • Thanks this helps me, I will have to combine the two samples like you suggested. – OutOFTouch Jul 31 '15 at 23:44
  • Still trying to figure out what url to use to get the config database created. – OutOFTouch Aug 02 '15 at 20:54