Base solution for your next web application
Starts in:
01 DAYS
01 HRS
01 MIN
01 SEC

Activities of "fguo"

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,

Answer

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)

  1. On admin page, I can select a language (e.g. German).See the attachment "Select Language".
  2. After the selection, the admin page will refresh and show German text. See the attachment "German".
  3. On User page, I tried to select a language (e.g. German). See the attachment "User Screen".
  4. After the selection, the user page pops up an error. See the attachment "Required Permission".
  5. The User role has no permissions granted by default. See attachment "Edit User Role".
  6. If I check off the "Users" on the "Edit User Role" page (above 5), the user can change language as admin does, but the user will have the right to see User page, which is not my expected.

So, how do I let all users change language on their own page no matter what permissions granted? :?:

Thanks,

Answer

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

Showing 161 to 170 of 178 entries