Windows 10 IoT核心版上具有Http.Sys的Windows Auth

时间:2019-01-15 19:45:10

标签: c# asp.net-core windows-authentication windows-10-iot-core

我使用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);

0 个答案:

没有答案