Skip to content

Unix socket bidding with Owin not working #3122

Closed
@sterchelen

Description

@sterchelen

Hi,

I'm trying to use unix socket with Owin and Nancy activated. With the ListenUnixSocket() all of my requests return 500 whereas with the standard tcp bidding Listen() everything is fine !
Here is the stack trace, thanks to UseDeveloperExceptionPage():

   at Microsoft.AspNetCore.Owin.OwinEnvironment.<>c.<.ctor>b__2_50(IHttpConnectionFeature feature)
   at Microsoft.AspNetCore.Owin.OwinEnvironment.FeatureMap`1.<>c__DisplayClass2_0.<.ctor>b__0(Object feature)
   at Microsoft.AspNetCore.Owin.OwinEnvironment.FeatureMap.TryGet(HttpContext context, Object& value)
   at Microsoft.AspNetCore.Owin.OwinEnvironment.System.Collections.Generic.IDictionary<System.String,System.Object>.TryGetValue(String key, Object& value)
   at Nancy.Owin.NancyMiddleware.Get[T](IDictionary`2 env, String key)
   at Nancy.Owin.NancyMiddleware.<>c__DisplayClass2_1.<<UseNancy>b__1>d.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.ValidateEnd(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.GetResult()
   at Microsoft.AspNetCore.Owin.WebSocketAcceptAdapter.<>c__DisplayClass6_0.<<AdaptWebSockets>b__0>d.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.ValidateEnd(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.GetResult()

My code that bind the unix socket :

				var host = new WebHostBuilder()
					.UseKestrel(k =>
					{
						k.Listen(IPAddress.Any, port);
						if (!string.IsNullOrEmpty(kestrelSocketPath))
							k.ListenUnixSocket(kestrelSocketPath);
					})
					.UseContentRoot(Directory.GetCurrentDirectory())
					.UseStartup<Startup>()
					.Build();

Any ideas ?

Dotnet and owin version --> 2.0.2
Nancy --> 2.0.0

Thanks.

Metadata

Metadata

Assignees

No one assigned

    Labels

    area-networkingIncludes servers, yarp, json patch, bedrock, websockets, http client factory, and http abstractionsbugThis issue describes a behavior which is not expected - a bug.feature-http-abstractions

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions