katana /owin middleware with parameter -


I try to create a parametric middleware, but I only get a error of http 504, it works fine without code parameter

Any thoughts?

  Public Zero Configuration (IAppBuilder App) {app.Use & lt; MyMiddleware & gt; ("Hello"); } Classmilemware: Owen Mildware {Public Mimelevelware (OwinMiddleware Next, String Message): Base (Next) {Message = Message; } Public string message {get; Set; } Public override async Task Inococ (IOwinContext context) {context.Response.ContentLength = Message.Length; Context.Response.ContentType = "text / html"; Wait for the reference. reaction. Merger async (message); Wait for further }}    

OK I got this issue

Content Length should be evaluated in UTF-8:

encoding. UTF8.GetBytes (message). Unless

C # uses UTF-16 encoding by default < / P>

Comments

Popular posts from this blog

Verilog Error: output or inout port "Q" must be connected to a structural net expression -

jasper reports - How to center align barcode using jasperreports and barcode4j -

c# - ASP.NET MVC - Attaching an entity of type 'MODELNAME' failed because another entity of the same type already has the same primary key value -