Click here to Skip to main content
15,890,282 members
Home / Discussions / Web Development
   

Web Development

 
QuestionHow do I enable a multiple file compression from server side Pin
5atyam5rivastava10-Jul-16 5:45
5atyam5rivastava10-Jul-16 5:45 
AnswerRe: How do I enable a multiple file compression from server side Pin
Afzaal Ahmad Zeeshan22-Jul-16 8:28
professionalAfzaal Ahmad Zeeshan22-Jul-16 8:28 
QuestionXML - Facebook Like Button Pin
EnjoY_Y9-Jul-16 14:39
EnjoY_Y9-Jul-16 14:39 
AnswerRe: XML - Facebook Like Button Pin
Afzaal Ahmad Zeeshan22-Jul-16 8:24
professionalAfzaal Ahmad Zeeshan22-Jul-16 8:24 
QuestionNeed Help With Hosting SignalR Pin
Kevin Marois8-Jul-16 10:55
professionalKevin Marois8-Jul-16 10:55 
AnswerRe: Need Help With Hosting SignalR Pin
Richard Deeming11-Jul-16 8:09
mveRichard Deeming11-Jul-16 8:09 
GeneralRe: Need Help With Hosting SignalR Pin
Kevin Marois11-Jul-16 8:11
professionalKevin Marois11-Jul-16 8:11 
GeneralRe: Need Help With Hosting SignalR Pin
Richard Deeming11-Jul-16 8:15
mveRichard Deeming11-Jul-16 8:15 
Are you not seeing the same page that I am? Confused | :confused:

Setup
Go to NuGet and install the SignalR package into a WebApplication:
Install-Package Microsoft.AspNet.SignalR


Server
Create a class that derives from PersistentConnection:
C#
using System.Threading.Tasks;
using Microsoft.AspNet.SignalR;

public class MyConnection : PersistentConnection 
{
    protected override Task OnReceived(IRequest request, string connectionId, string data) 
    {
        // Broadcast data to all clients
        return Connection.Broadcast(data);
    }
}


Setup Routing
Make a route for your connection:

Global.asax
C#
using System;
using System.Web.Routing;

public class Global : System.Web.HttpApplication 
{
    protected void Application_Start(object sender, EventArgs e) 
    {
        RouteTable.Routes.MapConnection<MyConnection>("echo", "/echo");
    }
}

If you are setting up other routes, the SignalR mapping needs to be done before the other ones.

If you follow that, then you should end up with your SignalR code hosted in IIS. Was that not what you were asking?



"These people looked deep within my soul and assigned me a number based on the order in which I joined."
- Homer


GeneralRe: Need Help With Hosting SignalR Pin
Kevin Marois11-Jul-16 8:17
professionalKevin Marois11-Jul-16 8:17 
GeneralRe: Need Help With Hosting SignalR Pin
Richard Deeming11-Jul-16 8:19
mveRichard Deeming11-Jul-16 8:19 
GeneralRe: Need Help With Hosting SignalR Pin
Kevin Marois11-Jul-16 8:24
professionalKevin Marois11-Jul-16 8:24 
QuestionFind Nearby Offers Pin
Jassim Rahma7-Jul-16 14:42
Jassim Rahma7-Jul-16 14:42 
QuestionDeprecated: Function split() is deprecated Pin
Jassim Rahma7-Jul-16 14:17
Jassim Rahma7-Jul-16 14:17 
AnswerRe: Deprecated: Function split() is deprecated Pin
Richard MacCutchan7-Jul-16 20:24
mveRichard MacCutchan7-Jul-16 20:24 
Questionwhy invalid IP is valid? Pin
Jassim Rahma7-Jul-16 13:53
Jassim Rahma7-Jul-16 13:53 
AnswerRe: why invalid IP is valid? Pin
Richard MacCutchan7-Jul-16 21:07
mveRichard MacCutchan7-Jul-16 21:07 
QuestionAlign controls left and right in sub div Pin
Mr Carl Cummings7-Jul-16 7:58
Mr Carl Cummings7-Jul-16 7:58 
QuestionDoes Sitefinity CMS support SAML 2.0 ? Pin
Member 10977363-Jul-16 19:27
Member 10977363-Jul-16 19:27 
AnswerRe: Does Sitefinity CMS support SAML 2.0 ? Pin
Peter_in_27803-Jul-16 19:59
professionalPeter_in_27803-Jul-16 19:59 
GeneralRe: Does Sitefinity CMS support SAML 2.0 ? Pin
Member 10977363-Jul-16 20:44
Member 10977363-Jul-16 20:44 
GeneralRe: Does Sitefinity CMS support SAML 2.0 ? Pin
Member 10977363-Jul-16 20:45
Member 10977363-Jul-16 20:45 
AnswerRe: Does Sitefinity CMS support SAML 2.0 ? Pin
Peter_in_27803-Jul-16 20:50
professionalPeter_in_27803-Jul-16 20:50 
AnswerRe: Does Sitefinity CMS support SAML 2.0 ? Pin
Kimberly Weldon4-Jul-16 2:25
Kimberly Weldon4-Jul-16 2:25 
GeneralRe: Does Sitefinity CMS support SAML 2.0 ? Pin
Member 10977364-Jul-16 20:28
Member 10977364-Jul-16 20:28 
Questionhtaccess issues Pin
V.30-Jun-16 23:41
professionalV.30-Jun-16 23:41 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.