signalr hub:获取内部服务器错误,解析值时遇到意外字符:%

时间:2017-11-10 07:49:57

标签: c# asp.net signalr signalr-hub

这是c#hub代码:

<body>
    <form id="form1" runat="server">
    <div>
        <div id="hitCount" style="font-size: 200px;">
            abc
        </div>
    </div>
    </form>

    <script src="Scripts/jquery-1.6.4.js"></script>
    <script src="Scripts/jquery.signalR-2.2.2.js"></script>

    <script type="text/javascript">
        $(function () {
            var con = $.hubConnection();
            var hub = con.createHubProxy('hitCounter');
            hub.on('onHitRecorded', function (i) {
                $('#hitCount').text(i);
            });
            con.start(function () {
                hub.invoke('recordHit');
            });
        })
    </script>
</body>

这是aspx正文代码:

&#13;
&#13;
{{1}}
&#13;
&#13;
&#13;

我在此页面上收到以下错误:&#34;解析值时遇到意外字符:%。路径&#39;&#39;,第0行,第0位。&#34;

enter image description here

0 个答案:

没有答案