simpleidserver / SimpleIdServer

OpenID, OAuth 2.0, SCIM2.0, UMA2.0, FAPI, CIBA & OPENBANKING Framework for ASP.NET Core
https://simpleidserver.com/
Apache License 2.0
682 stars 90 forks source link

IIS Hosting Issue - Exception in Event Log #747

Closed igsuffolk closed 1 month ago

igsuffolk commented 1 month ago

Error starting app on newly published IIS site.

Steps followed Created VS2022 solution as per https://simpleidserver.com/docs/installation/dotnettemplate dot net run - Server runs perfectly and client setup Postman post to /master/token works as expected.

Issue Steps Publish to IIS (https://localhost/SimpleIdServer) https://localhost/SimpleIdServer/master - can login ok

Unable to request token. Postman post to /master/token returns 500 error

Event Log

Category: Microsoft.AspNetCore.Diagnostics.ExceptionHandlerMiddleware EventId: 1 SpanId: 16b1952c35b21ab5 TraceId: a0d32e44202ec2bfda3b1be708301ba7 ParentId: 0000000000000000 RequestId: 80000006-0004-f500-b63f-84710c7967bb RequestPath: /simpleidserver/master/token

An unhandled exception has occurred while executing the request.

Exception: System.NotSupportedException: Negotiate authentication requires a server that supports IConnectionItemsFeature like Kestrel. at Microsoft.AspNetCore.Authentication.Negotiate.NegotiateHandler.GetConnectionItems() at Microsoft.AspNetCore.Authentication.Negotiate.NegotiateHandler.HandleRequestAsync() at Microsoft.AspNetCore.Authentication.Negotiate.NegotiateHandler.HandleRequestAsync() at Microsoft.AspNetCore.Authentication.AuthenticationMiddleware.Invoke(HttpContext context) at SimpleIdServer.IdServer.Middlewares.LanguageMiddleware.InvokeAsync(HttpContext context) at SimpleIdServer.IdServer.Middlewares.RealmMiddleware.InvokeAsync(HttpContext context) at Microsoft.AspNetCore.Diagnostics.ExceptionHandlerMiddlewareImpl.g__Awaited|8_0(ExceptionHandlerMiddlewareImpl middleware, HttpContext context, Task task)