Coder Social home page Coder Social logo

rservice's Introduction

rservice's People

Contributors

hrmoh avatar

Watchers

 avatar

rservice's Issues

Enabling the Audit.NET library causes exception

When Audit.NET library is enabled in Program.cs:
builder.Services.AddMvc(mvc => mvc.AddAuditFilter(config => config .LogRequestIf(r => r.Method != "GET") .WithEventType("{controller}/{action} ({verb})") .IncludeHeaders(ctx => !ctx.ModelState.IsValid) .IncludeRequestBody() .IncludeModelState() ));

exceptions are thrown (the base application (https://github.com/ganjoor/GanjoorService) which this sample application is extracted from works fine with this library is enabled ):

System.FormatException: Guid should contain 32 digits with 4 dashes (xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx).

at System.Guid.GuidResult.SetFailure(Boolean overflow, String failureMessageID)

at System.Guid.TryParseExactN(ReadOnlySpan`1 guidString, GuidResult& result)

at System.Guid.TryParseGuid(ReadOnlySpan`1 guidString, GuidResult& result)

at System.Guid..ctor(String g)

at RSecurityBackend.Services.Implementation.RAuditDataProvider.InsertEventAsync(AuditEvent auditEvent)

at Audit.Core.AuditScope.SaveEventAsync(Boolean forceInsert)

at Audit.Core.AuditScope.EndAsync()

at Audit.Core.AuditScope.DisposeAsync()

at Audit.WebApi.AuditApiAdapter.AfterExecutedAsync(ActionExecutedContext context, Boolean includeModelState, Boolean includeResponseBody, Boolean includeResponseHeaders)

at Audit.WebApi.AuditApiGlobalFilter.OnActionExecutionAsync(ActionExecutingContext context, ActionExecutionDelegate next)

at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.g__Awaited|13_0(ControllerActionInvoker invoker, Task lastTask, State next, Scope scope, Object state, Boolean isCompleted)

at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.g__Awaited|25_0(ResourceInvoker invoker, Task lastTask, State next, Scope scope, Object state, Boolean isCompleted)

at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.Rethrow(ResourceExecutedContextSealed context)

at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.Next(State& next, Scope& scope, Object& state, Boolean& isCompleted)

at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.g__Awaited|20_0(ResourceInvoker invoker, Task lastTask, State next, Scope scope, Object state, Boolean isCompleted)

at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.g__Awaited|17_0(ResourceInvoker invoker, Task task, IDisposable scope)

at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.g__Awaited|17_0(ResourceInvoker invoker, Task task, IDisposable scope)

at Microsoft.AspNetCore.Routing.EndpointMiddleware.g__AwaitRequestTask|6_0(Endpoint endpoint, Task requestTask, ILogger logger)

at Microsoft.AspNetCore.Authorization.AuthorizationMiddleware.Invoke(HttpContext context)

at Microsoft.AspNetCore.Authentication.AuthenticationMiddleware.Invoke(HttpContext context)

at Swashbuckle.AspNetCore.SwaggerUI.SwaggerUIMiddleware.Invoke(HttpContext httpContext)

at Swashbuckle.AspNetCore.Swagger.SwaggerMiddleware.Invoke(HttpContext httpContext, ISwaggerProvider swaggerProvider)

at Microsoft.AspNetCore.Diagnostics.DeveloperExceptionPageMiddleware.Invoke(HttpContext context)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.