2013-12-19 56 views
1

沒有發現我已經在服務器上以下SignalR樞紐類 -SignalR服務器方法上IIS

public int Send(string fromID, string fromName, string toID, string message) 
    { 
     // Implementation 
    } 


    public void Connected(string username, string userID) 
    {      
     // Implementation 
    } 

    public List<ChatUser> GetAllConnectedUsers() 
    { 
     // Implementation 
    } 


    public string CheckIfOpenChat(string strByID, string strWithID) 
    { 
     // Implementation 
    } 


    public int EndSession(string strByID, string strWithID) 
    { 
     // Implementation 
    } 

    public override Task OnDisconnected() 
    {  
     // Implementation 
    } 

在本地系統上,我看到所有的服務器方法 -

enter image description here

在IIS雖然,服務器方法如下 - enter image description here

似乎我很想念服務器在開發服務器上的Visual Studio中可見的IIS上的方法。

我產生hub.jsglobal.asax -

protected void Application_Start(object sender, EventArgs e) 
    { 
     RouteTable.Routes.MapHubs(); 
    } 

Chat.js - 我初始化到服務器的連接。

_chat = $.connection.chat; 
$.connection.hub.start().done(function() { // Implementation } 

編輯 - 重新啓動IIS以及。另外我的signalR版本是1.1.3

看起來好像生成的hub.js文件不包含指定的方法名稱。我認爲這將是緩存,但也清除了。

+0

您使用的是哪個版本的IIS?我認爲所有版本的IIS都不支持信號r(HTML5套接字)。 – Liam

+0

@Liam,版本8.0.9200 –

回答

0

這不是SignalR的錯誤。這個錯誤是由於VS 2012發佈的「不正確的發佈」造成的。由於某些原因,VS 2012沒有發佈最新的DLL。