You are on page 1of 4

Config SignalR in Asp.

Net Project

- Add new project with web

-Install SignalR

This package pulls in the server components and JavaScript client required to use SignalR in an ASP.NET application.

To install Microsoft ASP.NET SignalR, run the following command in the Package Manager Console
PM> Install-Package Microsoft.AspNet.SignalR
-Config in Project Asp.net
Imports Microsoft.AspNet.SignalR

Public Class chatHub


Inherits Hub

Dim sql As String

Public Overrides Function OnConnected() As Threading.Tasks.Task


SendEmail("kimhak@ucb.com.kh")
Return MyBase.OnConnected()
End Function

Public Sub Hello()


Clients.All.Hello()
End Sub

Public Sub SendEmail(toEmail As String)


Dim email As String = "Get Email"
Clients.All.getEmail(toEmail, email)

End Sub

End Class

You might also like