Sharepoint Provider Hosted Add In using .Net Core application - asp.net

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.

Related

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

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.

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

Bot Framework asp.net core

As we all know that Asp.net WEB API is not a good option to use when working with front end of a web application. And Bot Framework template is based on WEB API I'm developing a bot but I want to use mvc or .net core instead of web api.
can we do so ?
if yes what changes I have to make for that in other templates LIKE MVC or .NET Core?
Your question a little bit confusing.
ASP .NET Web API based on MVC. The connector client already support .NET Standard as far I know. .NET Core port is in progress but here is basic port from the main repo. Most of the stuff inside the bot builder uses simple API because, this a connector to your 3rd parties ( slack , skype etc ).

No Individual User Accounts auth option in ASP.NET Core Web API template

I am a bit confused as to why there is no Individual User Accounts authentication option in the latest ASP.NET Core Web API template.
Is it still possible to implement individual user accounts the way that the MVC template does or would it not make sense?
Let's say I am creating a stand-alone web API that is going to have all of my business logic and data layer that accesses the database which has the AspNet Identity tables. I plan on making calls to this API w/ an MVC app.
I know one way of doing this is to create an asp.net MVC app w/ individual user accounts auth and simply build the API right within the MVC app using a controllers/api folder. However, I don't want to do it this way because I want the API to be its own standalone project that can be hosted on a completely different server and accessed by multiple applications, not just an MVC app.
Can someone lead me in the right direction on how authentication typically works in this scenario since there is no template?
Individual User Accounts authentication option for the ASP.NET Core Web API is available in .NET Core 2.0 Preview 1.
Unfortunately .NET Core 2.0 Preview 1 isn't available in VS 2017 release.
But you can install Visual Studio 2017 Preview (you can use it side-by-side with VS 2017 stable version) :
I think you can use IdentityServer4 which allows implementing single sign-on and access control for ASP .NET Core Web APIs using protocols like OpenID Connect and OAuth2. It offers integration with ASP.NET Core Identity and Entity Framework Core.
You will need to install to the following nuget package:
Install-Package IdentityServer4
and add the IdentityServer middleware to the HTTP pipeline:
app.UseIdentityServer();
You can find several quick start samples here or follow this article.

Resources