Got it, Thank you! It is in Web.Core.Controllers in my template.
First of all, I need to change the AppBinaryObjects.Id from type of GUID to Int, in order to easy manipulate. As my test, if I assign AbpTenants.LogoId directly in database by:
update AbpTenants t set t.LogoId=(select top 1 Id from AppBinaryObjects b where b.TenantId=t.Id)
The Logo shows an error (a small square no image). I think it is a little tricky to assign an GUID to LogoId. I just wonder if there is any particular reason to use GUID as AppBinaryObjects.Id?
Thanks,
I found it. It is stored in database table AppBinaryObjects, and linked to AbpTenants.LogoId.
In my application, I need to use multiple Logos within same tenant on different pages or under different conditions. I think I need to upload multiple Logo files onto AppBinaryObjects and dynamically change the value of AbpTenants.LogoId. I guess I have to modify the code to implement. Can you tell me which code files should be modified?
Thanks,
Never mind. I will figure out by myself later. It is still acceptable if can't be modified.
Our web-server and sql-server are physically on different machines. On my issue, the database was reached but denied access due to its security settings.
Sorry for my long questions! :oops: It solved now, and this topic can be closed.
Thanks again for your support! :D
I dug out the error from logs and solved this issue. It is about the remote database security settings.
When I run the .Host on my localhost and connect the remote database, it is no problem, because I am a domain user which is accepted by the database. When I deploy the .Host on to our web server and first run it, it tries to connect the remote database with a username as "domain\machine$", which is not recognized by the database, and then the connection is denied :!: . As a test, I simply added the "domain\machine$" as a database user. It works now. :D
On our other web applications, at the user sends the first request with a blank credential, the server simply responses an index page with login form on it, and does not bother database connection. This way ensures the database is always connected with the current user's credential. In case of the database is busy or crash, the server at least can response something (e.g. a public page). Is it possible and easy to modify your code to work this way? :?: It is not a big deal for now, but it keeps the code portable without "domain\machine$", I think.
Thanks again for your prompt support!
I sent it from [email protected]. The "ecag..." is for payment. He is not for development. Can you change it from your record?
Thanks,
I've sent an email to you. Thanks again!
Although I published all projects, I only copied the publish files on *.Host to my web site root folder. I double checked the appsettings.json as you pointed out. It is correct, I think. But the same error still pops up. :(
Let's say my production host server is named "WebServer", database server is "SqlServer", the Core part url is "http://Core.myDomain.com", and the Client part url is "http://UI.myDomain.com". The values are: "ConnectionStrings": { "Default": "Server=SqlServer; Database=ProductionDb; Trusted_Connection=True;" }, "Abp": { "RedisCache": { "ConnectionString": "WebServer", "DatabaseId": -1 } }, "App": { "WebSiteRootAddress": "http://Core.myDomain.com/", "CorsOrigins": "http://UI.myDomain.com" },
I have tried removing the "Abp" settings, but still no luck.
I searched the whole solution, and found there are still some "localhost" in other code files, such as Startup.cs, LaunchSetting.json, WebCoreModule.cs, and WebUrlService.cs. I didn't touch these files. Do I need to change the "localhose" in these files? :?:
Thanks,
I tried again to publish Core part. This time, I used VS2017 Publish to Local Folders. Here are the steps I did:
BTW, our IIS was installed on server by following Microsoft's instruction, and it works fine for our other ASP.NET Core applications.
Please advise what I missed on publishing the Core part.
Never mind my second try above. I should copy all files under the folder dist, instead of coping the folder. I corrected it, and it seems working now. It still shows error, but that is because I have not published the "core" part. I still need some help to publish the "core" part.
Thanks,
Thank you for your explanation. I will keep both files, and may test again later. Now, I am trying to deploy it onto production server, but got some bumpers:
As first try, I followed all steps on the instruction on /Documents/Merge-Angular-Client-Server, and publish the *.Web.Host in VS2017 by "Web Deploy". It failed with two errors:
This error popped up during the publishing: The project system has encountered an error. Value cannot be null. Parameter name: key
This error showed after publishing stopped: Could not locate \aspnet-core\src*.Web.Core\packages.config. Ensure that this project has Microsoft.Bcl.Build installed and packages.config is located next to the project file.
I double checked *.Web.Core. There is no such config files.
As second try, I followed instruction on section "Deployment" on /Documents/Development-Guide-Angular: change assets/appconfig.json file, build by "ng build -prod", and copy the whole dist folder and web.config file onto the root of my web site on server. When I open the url, I got "500 - Internal server error."
What did I miss? Can you advise me a step-by-step instruction about deployment? I am using IIS on Windows Server 2012 R2.
Thanks,