我使用HttpSys服务器制作了一个asp.net核心Windows auth应用程序,并且开发机器运行正常,但是当我将其上传到Windows 10 IoT核心版时,我们遇到了以下问题:
failHosting environment: Production
Content root path: C:\Data\Users\Administrator\Documents\publish
: Microsoft.AspNetCore.Server.HttpSys.HttpSysListener[0]
GetContextAsync
Microsoft.AspNetCore.Server.HttpSys.HttpSysException (998): Invalid access to memory location
at Microsoft.AspNetCore.Server.HttpSys.HttpSysListener.AcceptAsync()
Now listening on: http://localhost:5000
Application started. Press Ctrl+C to shut down.
fail: Microsoft.AspNetCore.Server.HttpSys.MessagePump[0]
ListenForNextRequestAsync
Microsoft.AspNetCore.Server.HttpSys.HttpSysException (998): Invalid access to memory location
at Microsoft.AspNetCore.Server.HttpSys.HttpSysListener.AcceptAsync()
at Microsoft.AspNetCore.Server.HttpSys.MessagePump.ProcessRequestsWorker()
fail: Microsoft.AspNetCore.Server.HttpSys.HttpSysListener[0]
GetContextAsync
Microsoft.AspNetCore.Server.HttpSys.HttpSysException (998): Invalid access to memory location
at Microsoft.AspNetCore.Server.HttpSys.HttpSysListener.AcceptAsync()
fail: Microsoft.AspNetCore.Server.HttpSys.MessagePump[0]
ListenForNextRequestAsync
Microsoft.AspNetCore.Server.HttpSys.HttpSysException (998): Invalid access to memory location
at Microsoft.AspNetCore.Server.HttpSys.HttpSysListener.AcceptAsync()
at Microsoft.AspNetCore.Server.HttpSys.MessagePump.ProcessRequestsWorker()
我的身份验证设置为:
WebHost
.CreateDefaultBuilder(args)
.UseStartup<Startup>()
.UseHttpSys(options =>
{
options.Authentication.Schemes = AuthenticationSchemes.NTLM | AuthenticationSchemes.Negotiate;
options.Authentication.AllowAnonymous = false;
})
.Build();
和
services.AddAuthentication(HttpSysDefaults.AuthenticationScheme);