Base solution for your next web application

Activities of "bolenton"

Hi, I am trying to delete an existing Default Tenant and recreate databases with another tenant name which will have dedicated database for it. That works fine,but my unit test cases are always pointing to Default tenant and now they are failing. What is the right way to create a new Tenant instead of Default one after Host creation.Also unit test cases should be pointing to that tenant. Any help will be appreciated.

I wanted to know why the Access token I generated from my website domain shows 'tenantId' field along with abp website url. Is it possible to remove that url from token?

I want to configure identity server 4 to implement personal access token.

I am planning to store the identity server's client information (clientID, clienSecret) into the database . So, from client's app user will going to enter the client credentials and in response api will return the access token. Client Id and Client Secrets information will be stored per tenant, so based on the tenant, we must get the client information and in response to it, the access token.

Is there any sample implementation as such to get the clients stored in the database ?

Thanks

Hi,

I am using wildcard sub-domain for my multi-tenant application. Can we set the tenantId (Abp session) globally for the requested url?

I found some discussion on the forum : #2310@6e258722-a095-43e8-accf-7aa230655e10

But, this is not working for me. :(

I want to detect the tenancy name from the subdomain, check it is existing or not. If it is existing, then set the abp tenantId globally so that I will not have to put the tenancy name explicitly .

Thanks.

Hi,

I want to hide some API's only on Swagger UI but these hidden should be called from client script(Javascript).

I want to hide all the inbuilt API's of Asp.Net zero and show only the API's written by me. These hidden API's should work whenever we call from the script.

I have tried some options like setting the attribute on the appservices/methods:

  1. [ApiExplorerSettings(IgnoreApi = true)]
  2. [RemoteService(IsMetadataEnabled = false)]

These works well for hiding them on Swagger but, they no more exists while calling such appservices from the javascript.

Thnaks.

Hi, I want to remove/prohibit some permissions for Superadmin(Host user) in the seed method. For host user, all permissions from AppAuthorizationProviderare granted. How can we prohibit some permissions for host user in seed method only?

This is how we grant permissions in seed method:

var permissions = PermissionFinder
                    .GetAllPermissions(new AppAuthorizationProvider(true))
                    .Where(p => p.MultiTenancySides.HasFlag(MultiTenancySides.Host))
                    .ToList();

                foreach (var permission in permissions)
                {

                    if((permission.Parent!=null && permission.Parent.Name != AppPermissions.Pages_Companies) 
                        ||
                        (permission.Name != AppPermissions.Pages_Companies))
                    {
                        _context.Permissions.Add(
                          new RolePermissionSetting
                          {
                              TenantId = null,
                              Name = permission.Name,
                              IsGranted = true,
                              RoleId = adminRoleForHost.Id
                          });
                    }                    
                }

Thanks.

I was finally able to successfully deploy my Angular app to Azure.

Now I am trying to set up the domains so that the domains wildcards will work. For example if user types in default.myapp.com, they should be on the default tenant. I have connected my domain (managed from google domains) to the azure app.

Currently when I try default.myapp.com I get this error.

What am I missing?

Question

When I do a ng build, my project builds fine. However when I do a ng build --prod I get the following error. Does anybody have any idea why this is?

ERROR in ./node_modules/rxjs/_esm5/observable/BoundNodeCallbackObservable.js
Module build failed: TypeError: Cannot read property 'type' of undefined
    at Object.getEffectiveTypeAnnotationNode (C:\Users\bolen\Desktop\Project Churnite\Churnite\angular\node_modules\typescript\lib\typescript.js:9341:18)
    at assignContextualParameterTypes (C:\Users\bolen\Desktop\Project Churnite\Churnite\angular\node_modules\typescript\lib\typescript.js:41652:25)
    at checkFunctionExpressionOrObjectLiteralMethod (C:\Users\bolen\Desktop\Project Churnite\Churnite\angular\node_modules\typescript\lib\typescript.js:41948:29)
    at checkExpressionWorker (C:\Users\bolen\Desktop\Project Churnite\Churnite\angular\node_modules\typescript\lib\typescript.js:42959:28)
    at checkExpression (C:\Users\bolen\Desktop\Project Churnite\Churnite\angular\node_modules\typescript\lib\typescript.js:42898:42)
    at checkExpressionCached (C:\Users\bolen\Desktop\Project Churnite\Churnite\angular\node_modules\typescript\lib\typescript.js:42779:38)
    at checkReturnStatement (C:\Users\bolen\Desktop\Project Churnite\Churnite\angular\node_modules\typescript\lib\typescript.js:45418:54)
    at checkSourceElement (C:\Users\bolen\Desktop\Project Churnite\Churnite\angular\node_modules\typescript\lib\typescript.js:46763:28)
    at Object.forEach (C:\Users\bolen\Desktop\Project Churnite\Churnite\angular\node_modules\typescript\lib\typescript.js:1506:30)
    at checkBlock (C:\Users\bolen\Desktop\Project Churnite\Churnite\angular\node_modules\typescript\lib\typescript.js:44563:16)
    at checkSourceElement (C:\Users\bolen\Desktop\Project Churnite\Churnite\angular\node_modules\typescript\lib\typescript.js:46742:28)
    at checkFunctionExpressionOrObjectLiteralMethodDeferred (C:\Users\bolen\Desktop\Project Churnite\Churnite\angular\node_modules\typescript\lib\typescript.js:41990:21)
    at checkDeferredNodes (C:\Users\bolen\Desktop\Project Churnite\Churnite\angular\node_modules\typescript\lib\typescript.js:46828:25)
    at checkSourceFileWorker (C:\Users\bolen\Desktop\Project Churnite\Churnite\angular\node_modules\typescript\lib\typescript.js:46863:17)
    at checkSourceFile (C:\Users\bolen\Desktop\Project Churnite\Churnite\angular\node_modules\typescript\lib\typescript.js:46842:13)
    at Object.forEach (C:\Users\bolen\Desktop\Project Churnite\Churnite\angular\node_modules\typescript\lib\typescript.js:1506:30)
    at getDiagnosticsWorker (C:\Users\bolen\Desktop\Project Churnite\Churnite\angular\node_modules\typescript\lib\typescript.js:46924:16)
    at getDiagnostics (C:\Users\bolen\Desktop\Project Churnite\Churnite\angular\node_modules\typescript\lib\typescript.js:46892:24)
    at Object.getEmitResolver (C:\Users\bolen\Desktop\Project Churnite\Churnite\angular\node_modules\typescript\lib\typescript.js:27162:13)
    at emitWorker (C:\Users\bolen\Desktop\Project Churnite\Churnite\angular\node_modules\typescript\lib\typescript.js:69722:69)
    at C:\Users\bolen\Desktop\Project Churnite\Churnite\angular\node_modules\typescript\lib\typescript.js:69687:66
    at runWithCancellationToken (C:\Users\bolen\Desktop\Project Churnite\Churnite\angular\node_modules\typescript\lib\typescript.js:69779:24)
 @ ./node_modules/rxjs/_esm5/observable/bindNodeCallback.js 2:0-76
 @ ./node_modules/rxjs/_esm5/add/observable/bindNodeCallback.js
 @ ./node_modules/rxjs/_esm5/Rx.js
 @ ./src/account/login/validate-two-factor-code.component.ts
 @ ./src/account/account.module.ngfactory.js
 @ ./src/$$_lazy_route_resource lazy
 @ ./node_modules/@angular/core/esm5/core.js
 @ ./src/main.ts
 @ multi ./src/main.ts
ERROR in ./node_modules/rxjs/_esm5/observable/BoundCallbackObservable.js
Module build failed: TypeError: Cannot read property 'type' of undefined
    at Object.getEffectiveTypeAnnotationNode (C:\Users\bolen\Desktop\Project Churnite\Churnite\angular\node_modules\typescript\lib\typescript.js:9341:18)
    at assignContextualParameterTypes (C:\Users\bolen\Desktop\Project Churnite\Churnite\angular\node_modules\typescript\lib\typescript.js:41652:25)
    at checkFunctionExpressionOrObjectLiteralMethod (C:\Users\bolen\Desktop\Project Churnite\Churnite\angular\node_modules\typescript\lib\typescript.js:41948:29)
    at checkExpressionWorker (C:\Users\bolen\Desktop\Project Churnite\Churnite\angular\node_modules\typescript\lib\typescript.js:42959:28)
    at checkExpression (C:\Users\bolen\Desktop\Project Churnite\Churnite\angular\node_modules\typescript\lib\typescript.js:42898:42)
    at checkExpressionCached (C:\Users\bolen\Desktop\Project Churnite\Churnite\angular\node_modules\typescript\lib\typescript.js:42779:38)
    at checkReturnStatement (C:\Users\bolen\Desktop\Project Churnite\Churnite\angular\node_modules\typescript\lib\typescript.js:45418:54)
    at checkSourceElement (C:\Users\bolen\Desktop\Project Churnite\Churnite\angular\node_modules\typescript\lib\typescript.js:46763:28)
    at Object.forEach (C:\Users\bolen\Desktop\Project Churnite\Churnite\angular\node_modules\typescript\lib\typescript.js:1506:30)
    at checkBlock (C:\Users\bolen\Desktop\Project Churnite\Churnite\angular\node_modules\typescript\lib\typescript.js:44563:16)
    at checkSourceElement (C:\Users\bolen\Desktop\Project Churnite\Churnite\angular\node_modules\typescript\lib\typescript.js:46742:28)
    at checkFunctionExpressionOrObjectLiteralMethodDeferred (C:\Users\bolen\Desktop\Project Churnite\Churnite\angular\node_modules\typescript\lib\typescript.js:41990:21)
    at checkDeferredNodes (C:\Users\bolen\Desktop\Project Churnite\Churnite\angular\node_modules\typescript\lib\typescript.js:46828:25)
    at checkSourceFileWorker (C:\Users\bolen\Desktop\Project Churnite\Churnite\angular\node_modules\typescript\lib\typescript.js:46863:17)
    at checkSourceFile (C:\Users\bolen\Desktop\Project Churnite\Churnite\angular\node_modules\typescript\lib\typescript.js:46842:13)
    at Object.forEach (C:\Users\bolen\Desktop\Project Churnite\Churnite\angular\node_modules\typescript\lib\typescript.js:1506:30)
    at getDiagnosticsWorker (C:\Users\bolen\Desktop\Project Churnite\Churnite\angular\node_modules\typescript\lib\typescript.js:46924:16)
    at getDiagnostics (C:\Users\bolen\Desktop\Project Churnite\Churnite\angular\node_modules\typescript\lib\typescript.js:46892:24)
    at Object.getEmitResolver (C:\Users\bolen\Desktop\Project Churnite\Churnite\angular\node_modules\typescript\lib\typescript.js:27162:13)
    at emitWorker (C:\Users\bolen\Desktop\Project Churnite\Churnite\angular\node_modules\typescript\lib\typescript.js:69722:69)
    at C:\Users\bolen\Desktop\Project Churnite\Churnite\angular\node_modules\typescript\lib\typescript.js:69687:66
    at runWithCancellationToken (C:\Users\bolen\Desktop\Project Churnite\Churnite\angular\node_modules\typescript\lib\typescript.js:69779:24)
 @ ./node_modules/rxjs/_esm5/observable/bindCallback.js 2:0-68
 @ ./node_modules/rxjs/_esm5/add/observable/bindCallback.js
 @ ./node_modules/rxjs/_esm5/Rx.js
 @ ./src/account/login/validate-two-factor-code.component.ts
 @ ./src/account/account.module.ngfactory.js
 @ ./src/$$_lazy_route_resource lazy
 @ ./node_modules/@angular/core/esm5/core.js
 @ ./src/main.ts
 @ multi ./src/main.ts
Question

Everytime I try to change tanent I get a 500. The code always seems to trow the exception on the below block, but I can't seem to figure out why.

Is any one running the Angular 2/4+ app deployed to a server? What service are you using that supports all the angular features fully. For example, routing works properly, mutitenant sundomain works etc...

Currently I am using Netlify, which works, but they had to do a special configuration for the sub domain wildcard to work and I have to pay like 40 a month to keep that working. Also I often have routing issues. For example when impersonate a user it adds the complete new url to my current url instead of replacing it.

I am hosting the api in Azure. Is anyone hosting on the Angular app on Azure, how is that experience?

Basically I am look for some hosting advice. Any tips helps.

Showing 1 to 10 of 15 entries