Default Security - Login Page -> Login -> Login Page

Hi,

I changed the security in my project to default security.

Login Page etc is generated.
I selected a start page.

After clicking the login button it brings me back to the login page again.
So I am not able to login.
Thanks.

You selected Login page as start page?

No, I selected another page as start page.

In this case I’m not sure why you have such problem. Try to clear your browser and WASM application cache or try incognito mode. Check also if login is successful, otherwise you will be redirected to the login page again.

I used fiddler. There is an error inthe request of the openid-configuration:

https://localhost:5001/.well-known/openid-configuration

Microsoft.Data.SqlClient.SqlException (0x80131904): Invalid object name 'Keys'.
at Microsoft.Data.SqlClient.SqlCommand.<>c.b__188_0(Task1 result) at System.Threading.Tasks.ContinuationResultTaskFromResultTask2.InnerInvoke()
at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state)
--- End of stack trace from previous location ---
at System.Threading.Tasks.Task.ExecuteWithThreadLocal(Task& currentTaskSlot, Thread threadPoolThread)
--- End of stack trace from previous location ---
at Microsoft.EntityFrameworkCore.Storage.RelationalCommand.ExecuteReaderAsync(RelationalCommandParameterObject parameterObject, CancellationToken cancellationToken)
at Microsoft.EntityFrameworkCore.Storage.RelationalCommand.ExecuteReaderAsync(RelationalCommandParameterObject parameterObject, CancellationToken cancellationToken)
at Microsoft.EntityFrameworkCore.Query.Internal.SingleQueryingEnumerable1.AsyncEnumerator.InitializeReaderAsync(AsyncEnumerator enumerator, CancellationToken cancellationToken) at Microsoft.EntityFrameworkCore.SqlServer.Storage.Internal.SqlServerExecutionStrategy.ExecuteAsync[TState,TResult](TState state, Func4 operation, Func4 verifySucceeded, CancellationToken cancellationToken) at Microsoft.EntityFrameworkCore.Query.Internal.SingleQueryingEnumerable1.AsyncEnumerator.MoveNextAsync()
at Microsoft.EntityFrameworkCore.EntityFrameworkQueryableExtensions.ToListAsync[TSource](IQueryable1 source, CancellationToken cancellationToken) at Microsoft.EntityFrameworkCore.EntityFrameworkQueryableExtensions.ToListAsync[TSource](IQueryable1 source, CancellationToken cancellationToken)
at Microsoft.EntityFrameworkCore.EntityFrameworkQueryableExtensions.ToArrayAsync[TSource](IQueryable`1 source, CancellationToken cancellationToken)
at Duende.IdentityServer.EntityFramework.Stores.SigningKeyStore.LoadKeysAsync() in //src/EntityFramework.Storage/Stores/SigningKeyStore.cs:line 54
at Duende.IdentityServer.Services.KeyManagement.KeyManager.GetKeysFromStoreAsync(Boolean cache) in /
/src/IdentityServer/Services/Default/KeyManagement/KeyManager.cs:line 419
at Duende.IdentityServer.Services.KeyManagement.KeyManager.GetAllKeysInternalAsync() in //src/IdentityServer/Services/Default/KeyManagement/KeyManager.cs:line 103
at Duende.IdentityServer.Services.KeyManagement.KeyManager.GetAllKeysAsync() in /
/src/IdentityServer/Services/Default/KeyManagement/KeyManager.cs:line 90
at Duende.IdentityServer.Services.KeyManagement.AutomaticKeyManagerKeyStore.GetValidationKeysAsync() in //src/IdentityServer/Services/Default/KeyManagement/AutomaticKeyManagerKeyStore.cs:line 105
at Duende.IdentityServer.Services.DefaultKeyMaterialService.GetValidationKeysAsync() in /
/src/IdentityServer/Services/Default/DefaultKeyMaterialService.cs:line 106
at Duende.IdentityServer.ResponseHandling.DiscoveryResponseGenerator.CreateDiscoveryDocumentAsync(String baseUrl, String issuerUri) in //src/IdentityServer/ResponseHandling/Default/DiscoveryResponseGenerator.cs:line 105
at Duende.IdentityServer.Endpoints.DiscoveryEndpoint.ProcessAsync(HttpContext context) in /
/src/IdentityServer/Endpoints/DiscoveryEndpoint.cs:line 61
at Duende.IdentityServer.Hosting.IdentityServerMiddleware.Invoke(HttpContext context, IEndpointRouter router, IUserSession session, IEventService events, IIssuerNameService issuerNameService, IBackChannelLogoutService backChannelLogoutService) in //src/IdentityServer/Hosting/IdentityServerMiddleware.cs:line 103
at Duende.IdentityServer.Hosting.IdentityServerMiddleware.Invoke(HttpContext context, IEndpointRouter router, IUserSession session, IEventService events, IIssuerNameService issuerNameService, IBackChannelLogoutService backChannelLogoutService) in /
/src/IdentityServer/Hosting/IdentityServerMiddleware.cs:line 103
at Duende.IdentityServer.Hosting.MutualTlsEndpointMiddleware.Invoke(HttpContext context, IAuthenticationSchemeProvider schemes) in //src/IdentityServer/Hosting/MutualTlsEndpointMiddleware.cs:line 95
at Microsoft.AspNetCore.Authentication.AuthenticationMiddleware.Invoke(HttpContext context)
at Duende.IdentityServer.Hosting.DynamicProviders.DynamicSchemeAuthenticationMiddleware.Invoke(HttpContext context) in /
/src/IdentityServer/Hosting/DynamicProviders/DynamicSchemes/DynamicSchemeAuthenticationMiddleware.cs:line 48
at Duende.IdentityServer.Hosting.BaseUrlMiddleware.Invoke(HttpContext context) in /_/src/IdentityServer/Hosting/BaseUrlMiddleware.cs:line 32
at Microsoft.AspNetCore.Diagnostics.DeveloperExceptionPageMiddleware.Invoke(HttpContext context)
ClientConnectionId:719b39f1-de17-4319-928e-d15d7c2b8ff9
Error Number:208,State:1,Class:16

HEADERS

Accept: /
Connection: keep-alive
Host: localhost:5001
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/104.0.0.0 Safari/537.36
Accept-Encoding: gzip, deflate, br
Accept-Language: de-DE,de;q=0.9,en-US;q=0.8,en;q=0.7
Cookie: idsrv.session=37C1EF68A1484526463282E3E9E96E59; .AspNetCore.Identity.Application=CfDJ8MnrmAW26WRFiyHXgXLr_bciITH2__N5ilZ4li8KiWsz7tAY7Z6CVYrGm3r6BAq7jqYwJBpsNuHjtXq0u7Dmz8elrj1Fkuy-Dqo3yBPiV16T823nRBuVDgvRNAr1WRDJnXyZzHB044wIdXuh_hzEN-osHwfPxsIWsuqE5YQ_r9-Vl6qJahiUcXXF3Jc7j9Yv9Tmw9yMPkSPPL1WLZKDU8skfPlk2sKcgAVTBEBMp8EpGR4HXUMNU90RCbZoaXymHwBJUBIaORKk45lfe096C6VEP0QENgCeQ3jmVK7XMdvcr7m0V481Wz-Bk58VrLnnmIss3shZcbYDEcVVDK20Ih6oTL0lBtZbs4bqL6iVrnTyTdZHy_tGsNITT9YRfwHuvdaUnbHGnlwuI8X-41BA1WFjGBqS6M6Ex5G9X1wpSWWDzWfR9ciKJqgQyf1-Zku0a-p2SzGoXy5OkcdeNFFBIDpipk4OsHyjoMKyqimDPUYljWkNnCMGIhrHtLGMxfr_U-EUqg3lgz2D-J0slrKzSVNsbZOQXSKFMyfywZwqp1wpd4nhwqiejeH6nKb-JOuaSinRNO3g5UoXD1O6iHhmnoMXffFDWLcohUg2Wtz9rDDHZZ9AiCSHmfLGIMG4cqO6qiRU7f1O1PnHHUlppfMYG3kUvi9GjHCItKTZQk4qeBuOwxMUuApJOpT3pFd_ad5WTAbcb_4ZitwRmT2P6ybeOCepRYMO8om4rmZlL2v765X8o7QQ8TPeXQqsxCCQ50cwunOd5iSsbh7Iwv40woOuWxL8MxpfAAzGd_CCqe-vLapoyK3y2zmbGWDA23ReozIDkf9tawigH3Q5PP2i9hjig8RBZZ9qj5ioG3fq5UZxo3oEOu8TwfPIp4HXxH2MpUZv2XSinwdhWNh60Yg81pPeShV5asN-LX2_qZLfh3nKb8_xa-2EQq7GwF4Z0PzqPHrERo20_OjDid79Wpm3ZkdJ-Ri3U3NEng29IcwG56WnQasJANYN1F2Auf718XZ3R3HoH4GniStigeUbNUKHDcBojnri7c-qkTfkIpbA_0CgE_ZKge03FeMeKk48tBSdeGci36_CrLmuHp7Sti-VkDmZhE2mYcHIbC5zMaZN_yG1ze6ouuo_0Yf1RdHhOLX528aP8QQ
Referer: https://localhost:5001/
sec-ch-ua: "Chromium";v="104", " Not A;Brand";v="99", "Google Chrome";v="104"
sec-ch-ua-mobile: ?0
sec-ch-ua-platform: "Windows"
Sec-Fetch-Site: same-origin
Sec-Fetch-Mode: cors
Sec-Fetch-Dest: empty

The error means that not all required security tables are created by the migration. This can happen if you used same database to create security with different versions on .NET.

I use the same database for another radzen application with another .net version.

Is it possible to use the same database with differenz versions? What options do I have?

Thanks.

This is not possible and we are not aware of any workarounds. Different .NET versions have different security tables.

Is it possible to upgrade a radzen project to a newer .net version?
Is it via radzen or visual studio?

Thanks.

Check my reply here - the thread is for Angular however the situation is the same in Blazor:

Is it possible to copy pages from one version to another version?
Thanks.

You can copy anything from one version to another however you might have .NET version dependent code in these. You need to check carefully.