Can I use ASP.NET Core SignalR Javascript file in my .NET Framework Web appplication? - signalr

I have a Web application that uses the .NET Framework. I created a separate ASP.NET Core web application to use as a SignalR server.
In the .NET Framework web app, I followed the Microsoft tutorial on adding the Javascript client libraries (#microsoft/signalr#latest).
The chat application is working, but then I saw this statement "ASP.NET Core SignalR isn't compatible with clients or servers for ASP.NET SignalR." Link
I get that there is no backwards compatibility, but is this also saying that if your application is using the .NET Framework, you must use ASP.NET SignalR for both client and server?
I found this SO answer which seems to indicate that it is okay, but I'm not sure what he means by "normal System.Web" pipeline.

Related

ASP .NET Web forms and Certificate Authentication

I've been searching the web like crazy for answers on how to use client certificates with an old asp .NET web form. We are building an Azure Key Vault and I can build an ASP .NET Core app and use client certificates no problem to access the key vault. But we also have some legacy websites here at my job and we don't have time to re-write these all so to start I can turn them into web applications because the only way to currently open them in Visual Studio is by opening VS going to File->Open->Web Site. I did a POC with one and while it took some time since I had to basically create a new web application then I copied the pages/code over to this web application. But I used ClientId/SecretID to access Azure Key Vault and this worked fine.
But we want to use client certificates and I'm at a loss as to how to do this with a webform. Everything I find on the web when I search is for ASP .NET Core or MVC, not .NET Framework 4.8 with aspx webforms.
These applications use global.asax and you can't use routing filters.
Is it even possible to use client certificates in webforms?

Can "old" ASP.Net SignalR be used in ASP.Net Core 3.x app?

You might ask why I would want to use old SignalR in ASP.Net Core. Well, I have an old MVC 4 app that I cannot completely rewrite and want to use it in conjunction with a new ASP.Net Core 3.1 app with the 2 apps potentially communicating via Web API and SignalR. Since ASP.Net SignalR is not compatible with Asp.Net Core SignalR I would need to run ASP.Net SignalR in my ASP.Net Core app. If this is not possible, then I certainly could not write the new app in ASP.Net and not ASP.Net Core. Just trying to understand possibilities.
After a little further work, I don't believe that this is possible

Does SignalR version difference matter between asp.net core and asp.net

I have an asp.net core web API application. This application broadcasts the message via SignalR.
And I have a .Net framework WPF client application. So I used asp.net signalr in this project to connect asp.net core signalR.
Is this a problem? Should those two projects be .net core application? Because connection is always failing.
When trying to communicate between a client and a server your SignalR should be the same version, so for example if your SignalR server is ASP.NET Core you need to use the ASP.NET core SignalR client. It works the other way arround as well so if the server is ASP.NET you need the ASP.NET client.

SignalR Core client on ASP.NET Framework server

I have an existing application running .NET Framework 4.6.1, that uses SignalR version 2.3. The client version I'm using is 2.0, this has a jQuery dependency. This current setup uses SignalR cors as my web front end is on a different domain to my backend services which is where my hubs lie. To be honest it's all working fine and I'm happy with it, even though you could say it's old tech.
This application has been rewritten relatively recently, but at the time the project was started, SignalR on .Net Core didn't exist, or it might have been in alpha so it wasn't considered an option.
I now have the need to add a new project to the solution, a front end dashboard. Where I work, for new development we use angular, and .Net Core. I thought this would be a good opportunity to try to introduce these new techs into the solution. The plan is to have an angular project and use the #aspnet/signalr npm package, I'll be using Typescript.
Now, the problem (if you haven't guessed already). I can't seem to get my new shiny SignalR client to work with my old Framework SignalR server. The error message is very specific when the call to SignalR is made:
Error: Detected a connection attempt to an ASP.NET SignalR Server. This client only supports connecting to an ASP.NET Core SignalR Server.
What are my options here? Am I going to have to upgrade the SignalR project and the projects that interact with SignalR to Core? Or is there something else that I can do I the meantime to give me more time to upgrade?
You have to use the Asp.Net Core Server with Asp.Net Core Client or use Asp.Net SignalR Server with Asp.Net SignalR Client. You cannot mix them, they won't work together.
Not sure of any work around for that. Checking the differences page it does say you can run CORE on .NET Framework 4.6.1 or later .NET Core 2.1 or later. You should still be able run Asp.Net SignalR on a server running .NET Framework 4.6.1 if that is available to you (yes, I know you said you are a angular/core shop).
Short of that... yes, you would need to rewrite your app for SignalR Core (server and client).

Sharepoint Provider Hosted Add In using .Net Core application

I am currently attempting to take an application that I have already created as a .Net CORE Application and connect it to Sharepoint Online in the form of a Provider Hosted Sharepoint Add In.
It seems that Sharepoint add ins can only recognise .Net Framework web applications which would result in having to port the .Net CORE application to a .Net Application.
I am seeking the easiest and cleanest way to proceed with this.
Is there a way that I can create a Provider Hosted app using .Net core or should I port the .NET Core application to a .Net Framework web application?
If so, how would you go about doing this?
Even we were trying to achieve the same thing. But we ended up in .net framework. To be on the safer side, you can create a provider hosted app using visual studio, which gives better connectivity to the Sharepoint App.
.Net core to .Net framework conversion would be so simple, since the framework holds most of the libraries and functionalities when compared to .Net core. You can just copy paste the code from your.net core and you can do modifications to fit in the framework.
Otherwise, you can use oauth tokens by using SharePoint Rest API's. If you have already built the provider hosted app and installed it in your site collection, you can just use the existing client id, client secret to get the access token like this. So that you can perform everything using your existing .Net core app.

Resources