Base solution for your next web application

Activities of "henryand"

Question

We are using the merged v10.1 Angular - Core/dotNet 5 in a multi-tenant configuration.

On the Tenant Settings Appearance tab, there is an option to upload a custom css to allow branding the site. As such, it seems that the custom css should take precedence over the stock theme css bundle. It doesn't actually appear to work that way. I created a one line css to override the header color as a test. it had no effect. when I inspected the element, i saw that the custom background-color was ignored because it used the bundle's attributes. I added !important and it worked. But this is totally backward. If i am uploading customization, i shouldn't have to mark every single line in the custom css as !important. if it weren't important, i wouldn't have uploaded it.

Will adding "Abp.TenantID=2" in the querystring automatically update the AbpSession.TenantId? Are there any code changes I will need to make in order to use that querystring value?

I know this will tell the TokenAuthController what the tenantId should be, but AbpSession value is hardcoded into various functions used during the external authentication and authorization process. If it isn't in AbpSession,then it doesn't really help. One example: GetRoleByNameAsync(String roleName) does not have an override to allow me to pass in a tenantID - it is hardcoded to use AbpSession.TenantId. That may be by design, but I need this during external login for authorization validation so I need an override or I need the correct AbpSession.TenantID. Another example is SetRolesAsync(user, rolename) which only looks up the role for the AbpSession.TenantId. Another example during external login is GetTenancyNameOrNull() uses AbpSession.TenantId.

Thank you

We are using ANZ 10.1 Angular - Core/dotNet5

We added a button to the login screen for a tenant that uses an OpenIdConnect authentication server for SSO.

When the external server returns the tokens, they do not provide Abp.TenantId in their header. Since it is an external server, we don't have control. So, I need to get AbpSession to have their TenantId for the ExternalAuthenticate process in the TokenAuthController. Is there a recommended way to get that process to override the AbpSession.TenantId?

Thank you

we found and corrected our problem. we had code that failed "aot" during build optimization.

the npm-put error for "abp-zero-template" pointed us to our angular.json file that has that template. the production config for that template was configured with a different "aot" setting, which is why it only crashed on publish.

this issue is still open so I hope this answer helps if @Tachyon is still having issues.

We were able to track down the root cause this morning by turning off strict templates and fulltemplattypecheck in tsconfig. This allowed us to see some old code that was not strictly typed which did not meet the upgrade standards. we then deleted the offending code since we no longer used it anyway. we turned the compiler options back to true and we are published!

