Hey.. Bhushan this side. I am new to radzen Blazor. Currently I am working on the project where the user tries to login, it gets redirected to the login page again even the login credentials are correct. I have Blazor WASM project. But when I redirected to the unauthorized page after login then the user gets the access to the authenticated pages.
This issue occurs on server.
If I run my project locally then the user gets logged in successfully.
while login I have observed that in my developer tool of browser I get 302 code for redirect page. But for local I get the 200 code, then redirected to my home page.
I have applied the logging code in GetAuthenticationStateAsync method of SecurityService and below are the exceptions i get. I have seen this exceptions at log file
GetAuthenticationStateAsync: Exception occurred while getting authentication state.
Exception:
System.Net.Http.HttpRequestException: A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond.
---> System.Net.Sockets.SocketException (10060): A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond.
at System.Net.Sockets.Socket.AwaitableSocketAsyncEventArgs.ThrowException(SocketError error, CancellationToken cancellationToken)
at System.Net.Sockets.Socket.AwaitableSocketAsyncEventArgs.System.Threading.Tasks.Sources.IValueTaskSource.GetResult(Int16 token)
at System.Net.Sockets.Socket.g__WaitForConnectWithCancellation|285_0(AwaitableSocketAsyncEventArgs saea, ValueTask connectTask, CancellationToken cancellationToken)
There was an error executing a callback while pausing the application.
Exception:
System.ArgumentException: There is already a persisted object under the same key 'Theme'
at Microsoft.AspNetCore.Components.PersistentComponentState.PersistAsJson[TValue](String key, TValue instance)
at Radzen.Blazor.RadzenTheme.PersistTheme()
at Microsoft.AspNetCore.Components.Infrastructure.ComponentStatePersistenceManager.g__ExecuteCallback|11_0(Func1 callback, ILogger1 logger)
Unfortunately I am out of further ideas. Getting connection refused because of a timeout isn't something that should happen normally. I would check again if the certificate is properly installed and not self-signed.
Hi @korchev
I have also tried the CRMBlazorWasmRBS Project, here also I am facing the same login redirection issue at production side but when i run the project locally it works properly