问题描述
Hed们,我最近将我的应用程序从.Net 3.5升级到4.5。应用程序运行正常,但是当我尝试安装signalR并创建集线器类时,我收到以下错误SignalR:加载集线器时出错。确保您的集线器引用正确,例如< script src =''/ signalr / hubs''>< / script>。我已经尝试了所有我能想到的但没有任何工作可能有人可以发现我做错了什么。
Header.Master
Hed guys, I recently upgrade my application from .Net 3.5 to 4.5. The application runs fine but when I try to install signalR and create a hub class I get the following error SignalR: Error loading hubs. Ensure your hubs reference is correct, e.g. <script src=''/signalr/hubs''></script>." I have tried everything I can think of but nothing is working maybe someone can spot what I am doing wrong.
Header.Master
<script src="Scripts/json2.js"></script>
<script src="Scripts/jquery-1.6.4.js"></script>
<script src="Scripts/jquery.signalR-1.0.1.js"></script>
<script src="Scripts/jquery-ui-1.8.20.js"></script>
<script src="/signalr/hubs"></script>
<script type="text/javascript">
$(function ()
{
var hub = $.connection.clientNotificationHub;
$.connection.hub.start().done(function () {
alert("success");
});
});
</script>
Global.asax.vb
Global.asax.vb
Sub Application_Start(ByVal sender As Object, ByVal e As EventArgs)
RouteTable.Routes.MapHubs()
End Sub
我已经升级了App池,所以如果有人能指出我正确的方向我真的很赞美它。谢谢你们
。
I have upgraded the App pools aswell so if anyone can point me in the right direction id really apreciate it. Thanks guys
.
推荐答案
Global.asax.vb
Global.asax.vb
Sub Application_Start(ByVal sender As Object, ByVal e As EventArgs)
RouteTable.Routes.MapHubs()
End Sub
我已经升级了App池,所以如果有人能指出我正确的方向我真的很赞美它。谢谢你们
。
I have upgraded the App pools aswell so if anyone can point me in the right direction id really apreciate it. Thanks guys
.
这篇关于找不到SignalR / hubs的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!