"angularCompilerOptions": { "fullTemplateTypeCheck": false, "strictTemplates": false,

hope this helps others if they get the same error.

thanks!

Has this issue been resolved? I am having the same problem.

This is my first attempt at publishing after doing a major upgrade of the ANZ platform. the code works fine (npm run start) but crashes when publishing (npm publish/npm run publish)

note: one difference is that in angular.json, in the "abp-zero-template" the "options" section has "aot": false, but in "production" section "aot":true. I was able to publish with "aot":false, and then having to also set "buildOptimizer":false, but that crashed our production server.

npm publish ... npm ERR! code E404 npm ERR! 404 Not Found - PUT https://registry.npmjs.org/abp-zero-template - Not found npm ERR! 404 npm ERR! 404 '[email protected]' is not in the npm registry. npm ERR! 404 You should bug the author to publish it (or use the name yourself!) npm ERR! 404 npm ERR! 404 Note that you can also install from a npm ERR! 404 tarball, folder, http url, or git url.

============================================================================= npm run publish ... Error: Error: Could not resolve [object Object] / undefined at Scope.resolve (D:\stepwell-anz\src\Stepwell.Web.Host\node_modules@angular\compiler-cli\src\ngtsc\typecheck\src\type_check_block.js:1318:23) at Scope.resolve (D:\stepwell-anz\src\Stepwell.Web.Host\node_modules@angular\compiler-cli\src\ngtsc\typecheck\src\type_check_block.js:1315:36) at TcbExpressionTranslator.resolveTarget (D:\stepwell-anz\src\Stepwell.Web.Host\node_modules@angular\compiler-cli\src\ngtsc\typecheck\src\type_check_block.js:1877:35) at TcbExpressionTranslator.resolve (D:\stepwell-anz\src\Stepwell.Web.Host\node_modules@angular\compiler-cli\src\ngtsc\typecheck\src\type_check_block.js:1786:29) at AstTranslator.maybeResolve (D:\stepwell-anz\src\Stepwell.Web.Host\node_modules@angular\compiler-cli\src\ngtsc\typecheck\src\type_check_block.js:1771:84) at AstTranslator.translate (D:\stepwell-anz\src\Stepwell.Web.Host\node_modules@angular\compiler-cli\src\ngtsc\typecheck\src\expression.js:74:33) at Object.astToTypescript (D:\stepwell-anz\src\Stepwell.Web.Host\node_modules@angular\compiler-cli\src\ngtsc\typecheck\src\expression.js:55:27) at TcbExpressionTranslator.translate (D:\stepwell-anz\src\Stepwell.Web.Host\node_modules@angular\compiler-cli\src\ngtsc\typecheck\src\type_check_block.js:1771:33) at tcbExpression (D:\stepwell-anz\src\Stepwell.Web.Host\node_modules@angular\compiler-cli\src\ngtsc\typecheck\src\type_check_block.js:1759:27) at TcbUnclaimedInputsOp.execute (D:\stepwell-anz\src\Stepwell.Web.Host\node_modules@angular\compiler-cli\src\ngtsc\typecheck\src\type_check_block.js:848:32) at Scope.executeOp (D:\stepwell-anz\src\Stepwell.Web.Host\node_modules@angular\compiler-cli\src\ngtsc\typecheck\src\type_check_block.js:1428:26)[0m at Scope.render (D:{our project}\src{our project}.Web.Host\node_modules@angular\compiler-cli\src\ngtsc\typecheck\src\type_check_block.js:1335:22) at TcbTemplateBodyOp.execute (D:{our project}\src{our project}.Web.Host\node_modules@angular\compiler-cli\src\ngtsc\typecheck\src\type_check_block.js:318:40) at Scope.executeOp (D:{our project}\src{our project}.Web.Host\node_modules@angular\compiler-cli\src\ngtsc\typecheck\src\type_check_block.js:1428:26) at Scope.render (D:{our project}\src{our project}.Web.Host\node_modules@angular\compiler-cli\src\ngtsc\typecheck\src\type_check_block.js:1335:22) at Object.generateTypeCheckBlock (D:{our project}\src{our project}.Web.Host\node_modules@angular\compiler-cli\src\ngtsc\typecheck\src\type_check_block.js:58:37)

npm ERR! code ELIFECYCLE npm ERR! errno 1 npm ERR! [email protected] publish: gulp build && ng build --prod npm ERR! Exit status 1 npm ERR! npm ERR! Failed at the [email protected] publish script. npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

I'm working with the ANZ version 10.1 Angulare with Core/dotNet5 connecting to an external authentication server using OpenIdConnect.
They have an authentication endpoint and a userinfo endpoint.

I added an entry for "UserInfoEndpoint" in the"OpenId" section of AppSettings.json I updated getOpenIdConnectConfig with: authConfig.userinfoEndpoint = loginProvider.additionalParams['UserInfoEndpoint']; authConfig.responseType = 'id_token token'; authConfig.scope = 'openid profile email';

unfortunately, externalAuthManager is not visible and ExternalAuthUserInfo is not modifiable.

So, my question is whether there is any way to map the access token and id token results to get more than just first name, last name, and email? The customer's auth server is theoretically sending us the first name, last name, and email plus username and authorization data including user roles.

thank you Rocco

Showing 31 to 38 of 38 entries