0

Please or Register to create posts and topics.

Datamigration

Hi, just need advise how to setup database in my server.  I try using update-database Initial, and it gives the following message

PM> enable-migrations
Enable-Migrations is obsolete. Use Add-Migration to start using Migrations.
PM> update-database Initial
IdentityServer4.Startup[0]
You are using the in-memory version of the persisted grant store. This will store consent decisions, authorization codes, refresh and reference tokens in memory only. If you are using any of those features in production, you want to switch to a different store implementation.
dbug: IdentityServer4.Startup[0]
Using Identity.Application as default scheme for authentication
dbug: IdentityServer4.Startup[0]
Using Identity.External as default scheme for sign-in
dbug: IdentityServer4.Startup[0]
Using Identity.External as default scheme for sign-out
dbug: IdentityServer4.Startup[0]
Using Identity.Application as default scheme for challenge
dbug: IdentityServer4.Startup[0]
Using Identity.Application as default scheme for forbid
No migrations were applied. The database is already up to date.
Done.
PM> add-migration Initial

Hello,

You don't need to manually do this. Migration is automatically applied at application startup.
This is handled in the file: DatabaseInitializer.cs , from this line: await _context.Database.MigrateAsync().ConfigureAwait(false);

To change the database server to your preferred server (otherwise it uses MSSQLLocalDB for development and local for production) you specify it in the connection string.

The connection string in the file appsettings.Development.json is used during development and appsettings.json is used during production.

I understand that the migration.  I also changed the connection string in the appsetting.json.

I got this message.  This must be something to do with the Identityserver4.

"You are using the in-memory version of the persisted grant store. This will store consent decisions, authorization codes, refresh and reference tokens in memory only. If you are using any of those features in production, you want to switch to a different store implementation."

 

 

After download the system, I run the system.  It is ruuning now.  But it is pending at the very first page.
The screen display App is loading.......

Then pending there.  Pls advise .

 

 

See this thread on how to debug client side errors. https://www.staging8.ebenmonney.com/forum/?view=thread&id=20&part=1#postid-50

Hi, sorry for disturb again.  The system now is running.  However I could not find the database in my server.  My connectionstring is as below

"ConnectionStrings": {
"DefaultConnection": "Server=WINPOINTS;Initial Catalog=quickapp;UID=sa;PWD=Intrend12345!;Integrated Security=false;connection timeout=300"

},

I can create new user.

Quote from Eben Monney on March 1, 2018, 8:50 am

 

The connection string in the file appsettings.Development.json is used during development and appsettings.json is used during production.

If you can't find the database "quickapp" in the server "WINPOINTS" (According to your connection string) then you probably have your connection string in the wrong configuration file.

Note:

  • appsettings.Development.json: This configuration file is used during development. Configurations you put here won't take effect once you deploy your application into production
  • appsettings.json: This configuration file is used when your application is deployed and will not affect your development work. You probably have your new connection string in this file that is why it is not taking effect. The connection string from  appsettings.Development.json is what is being used during development assuming you're running the application from Visual Studio

See this topic for more discussions on connection string and how you might connect to the development-time database: https://www.staging8.ebenmonney.com/forum/?view=thread&id=36&part=1#postid-98