MicrosoftDocs / azure-docs

Open source documentation of Microsoft Azure
https://docs.microsoft.com/azure
Creative Commons Attribution 4.0 International
10.29k stars 21.47k forks source link

More guidance around migrating from SignalR (.NET Framework) to Azure SignalR #93256

Open samaea opened 2 years ago

samaea commented 2 years ago

Hi all,

Those migrating over from SignalR Asp.net (.NET Framework) will typically have configured a custom SignalR endpoint path (instead of the default /signalr path). As such, it would be useful to include an example of doing this to make their clients compatible without further code changes.

An example below shows this:-

        public void Configuration(IAppBuilder app)
        {
            // Maps the SignalR path endpoint to /monitorhub instead of the default /signalr

            app.MapAzureSignalR("/monitorhub", this.GetType().FullName, new HubConfiguration());

        }

Another item of feedback which would be useful to incorporate is what frontend changes need to happen in order to get it working with Azure SignalR. In my scenario, I had to update the jQuery Signal library from 2.1.0 to 2.4.1, otherwise the connection would fail (even though this works when SignalR is hosted locally).

Thanks, Sam


Document Details

Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.

AjayKumar-MSFT commented 2 years ago

@samaea, Thanks for the feedback! I have assigned the issue to the content author to review further and update the document as appropriate.