0
为什么此代码在我的生产服务器中不起作用?此代码在本地开发系统中正确工作。我是否需要更改生产服务器中的任何设置?此代码在本地开发系统和本地IIS中工作,但在应用程序服务器中无法正常工作
$(function() {
alert('working fine');
$.connection.hub.logging = true;
var con = $.connection.hitCount;
var message = 'hai';
var name = 'suresh';
con.client.onHitRecorded = function(i) {
alert('not working'); // not firing
};
$.connection.hub.start().done(function() {
con.server.send(message, name);
alert('working fine');
});
})
请描述“不能正常工作”。你有什么错误吗?控制台中是否有任何消息?使用http调试器(如fiddler),你看到任何线索? –
所有脚本工作良好,但con.client.onHitRecorded = function(i){alert('not working'); // not firing };不发射这种方法 –
调试器不会con.client.onHitRecorded函数,但我没有得到任何错误。该功能不能正常工作,因为客户端方法没有调用,但服务器方法工作正常 –