Before publish to IIS, I tried to migrate the database on our producftion SQL server. To keep things simple, I temporarily connect my local machine to the SQL server, and changed the "Default" connectionString on appsettings.json to point our SQL server. And then, I run command "dotnet ef database update" in my local machine under *.EntityFramework folder.
I found there are 2 appsettings.json files which contains ConnectionString setting. One is under *.Migrator folder, and another is under *.Web.Host folder.
At the first try, I only changed ConnectionString in *.Migrator\appsettings.json, and run the command. It runs without error, but the database was not created on server.
At the second try, I changed ConnectionString in *.Web.Host\appsettings.json, and run the command. It runs, and the database was successfully created on server.
So, may question is why we store duplicated ConnectionString in different projects/folders? :?: The *.Migrator\appsettings.json does not contain other configuration info, except the ConnectionString. Since that it does not affect migration, shall I just delete this file? :?:
Thanks,
Thank you! :D Shall I wait until the v3.4 release? Or, just modify the code files like you did?
I tried to move the ChangeLanguage(ChangeUserLanguageDto input) method from *.Application\Users\UserAppService.cs to *.Application\Users\Profile\ProfileAppService.cs, but got building errors.
It is not a big deal if you release v3.4 soon. I just wonder how to MERGE the v3.4 into my current v3.3, because I have modified some code somewhere.
Thanks,
Thank you! Now I can see the code file you mentioned. I want to make sure if my appsettings files correct.
My original *.Web.Host\asssettings.json has 5 items: ConnectionStrings, Abp, App, Authentication, Recaptcha. The first 3 items are: "ConnectionStrings": { "Default": "Server=(localdb)\mssqllocaldb; Database=MyProjectDb; Trusted_Connection=True;" }, "Abp": { "RedisCache": { "ConnectionString": "localhost", "DatabaseId": -1 } }, "App": { "WebSiteRootAddress": "http://localhost:4200/", "CorsOrigins": "http://localhost:4200" },
Let's say my production host server is named "WebServer", database server is "SqlServer", and url is "http://production.myDomain.com". I will make a *.Web.Host\asssettings.Production.json with these values as: "ConnectionStrings": { "Default": "Server=SqlServer; Database=ProductionDb; Trusted_Connection=True;" }, "Abp": { "RedisCache": { "ConnectionString": "WebServer", "DatabaseId": -1 } }, "App": { "WebSiteRootAddress": "http://production.myDomain.com/", "CorsOrigins": "http://production.myDomain.com" },
The value of Authentication and Recaptcha will keep same. Is that correct? :?: I am not confident especially for "Abp" setting.
As for migration, my production database can only be connected from production host server, so I cannot run migration command in my development machine. I am going to run it in the production host server as you suggested. However, in my development machine, I need to run the command in the folder of \aspnet-core\src*.EntityFramework. After I publish the whole projects to production host server, all code files are compressed as .dll, and no such folder exists. Can you advise me how to migrate in this scenario? :?:
Thanks again!
Got it. It is "fgaonet".
Thanks,
I use my email <a href="mailto:[email protected]">[email protected]</a> to sign up my github. Is this what you need?
Thanks,
The link does not work. I got 404 error while clicking on it. Can you correct it?
Thanks,
I am also a little confused on the first problem. How do I set Clock.Provider to UtcClockProvider in *.Host application? Do you mean to add a code: Clock.Provider = ClockProviders.Utc; in Startup.cs, Configure(), after app.UseAbp(); :?:
Thanks,
That's good! I will do some code work later to implement.
For now, I simply want to remove the tenancyName "Default" from Chat in Single Tenant mode. Can you advise which code file need to modify?
Thanks,
I attached screen shots here to describe the second problem - User cannot change language. (It seems that I can only attach 3 files or less, so I have to delete the attachment on the following 1. and 2)
So, how do I let all users change language on their own page no matter what permissions granted? :?:
Never mind. I am reading the development guide and got the answer about multi-tenancy. This topic can be closed now.
Thanks again for your support! :D