Krishna
Krishna
CC#
Created by Krishna on 12/9/2024 in #help
How to implement RateLimiting in a dotnet application that is built using .net461 framework version?
I am currently working on a project which is using .net461 framework version. I need to implement RateLimiting in the application. Are there any built in tools or libraries that I can use for this purpose or Should I implement my own RateLimiter?
12 replies
CC#
Created by Krishna on 12/6/2024 in #help
What is the better way to identify who is the exact culprit in this exception?
Root Cause: Database Column and Entity Property mismatch (Nullable in Db and NotNULL in C# Entity). Message: Data is Null. This method or property cannot be called on Null values. StackTrace:
at Microsoft.Data.SqlClient.SqlBuffer.get_Boolean() at Microsoft.EntityFrameworkCore.Query.RelationalShapedQueryCompilingExpressionVisitor.ShaperProcessingExpressionVisitor.<PopulateSplitCollectionAsync>d__31`3.MoveNext() at Microsoft.EntityFrameworkCore.Query.RelationalShapedQueryCompilingExpressionVisitor.ShaperProcessingExpressionVisitor.<TaskAwaiter>d__36.MoveNext() at Microsoft.EntityFrameworkCore.Query.Internal.SplitQueryingEnumerable`1.AsyncEnumerator.<MoveNextAsync>d__21.MoveNext() at System.Runtime.CompilerServices.ConfiguredValueTaskAwaitable`1.ConfiguredValueTaskAwaiter.GetResult() at Microsoft.EntityFrameworkCore.Query.ShapedQueryCompilingExpressionVisitor.<SingleOrDefaultAsync>d__15`1.MoveNext() at Microsoft.EntityFrameworkCore.Query.ShapedQueryCompilingExpressionVisitor.<SingleOrDefaultAsync>d__15`1.MoveNext() at PoliEze.Portal.Application.Policies.Queries.GetPolicyFileMappingsQueryHandler.<Handle>d__4.MoveNext() in D:\_PowerTeam\WDAC\_Repo\polieze\code\Portal\PoliEze.Portal.Application\Policies\Queries\GetPolicyFileMappingsQuery.cs:line 25 at PoliEze.Portal.Application.Common.Behaviours.ValidationBehaviour`2.<Handle>d__2.MoveNext() in D:\_PowerTeam\WDAC\_Repo\polieze\code\Portal\PoliEze.Portal.Application\Common\Behaviours\ValidationBehaviour.cs:line 32 at PoliEze.Portal.Application.Common.Behaviours.UnhandledExceptionBehaviour`2.<Handle>d__2.MoveNext() in D:\_PowerTeam\WDAC\_Repo\polieze\code\Portal\PoliEze.Portal.Application\Common\Behaviours\UnhandledExceptionBehaviour.cs:line 18
at Microsoft.Data.SqlClient.SqlBuffer.get_Boolean() at Microsoft.EntityFrameworkCore.Query.RelationalShapedQueryCompilingExpressionVisitor.ShaperProcessingExpressionVisitor.<PopulateSplitCollectionAsync>d__31`3.MoveNext() at Microsoft.EntityFrameworkCore.Query.RelationalShapedQueryCompilingExpressionVisitor.ShaperProcessingExpressionVisitor.<TaskAwaiter>d__36.MoveNext() at Microsoft.EntityFrameworkCore.Query.Internal.SplitQueryingEnumerable`1.AsyncEnumerator.<MoveNextAsync>d__21.MoveNext() at System.Runtime.CompilerServices.ConfiguredValueTaskAwaitable`1.ConfiguredValueTaskAwaiter.GetResult() at Microsoft.EntityFrameworkCore.Query.ShapedQueryCompilingExpressionVisitor.<SingleOrDefaultAsync>d__15`1.MoveNext() at Microsoft.EntityFrameworkCore.Query.ShapedQueryCompilingExpressionVisitor.<SingleOrDefaultAsync>d__15`1.MoveNext() at PoliEze.Portal.Application.Policies.Queries.GetPolicyFileMappingsQueryHandler.<Handle>d__4.MoveNext() in D:\_PowerTeam\WDAC\_Repo\polieze\code\Portal\PoliEze.Portal.Application\Policies\Queries\GetPolicyFileMappingsQuery.cs:line 25 at PoliEze.Portal.Application.Common.Behaviours.ValidationBehaviour`2.<Handle>d__2.MoveNext() in D:\_PowerTeam\WDAC\_Repo\polieze\code\Portal\PoliEze.Portal.Application\Common\Behaviours\ValidationBehaviour.cs:line 32 at PoliEze.Portal.Application.Common.Behaviours.UnhandledExceptionBehaviour`2.<Handle>d__2.MoveNext() in D:\_PowerTeam\WDAC\_Repo\polieze\code\Portal\PoliEze.Portal.Application\Common\Behaviours\UnhandledExceptionBehaviour.cs:line 18
I want to know Can we figure out which is the exact column for which type or nullability has not matched?
25 replies
CC#
Created by Krishna on 12/2/2024 in #help
How to make sure a background service is never stopped by any user, not even local admin?
I was learning to create a background service using C# and dotnet. My curiosity is to know, can we make such a service that cannot be stopped by any user not even local admin?
26 replies