Seji64 / LAPS-WebUI

A nice and simple Web Interface for LAPS (Local Administrator Password Solution)
MIT License
29 stars 6 forks source link

Unhandled exception rendering component: Sequence contains no matching element #11

Closed RAB70 closed 1 year ago

RAB70 commented 1 year ago

Hi Seji, I downloaded and installed the native version, both on Ubuntu 22 and Windows Server 2022. I can log in with an authorized user in both cases. The directory is also searched and the computer objects are offered to me. Unfortunately, the following error occurs when selecting an object. Do you have a hint for me? Thank you Best RAB 21:36:42 WRN] Unhandled exception rendering component: Sequence contains no matching element System.InvalidOperationException: Sequence contains no matching element at System.Linq.ThrowHelper.ThrowNoMatchException() at System.Linq.Enumerable.Single[TSource](IEnumerable1 source, Func2 predicate) at LAPS_WebUI.Pages.LAPS.<>cDisplayClass25_2.b21(RenderTreeBuilder builder8) at Microsoft.AspNetCore.Components.Rendering.RenderTreeBuilder.AddContent(Int32 sequence, RenderFragment fragment) at MudBlazor.MudTabPanel.BuildRenderTree(RenderTreeBuilder __builder) at Microsoft.AspNetCore.Components.Rendering.ComponentState.RenderIntoBatch(RenderBatchBuilder batchBuilder, RenderFragment renderFragment Exception& renderFragmentException) [21:36:42 ERR] Unhandled exception in circuit 'udj6QrN0dpqbgfaMtyNmtKNSFM4lVIOB2sMAki4Q1aM'. System.InvalidOperationException: Sequence contains no matching element at System.Linq.ThrowHelper.ThrowNoMatchException() at System.Linq.Enumerable.Single[TSource](IEnumerable1 source, Func2 predicate) at LAPS_WebUI.Pages.LAPS.<>cDisplayClass25_2.b21(RenderTreeBuilder builder8) at Microsoft.AspNetCore.Components.Rendering.RenderTreeBuilder.AddContent(Int32 sequence, RenderFragment fragment) at MudBlazor.MudTabPanel.BuildRenderTree(RenderTreeBuilder __builder) at Microsoft.AspNetCore.Components.Rendering.ComponentState.RenderIntoBatch(RenderBatchBuilder batchBuilder, RenderFragment renderFragment Exception& renderFragmentException) [21:36:42 WRN] Unhandled exception rendering component: Cannot access a disposed object. System.ObjectDisposedException: Cannot access a disposed object. at Microsoft.AspNetCore.Components.RenderTree.ArrayBuilder1.GrowBuffer(Int32 desiredCapacity) at Microsoft.AspNetCore.Components.Rendering.ComponentState.RenderIntoBatch(RenderBatchBuilder batchBuilder, RenderFragment renderFragment Exception& renderFragmentException) at Microsoft.AspNetCore.Components.RenderTree.Renderer.ProcessRenderQueue() [21:36:42 ERR] Unhandled exception in circuit 'udj6QrN0dpqbgfaMtyNmtKNSFM4lVIOB2sMAki4Q1aM'. System.ObjectDisposedException: Cannot access a disposed object. at Microsoft.AspNetCore.Components.RenderTree.ArrayBuilder1.GrowBuffer(Int32 desiredCapacity) at Microsoft.AspNetCore.Components.Rendering.ComponentState.RenderIntoBatch(RenderBatchBuilder batchBuilder, RenderFragment renderFragment Exception& renderFragmentException) at Microsoft.AspNetCore.Components.RenderTree.Renderer.ProcessRenderQueue() [21:36:42 INF] Executed endpoint '/_blazor' [21:36:42 INF] Request finished HTTP/1.1 GET http://slapsui1.domain.ext/_blazor?id=F1ET6rHw5bkKVvkneBpSNw - - - 101 - - 11917.5948ms

Seji64 commented 1 year ago

Can you add your config (appsettings.JSON)?

RAB70 commented 1 year ago

Yes, of course: { "Logging": { "LogLevel": { "Default": "Debug", "Microsoft": "Warning", "Microsoft.Hosting.Lifetime": "Information" } }, "Kestrel": { "EndPoints": { "Http": { "Url": "http://0.0.0.0:8080" } } }, "LDAP": { "Server": "domaincontroller.domain.ext", "Port": 389, "UseSSL": false, "TrustAllCertificates": true, "SearchBase": "OU=Companypc,DC=domain,DC=ext" }, "LAPS": { "ForceVersion": null, "EncryptionDisabled": false }, "AllowedHosts": "*" }

Seji64 commented 1 year ago

So it doesn't matter which AD computer object you use? Just to make sure that "by chance" it doesn't work with the one you are testing with.

RAB70 commented 1 year ago

Unfortunately, the behavior is the same for all PCs

Seji64 commented 1 year ago

Found the bug....fixing it