升级到Beta 8后,使用Windows身份验证进行调试在IIS Express中不起作用。我收到了错误
"尝试确定托管您的应用程序的DNX进程的进程ID时发生错误。"
重现的步骤:
我正在使用Windows和Visual Studio的新安装。除installation files以外,我是否需要下载任何其他软件?
答案 0 :(得分:3)
如评论中所述,有一个open tooling issue for this bug。与此同时,我已经能够使用WebListener成功调试,需要进行以下两项更改:
在Startup.cs
using Microsoft.AspNet.Http.Features;
using Microsoft.Net.Http.Server;
并在Configure
方法中添加:
var listener = app.ServerFeatures.Get<WebListener>();
if (listener != null)
{
listener.AuthenticationManager.AuthenticationSchemes = AuthenticationSchemes.NTLM;
}
在project.json
中添加一个新的weblistener命令,如下所示:
"commands": {
"weblistener": "Microsoft.AspNet.Server.WebListener --config hosting.ini",
"web": "Microsoft.AspNet.Server.Kestrel"
},
并确保您的dependencies
部分
"Microsoft.AspNet.Server.WebListener": "1.0.0-beta8",
当我从beta 7升级时,我不得不将我的hosting.ini文件更改为json格式 - 不知道这是否重要!
完成此操作后,您应该能够使用weblistener而不是IIS Express进行调试。使用web(即kestrel)进行调试不起作用,因为kestrel不支持(也不支持)NTLM身份验证。
我发现,如果我直接在project.json中更改了“web”命令,Visual Studio会将其有效地更改回kestrel,因此添加一个单独的命令as recommended by the Microsoft team似乎可以让一切都快乐。