在Asp.net核心应用程序中与SignalR 2.2.1协商404 [英] Negotiate 404 with SignalR 2.2.1 in Asp.net core application

查看:92
本文介绍了在Asp.net核心应用程序中与SignalR 2.2.1协商404的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经为此苦了几天了...

I've been strugging with this one for a few days now...

我有一个使用.Net 4.6和SignalR 2.2.1的Asp.net核心应用程序.在Windows 10电脑上从VS 2015在IIS Express中本地运行时,一切正常.甚至在我的本地计算机上部署到IIS 10时,它也可以工作.

I have an Asp.net core application which uses .Net 4.6 and SignalR 2.2.1. When running locally in IIS Express from VS 2015 on a Windows 10 pc, everything works fine. It even works when deploying to IIS 10 on my local machine.

但是,当在运行Windows Server的虚拟机上部署到IIS(我尝试过2008 R2、2012 R2和2016 TP5)时,SignalR尝试进行协商时始终会出现404错误.作为默认网站运行, http://localhost/signalr/negotiate 返回404./signalr/hubs仍返回据我所知,正确的js.

However, when deploying to IIS on a vm running Windows Server (I've tried 2008 R2, 2012 R2 and 2016 TP5), I consistently get a 404 error when SignalR tries to negotiate. Running as the default website, http://localhost/signalr/negotiate returns a 404. /signalr/hubs still returns the correct js as far as I can tell.

奇怪的是,我尝试在运行Windows Server 2012 R2的旧vm上进行设置,并且由于某种原因它运行正常,这使我认为这是安装问题,但我无法终生找出问题所在.

The weird thing is, I tried setting it up on an old vm running Windows Server 2012 R2 and for some reason it works fine, which makes me think it is a setup issue, but I can't for the life of me figure out what the problem is.

任何建议都将不胜感激,因为我现在真的在吸管...

Any suggestions would be appreciated as I really am grasping at straws now...

推荐答案

在IIS上的应用程序轮询中启用加载用户配置文件

enable load user profile in application poll on IIS

这篇关于在Asp.net核心应用程序中与SignalR 2.2.1协商404的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