Base solution for your next web application

Activities of "-bitman"

Question
  • What is your product version? 8.2
  • What is your product type (Angular or MVC)? Angular
  • What is product framework type (.net framework or .net core)? .NET Core

I would like to ask if there is a feature that will allow me to get statistics of the number of page visits from users of my application?

Thank you!

Hello @musa.demir,

I am looking forward to the updated version.

Thank you!

Hello ANZ Team,

I am faced with the same issue as stated in this ticket. I sent via email a video recording on how I made the 1-to-Many relationship and I believe it is following the steps explained here but the same error message comes out when I try to run the front-end angular side of the project. I am dead on the water and unable to proceed because of this. I hope there is a workaround?

Thank you!

Hello AspNetZero Team,

  • What is your product version? 8.2
  • What is your product type (Angular or MVC)? Angular
  • What is product framework type (.net framework or .net core)? .NET Core

We have deployed our app service to azure with multiple server instances running and configured it to connect to Azure SignalR. Before we have done this change, the push notification to the app works well and I can see the toast messages and the bell icon being updated with notifications in realtime. But after we've switched over to Azure SignalR, all the realtime notifications went away.

Any ideas how this might have happened please?

Thank you!

Thank you @maliming.

Hello @maliming,

Thank you for replying. Based on how we call the api do you think a short interval is the one causing the expiration? Or can you suggest which avenue I should be looking at in order to avoid this?

Thank you!

If it helps, we have written an Android and an iOS application that is used by around 500 users and it sends API requests to the backend every 30 seconds. It seems that the RefreshToken() is failing at some point but I am not 100% sure because it is intermittent.

Please advise. Thank you!

  • What is your product version? 8.2.0
  • What is your product type (Angular or MVC)? Angular
  • What is product framework type (.net framework or .net core)? .net core

I would like to get advice regarding the error I am getting in the application that is deployed in azure having multiple server instances.

info: Microsoft.AspNetCore.Authentication.JwtBearer.JwtBearerHandler[1]
      Failed to validate the token.
Microsoft.IdentityModel.Tokens.SecurityTokenExpiredException: IDX10223: Lifetime validation failed. The token is expired. ValidTo: '[PII is hidden. For more details, see https://aka.ms/IdentityModel/PII.]', Current time: '[PII is hidden. For more details, see https://aka.ms/IdentityModel/PII.]'.
   at Microsoft.IdentityModel.Tokens.Validators.ValidateLifetime(Nullable`1 notBefore, Nullable`1 expires, SecurityToken securityToken, TokenValidationParameters validationParameters)
   at System.IdentityModel.Tokens.Jwt.JwtSecurityTokenHandler.ValidateLifetime(Nullable`1 notBefore, Nullable`1 expires, JwtSecurityToken jwtToken, TokenValidationParameters validationParameters)
   at System.IdentityModel.Tokens.Jwt.JwtSecurityTokenHandler.ValidateTokenPayload(JwtSecurityToken jwtToken, TokenValidationParameters validationParameters)
   at System.IdentityModel.Tokens.Jwt.JwtSecurityTokenHandler.ValidateToken(String token, TokenValidationParameters validationParameters, SecurityToken& validatedToken)
   at SprintTek.Web.Authentication.JwtBearer.SprintTekJwtSecurityTokenHandler.ValidateToken(String securityToken, TokenValidationParameters validationParameters, SecurityToken& validatedToken) in C:\Users\SSPH\source\agent\_work\5\s\aspnet-core\src\SprintTek.Web.Core\Authentication\JwtBearer\SprintTekJwtSecurityTokenHandler.cs:line 40
   at Microsoft.AspNetCore.Authentication.JwtBearer.JwtBearerHandler.HandleAuthenticateAsync()
info: Microsoft.AspNetCore.Authentication.JwtBearer.JwtBearerHandler[7]
      Bearer was not authenticated. Failure message: IDX10223: Lifetime validation failed. The token is expired. ValidTo: '[PII is hidden. For more details, see https://aka.ms/IdentityModel/PII.]', Current time: '[PII is hidden. For more details, see https://aka.ms/IdentityModel/PII.]'.
info: Microsoft.AspNetCore.Routing.EndpointMiddleware[0]
      Executing endpoint 'SprintTek.Web.Controllers.TokenAuthController.GetExternalAuthenticationProviders (SprintTek.Web.Core)'

I checked the AccessTokenExpiration settings and it is for 1 day.

Please advise. Thank you!

Hello Rickfrankel,

Thank you for your help. I will try your suggestion and hopefully will resolve my issues.

I appreciate it.

Thank you!

Hello ANZ Team,

Apologies for the late reply. We found out the root cause of the SignalR issue in our Azure app services. It was the ARR Affinity settings turned OFF. Once we turned it back ON, all 404 exceptions went away immediately. As per documentation about ARR Affinity...

Improve performance of your stateless app by turning Affinity Cookie off, stateful apps should keep this setting on for compatibility.

That being the case, I saw from the forum post that the API is stateless...

https://support.aspnetzero.com/QA/Questions/6075/Is-AspNetZero-API-stateless-for-angular-SPA-apps

I would like to ask if this is the case then why is the API throwing 404s when ARR Affinity is turned ON in azure? Am I missing something?

In addition to this, I found this post related to the issue.

https://stackoverflow.com/questions/56795602/signalr-core-is-arr-affinity-needed-when-web-sockets-are-enabled-and-the-azure

We are at Angular+Core 8.2 version of AspNetZero, if that helps.

Bottom line, we would want to avail of the load balancing feature of Azure by turning OFF ARR Affinity and at the same time still be able to capitalize on the SignalR feature that is already integrated in your solution.

Any advise would be appreciated.

Thank you!

Showing 1 to 10 of 98 entries