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

Activities of "smry"

I can go into a tenant settings, select an image, but when I click Upload Image nothing happens

It fails in PROD so I tried to debug locally and it was failing From what I can tell, it never makes it into the TenantCustomizationController or UploadLogo() method

The log for both the local and PROD instance are almost identical Here is the API Log:

    INFO  ,557 [48   ] Microsoft.AspNetCore.Hosting.Diagnostics - Request starting HTTP/1.1 GET http://localhost:22742/api/services/app/TenantDashboard/GetSalesSummary?SalesSummaryDatePeriod=1  
    INFO  ,558 [48   ] pNetCore.Cors.Infrastructure.CorsService - CORS policy execution successful.
    INFO  ,579 [48   ] uthentication.JwtBearer.JwtBearerHandler - Successfully validated the token.
    INFO  ,580 [48   ] ft.AspNetCore.Routing.EndpointMiddleware - Executing endpoint 'myCompany.Tenants.Dashboard.TenantDashboardAppService.GetSalesSummary (myCompany.Application)'
    INFO  ,584 [48   ] c.Infrastructure.ControllerActionInvoker - Route matched with {area = "app", action = "GetSalesSummary", controller = "TenantDashboard"}. Executing controller action with signature myCompany.Tenants.Dashboard.Dto.GetSalesSummaryOutput GetSalesSummary(myCompany.Tenants.Dashboard.Dto.GetSalesSummaryInput) on controller myCompany.Tenants.Dashboard.TenantDashboardAppService (myCompany.Application).
    INFO  ,590 [48   ] .Mvc.Infrastructure.ObjectResultExecutor - Executing ObjectResult, writing value of type 'Abp.Web.Models.AjaxResponse'.
    INFO  ,591 [48   ] c.Infrastructure.ControllerActionInvoker - Executed action myCompany.Tenants.Dashboard.TenantDashboardAppService.GetSalesSummary (myCompany.Application) in 6.8716ms
    INFO  ,591 [48   ] ft.AspNetCore.Routing.EndpointMiddleware - Executed endpoint 'myCompany.Tenants.Dashboard.TenantDashboardAppService.GetSalesSummary (myCompany.Application)'
    INFO  ,591 [48   ] Microsoft.AspNetCore.Hosting.Diagnostics - Request finished in 33.908300000000004ms 200 application/json; charset=utf-8
    DEBUG 55,500 [57   ] HttpRequestEntityChangeSetReasonProvider - Unable to get URL from HttpRequest, fallback to null
    DEBUG :00,521 [40   ] HttpRequestEntityChangeSetReasonProvider - Unable to get URL from HttpRequest, fallback to null
    DEBUG :05,540 [57   ] HttpRequestEntityChangeSetReasonProvider - Unable to get URL from HttpRequest, fallback to null
    DEBUG :10,558 [61   ] HttpRequestEntityChangeSetReasonProvider - Unable to get URL from HttpRequest, fallback to null
    INFO  :14,396 [51   ] Microsoft.AspNetCore.Hosting.Diagnostics - Request starting HTTP/1.1 OPTIONS http://localhost:22742/api/services/app/TenantSettings/GetAllSettings  
    INFO  :14,396 [51   ] pNetCore.Cors.Infrastructure.CorsService - CORS policy execution successful.
    INFO  :14,397 [51   ] Microsoft.AspNetCore.Hosting.Diagnostics - Request finished in 0.9847ms 204 
    INFO  :14,414 [59   ] Microsoft.AspNetCore.Hosting.Diagnostics - Request starting HTTP/1.1 GET http://localhost:22742/api/services/app/TenantSettings/GetAllSettings  
    INFO  :14,414 [59   ] pNetCore.Cors.Infrastructure.CorsService - CORS policy execution successful.
    INFO  :14,429 [59   ] uthentication.JwtBearer.JwtBearerHandler - Successfully validated the token.
    INFO  :14,429 [59   ] ft.AspNetCore.Routing.EndpointMiddleware - Executing endpoint 'myCompany.Configuration.Tenants.TenantSettingsAppService.GetAllSettings (myCompany.Application)'
    INFO  :14,432 [59   ] c.Infrastructure.ControllerActionInvoker - Route matched with {area = "app", action = "GetAllSettings", controller = "TenantSettings"}. Executing controller action with signature System.Threading.Tasks.Task`1[myCompany.Configuration.Tenants.Dto.TenantSettingsEditDto] GetAllSettings() on controller myCompany.Configuration.Tenants.TenantSettingsAppService (myCompany.Application).
    INFO  :14,445 [62   ] .Mvc.Infrastructure.ObjectResultExecutor - Executing ObjectResult, writing value of type 'Abp.Web.Models.AjaxResponse'.
    INFO  :14,446 [62   ] c.Infrastructure.ControllerActionInvoker - Executed action myCompany.Configuration.Tenants.TenantSettingsAppService.GetAllSettings (myCompany.Application) in 13.996300000000002ms
    INFO  :14,446 [62   ] ft.AspNetCore.Routing.EndpointMiddleware - Executed endpoint 'myCompany.Configuration.Tenants.TenantSettingsAppService.GetAllSettings (myCompany.Application)'
    INFO  :14,446 [62   ] Microsoft.AspNetCore.Hosting.Diagnostics - Request finished in 32.5244ms 200 application/json; charset=utf-8
    DEBUG :15,573 [59   ] HttpRequestEntityChangeSetReasonProvider - Unable to get URL from HttpRequest, fallback to null
    DEBUG :20,587 [59   ] HttpRequestEntityChangeSetReasonProvider - Unable to get URL from HttpRequest, fallback to null
    DEBUG :25,599 [62   ] HttpRequestEntityChangeSetReasonProvider - Unable to get URL from HttpRequest, fallback to null
    DEBUG :30,617 [62   ] HttpRequestEntityChangeSetReasonProvider - Unable to get URL from HttpRequest, fallback to null
    DEBUG :35,634 [57   ] HttpRequestEntityChangeSetReasonProvider - Unable to get URL from HttpRequest, fallback to null
    INFO  :38,748 [59   ] Microsoft.AspNetCore.Hosting.Diagnostics - Request starting HTTP/1.1 OPTIONS http://localhost:22742/TenantCustomization/UploadLogo  
    INFO  :38,749 [59   ] pNetCore.Cors.Infrastructure.CorsService - CORS policy execution successful.
    INFO  :38,750 [59   ] Microsoft.AspNetCore.Hosting.Diagnostics - Request finished in 1.9428ms 204 
    INFO  :38,763 [59   ] Microsoft.AspNetCore.Hosting.Diagnostics - Request starting HTTP/1.1 POST http://localhost:22742/TenantCustomization/UploadLogo multipart/form-data; boundary=----WebKitFormBoundary{...} 5008
    INFO  :38,763 [59   ] pNetCore.Cors.Infrastructure.CorsService - CORS policy execution successful.
    INFO  :38,763 [59   ] uthorization.DefaultAuthorizationService - Authorization failed.
    INFO  :38,764 [59   ] tion.Cookies.CookieAuthenticationHandler - AuthenticationScheme: Identity.Application was challenged.
    INFO  :38,764 [59   ] Microsoft.AspNetCore.Hosting.Diagnostics - Request finished in 1.8272000000000002ms 302 
    INFO  :38,769 [51   ] Microsoft.AspNetCore.Hosting.Diagnostics - Request starting HTTP/1.1 OPTIONS http://localhost:22742/Account/Login?ReturnUrl=%2FTenantCustomization%2FUploadLogo  
    INFO  :38,769 [51   ] pNetCore.Cors.Infrastructure.CorsService - CORS policy execution successful.
    INFO  :38,770 [51   ] Microsoft.AspNetCore.Hosting.Diagnostics - Request finished in 1.2115ms 204 
    INFO  :38,775 [51   ] Microsoft.AspNetCore.Hosting.Diagnostics - Request starting HTTP/1.1 GET http://localhost:22742/Account/Login?ReturnUrl=%2FTenantCustomization%2FUploadLogo multipart/form-data; boundary=----WebKitFormBoundary{...} 
    INFO  :38,776 [51   ] pNetCore.Cors.Infrastructure.CorsService - CORS policy execution successful.
    INFO  :38,798 [51   ] uthentication.JwtBearer.JwtBearerHandler - Successfully validated the token.
    INFO  :38,799 [51   ] Microsoft.AspNetCore.Hosting.Diagnostics - Request finished in 23.8194ms 404 
    DEBUG :40,640 [40   ] HttpRequestEntityChangeSetReasonProvider - Unable to get URL from HttpRequest, fallback to null
    DEBUG :45,645 [51   ] HttpRequestEntityChangeSetReasonProvider - Unable to get URL from HttpRequest, fallback to null
    DEBUG :50,659 [40   ] HttpRequestEntityChangeSetReasonProvider - Unable to get URL from HttpRequest, fallback to null
    

The Network shows the following:

Request URL: http://localhost:22742/TenantCustomization/UploadLogo
Request Method: POST
Status Code: 302 Found

Request URL: http://localhost:22742/Account/Login?ReturnUrl=%2FTenantCustomization%2FUploadLogo
Request Method: GET
Status Code: 404 Not Found

There is documentation that talks about tenancy and how to implement in general but I am not sure what a client solution looks like

  • When tenant goes to tenant.mysite.com, is it supposed to show the "Current tenant: Not selected (Change)" development option?
  • How does the Application know what tenants are available and which subdomains are 'invalid' - also, where would I set up a route when a user tries to hit an invalid subdomain
  • Do all tenants get sent to a single hosted AngularUI solution?
  • When using a solution like a VM with IIS: Is it supposed to be a single directory for the AngularUI, a single DIR for API, and then Multiple SQL Database Connection strings per tenant?
  • How exactly is the model expected to work with Multi-tenant in IIS?
  • Do I have to add a site on IIS per tenant?

I have not come across documentation saying to updating those files but I'm running into other issues and I wanted to ask if launchsettings.json files should be updated prior to build - or does routing and variable updating happen off of the appsettings.Production.json

I can access tenant.mysite.com but entire login section is now missing and Logs nor client side networking show seemingly relavent error or any errors that would shed light on why login section gone

I am hosting my site through an Azure VM I have a domain that I would like to host my multi-tenant application through

If I go to myCompany.cloudapp.net it shows a working host site

On my domain, I updated the CNAME to myCompany.cloudapp.net so now mySite.com shows the application

*at this point, everything seems to be working exactly as expected

I tried following https://docs.aspnetzero.com/en/aspnet-core-angular/latest/Overview-Angular#multi-tenancy

I think I'm getting lost here:

To do that;

1. You should configure DNS to redirect all subdomains to a static IP address. To declare 'all subdomains', you can use a wildcard e.g. *.mydomain.com.
2. You should configure IIS to bind this static IP to your application.

If I setup a *. redirect on the domain then I get:

Request URL: http://tenant.mySite.com/
Request Method: GET
Status Code: 302 Found

which then immediately opens

Request URL: http://www.mySite.com/
Request Method: GET
Status Code: 200 OK

The host site opens up and i've lost my tenant name from the URL

Can you please elaborate on "configure IIS to bind this static IP to your application" or anything else I might be missing

I can go into IIS on the VM and add a second AngularUI folder setup and an IIS-site for http://tenant.mySite.com which makes it such the domain URL wildcard redirect isnt levereaged but it still drops the tenant name in the URL

I have the downloaded application largely unmodified but known working on local instance Followed https://docs.aspnetzero.com/en/aspnet-core-angular/latest/Deployment-Angular-Publish-Azure for a split application and having errors

Error in console:

Default levels
GET https://azure-publish-demo-server.azurewebsites.net/AbpUserConfiguration/GetAll?d=1576866925084 500 (Internal Server Error)
abp.js:342 WARN: 
abp.js:342 Could not find localization source: AbpWeb

Error in App/Log/:

WARN  2019-12-20 16:48:12,915 [8    ] Abp.BackgroundJobs.BackgroundJobManager  - Microsoft.Data.SqlClient.SqlException (0x80131904): A network-related or instance-specific error occurred while establishing a connection to SQL Server. The server was not found or was not accessible. Verify that the instance name is correct and that SQL Server is configured to allow remote connections. (provider: Named Pipes Provider, error: 40 - Could not open a connection to SQL Server)
---> System.ComponentModel.Win32Exception (2): The system cannot find the file specified.
…

Top portion of appconfig.production.json:

{
  "remoteServiceBaseUrl": "https://azure-publish-demo-server.azurewebsites.net",
  "appBaseUrl": "https://azure-publish-demo-client.azurewebsites.net",
  "localeMappings": {
    "angular": [
      {…

appsettings.Production.json:

{
  "ConnectionStrings": {
    "Default": "Server=tcp:azure-publish-demo.database.windows.net;Database=AzurePublishDemoDb;User ID=admin;Password=mypassword;"
  },
  "App": {
    "ServerRootAddress": "https://azure-publish-demo-server.azurewebsites.net",
    "ClientRootAddress": "https://azure-publish-demo-client.azurewebsites.net",
    "CorsOrigins": "https://azure-publish-demo-client.azurewebsites.net"
  }
}

Originally having issues where the console was saying CORs errors so I went on both client and server Azure resources and set Enable Access-Control-Allow-Credentials to enabled

Where do I update the connection string for Power Tools to a different database(s)? It seems as if the only way to use Power Tools in a multitenant setup is to create Entity on Host Db then copy schema to each Tenant DB.

Is there anything in the tool that allows a single new Entity deployment to go to multiple databases?

I noticed the collection of methods that worked to retrieve the contents of the localization files and a method to update the contents of the localization files but was unable to see how the Update code was able to be used.

I have two questions:

  1. Is there documentation that is an example resource of how to update the localization files - either on the running application or in the source code
  2. Is there any additional software that would work as a tool for entry maintenance for all the available localization files - or is that level of IO done either by hand or a tool we would have to build inhouse?
Showing 11 to 18 of 18 entries