LTI 1.3 Integration with ASP.NET MVC - c#

I need to integrate my ASP.NET MVC 5 web application(this is not a .Net core project) with LTI 1.3 version. Few examples found was developed with .Net Core projects. The LTI 1.3 Library in VS Nuget package manager is in Pre-release. Is it possible to integrate with ASP.NET MVC project? If anyone has built similar kind of solutions, Please provide you inputs.

Related

What is the difference between ASP.NET MVC 5, ASP.NET Core MVC 5?

I know that .NET Core 3.1 is followed by .NET 5 (this is by itself .net core).
I also know that .NET 4.8 is the last windows only (non .net core) framework.
So I think that ASP.NET MVC 5, ASP.NET Core MVC 5 are both the same. Is that correct?
https://en.wikipedia.org/wiki/ASP.NET_MVC
ASP.NET MVC 1.0 was released on 13 March 2009, not part of the .NET Framework, running on top of ASP.NET, which was then part of .NET Framework 3.5.
MVC's version did not correspond to .NET Framework/ASP.NET versioning. MVC went through version 2, 3 and 4 and ASP.NET MVC 5 was released on 17 October 2013. Meanwhile the .NET Framework went from 3.5 to 4.7, now 4.8 but will never reach a higher major version.
Then .NET Core started under the working title "vNext". It was .NET Core 1, then 2, then 3. .NET Core includes ASP.NET Core, which included ASP.NET Core MVC. This versioned along with its framework.
Now to prevent confusion, they didn't want to name the fourth version of .NET Core as 4, because that'd conflict (not on a filesystem level, but in the heads of developers) with .NET Framework 4. So they unified .NET Framework and .NET Core, and called it .NET 5.
.NET 5 includes ASP.NET Core 5, which includes ASP.NET Core MVC 5, which is not the same as ASP.NET MVC 5.
The old .NET Framework (currently 4.8) and ASP.NET MVC 5.2.7 are considered finished. Maybe they'll receive security patches, but you shouldn't do new development in it, and skip tutorials that mention it.
There are several difference between ASP.NET Core 5 and ASP.NET MVC 5 in the solution structure. The ASP.NET Core is a composable framework for implementing web and cloud based applications.
ASP .NET MVC 5 helps to choose the MVC or Web API and we can able to choose both while creating a web application. But in Core we can able to choose single-aligned web stack for MVC nad Web API.
The file structure are varies between them. the ASP.NET MVC 5 concicts of web.config, Global.asax files. But the Core does not contain these files instead it contains appsettings.json.
And the ASP .NET Core does not need IIS for hosting since it is to be cross-platform and it is self hosted.
In ASP.NET Core applications, dependency injection is inbuilt and no set up is needed for DI. But in ASP.NET MVC we want to use saparate DI container and then build up the project to use DI.

Using the preview versions of asp.net core mvc in a class libary

I am making an ASP.Net Core MVC app which handles multiple subdomains. Therefor I want to split up all Views/Controllers by their subdomain in a different project. What I am currently struggling at is referencing the latest pre-release of the ASP.Net Core framework in a .Net Core 3 Class Libary.
Now I do not know which nuget package I need to reference, in order to be able to have all the libraries needed for Controllers and Views.
I suspected that the Microsoft.AspNetCore.Mvc nuget package would be all I need, but it is version v2.2.0 instead of the pre-release one e.g. 3.0.0-preview9.19423.6.
In ASP.NET Core 3.0, MVC is part of the Shared Framework. The Microsoft.AspNetCore.Mvc package is one of many that will no longer be published separately.
To simplify the way in which consumers target and use the ASP.NET Core shared framework, we will stop producing many of the NuGet packages that we have been shipping since ASP.NET Core 1.0. The API those packages provide are still available to apps by using a <FrameworkReference> to Microsoft.AspNetCore.App. This includes commonly referenced API, such as Kestrel, Mvc, Razor, and others.
Reference: Breaking changes to Microsoft.AspNetCore.App in 3.0

ASP NET Core 2 with Full Framework

I am unable to find any documentation, or examples, of an ASP.NET MVC Core app running under the full framework. It is supposed to be supported, but as I said I cannot find any documentation of how to configure a project for this, and have not been able to work it out myself.
Has anyone got this working and can provide advice/sample on what needs to be done?
I am able to create/run ASP.NET Core 2.0 project with Full .NET framework 4.6.1, I followed below steps-
Created new project using ASP.NET Core web application under Web category-
On 2nd step, selected Web Application (Model-View-Controller)
csproj looks like this- <TargetFramework>net461</TargetFramework>
My Environment is-
Visual Studio 2017 Community 15.3.3 version
.NET Core 2.0 SDK

Difference between ASP.NET Core (.NET Core) and ASP.NET Core (.NET Framework)

What is the difference between ASP.NET Core Web (.NET Core) vs ASP.NET Core Web (.NET Framework)?
and does .NET Framework provide similar performance as to .NET Core?
This can be confusing at first, but it's important to remember: at the end of the day, "ASP.NET Core" is just a bunch of NuGet packages that can be installed in your project.
ASP.NET Core on .NET Core is cross-platform ASP.NET Core. It can run on Windows, Mac, and Linux (including Docker). The server doesn't need .NET Core installed - the dependencies can be bundled with the application.
ASP.NET Core on .NET Framework is ASP.NET Core on the "full" or "desktop" .NET Framework (e.g. .NET Framework 4.6.2). These applications can only run on Windows, but everything else about ASP.NET Core behaves the same way.
According to the benchmarks you linked, both will have higher performance than ASP.NET 4.6, although .NET Core is currently the highest:
ASP.NET 4.6: <50k req/sec
ASP.NET Core (CLR): 400k req/sec
ASP.NET Core (.NET Core, Linux): 900k req/sec
ASP.NET Core (.NET Core, Windows): >1.1m req/sec
However, these benchmarks are slightly older (February 2016) and reflect pre-RTM code. I wouldn't be surprised if they've improved since then.
ASP.NET Core with .NetCore is a cross-platform (it can run on Windows, Linux or other platforms), high-performance, open-source framework for building modern, cloud-based, Internet-connected applications. It has ability to host on IIS, Nginx, Apache, Docker, or self-host in your own process.
ASP.NET Core ships entirely as NuGet packages. This allows you to optimize your app to include only the necessary NuGet packages. In fact, ASP.NET Core 2.x apps targeting .NET Core only require a single NuGet package. The benefits of a smaller app surface area include tighter security, reduced servicing, and improved performance.
It is not required to install .Net framework to run asp.net core with .net core application.
An ASP.NET Core application with .net core is a console app that creates a web server in its Main method. It uses Kestrel web server to run the application.
We can also use editors such Visual Studio Code, Atom to run the application.
It doesn't support Aspx, WPF, WCF and WebServices as if now.
It supports inbuilt dependency injection.
Uses coreclr which is the runtime in asp.net core with .net core.
Asp.Core with .Net framework .Net framework on the other hand started much before 2005 and it kept on adding new features making it a bit complex framework and heavier. It is not cross platform.
It supports Aspx, WPF, WCF and WebServices
.Net Framework excecution plan
.Net core exceution plan
ASP.NET CORE using .NET Core - all dependencies are self-contained, can use most nuget packages, cant use windows specific packages, can execute on windows, linux, Mac
ASP.NET CORE using .NET Framework - most dependencies are self-contained, only executes on windows, will have access to windows specific nuget packages, needs the .net framework version which is targeted installed on the machine

Difference between using the ASP.NET Core Web Application (.NET Core) with net461 set as the only framework and using the (.NET Framework) template

With the release of .NET Core RC2 Microsoft made it so there are now 3 Web Application templates:
ASP.NET Web Application (.NET Framework) — The old
ASP.NET Core Web Application (.NET Framework) — the new, to be hosting on Windows only
ASP.NET Core Web Application (.NET Core) — Linux, OSX, Windows
I am trying to use the new Core Web Application template but without trying to target Linux, OSX, Windows so it seems like the ASP.NET Core Web Application (.NET Framework) is perfect for me. It took me a while but I learned that in order to add a class library that will work with this project type you need to add a Class Library (.NET Core) and change the frameworks section to only be net461 to match the Web Application.
"frameworks": {
"net461": { }
}
My Question:
What is the difference between creating an ASP.NET Core Web Application (.NET Core) and in project.json making net461 the only target framework
and
just creating an ASP.NET Core Web Application (.NET Framework) project which only includes net461 by default.
Are there other differences that I am not aware of like the way the projects are published, etc.?
What is the difference between creating a ASP.NET Core Web Application
(.NET Core) and in project.json making.NET461 the only target
Framework
It's the same thing as making an ASP.NET Core Web Application (.NET Framework) project. The type of project between the two is determined by the .csproj file and you changed it in your .csproj from targeting .NET Core to targeting the .NET Framework. In previous release/beta versions of ASP.NET Core it was possible to have both Frameworks in a project.json file (which has been replaced by a simplified .csproj file in .NET Core 2.0 which more .NET developers are familiar with) but you could only publish to one.
just creating a ASP.NET Core Web Application (.NET Framework) project which only includes.NET461 by default.
Are there other difference that I am not aware of like the way the the projects are published, etc
If you target the .NET Framework and not .NET Core your app cannot be cross platform and your app can only run on Windows and not Linux/Mac.
The reason for there being separate ASP.NET Core Web Application (.NET Core) and ASP.NET Core Web Application (.NET Framework) is because the latter allows you to make use of functions, packages or 3rd party libraries that are dependent on Windows and the same .NET Framework or higher will be required to be installed on the machine.
The former doesn't have the .NET Framework requirement but allows your app to be cross platform and when you publish your app it publishes all the dependent .NET Core dll files to the publish directory in that way circumventing the .NET Framework installation requirement.
It will also affect compilation as if you target .NET Core and make use of a Windows specific function or package you will get a compilation error.
You can easily switch between the two by adjusting your .csproj to target the one or the other.
Microsoft Docs
You should use .NET Core for your server application when:
You have cross-platform needs.
You are targeting microservices.
You are using Docker containers.
You need high performance and scalable systems.
You need side by side of .NET versions by application.
You should use .NET Framework for your server application when:
Your application currently uses .NET Framework (recommendation is to extend instead of migrating)
You need to use third-party .NET libraries or NuGet packages not available for .NET Core.
You need to use .NET technologies that are not available for .NET Core.
You need to use a platform that doesn’t support .NET Core.
Update (2018/10/30)
It has been announced that ASP.Net Core 3 which has a release date in 2019 Q1, will only support .NET Core and NOT .NET Framework
As announced on the .NET Blog earlier this month, .NET Framework will get fewer of the newer platform and language features that come to .NET Core moving forward, due to the in-place update nature of .NET Framework and the desire to limit changes there that might break existing applications. To ensure ASP.NET Core can fully leverage the improvements coming to .NET Core moving forward, ASP.NET Core will only run on .NET Core starting from 3.0. Moving forward, you can simply think of ASP.NET Core as being part of .NET Core.
Customers utilizing ASP.NET Core on .NET Framework today can continue to do so in a fully supported fashion using the 2.1 LTS release. Support and servicing for 2.1 will continue until at least August 21, 2021 (3 years after its declaration as an LTS release) in accordance with the .NET Support Policy.
First see the difference in project.json files when you create ASP.NET Core Web Applications targeting different frameworks.
As per your question, if you change the framework in ASP.NET Core Web Application(.NET Core) project.json only to have net461 and save, it'll restore the packages and will give the following error.
If you remove Microsoft.NETCore.App dependency and saves the file, It'll again restore the dependencies and won't give any error.
If you notice the first image, this has finally become a ASP.NET Core Web Application with .NET Framework.
I was confused at first as well. The main difference is that ASP.NET Web Application (.NET Framework) is the normal asp.net that we have been using. It contains App_Start folder web.config, Global.asax etc.. (Like MVC5,You get the idea..).
Whereas ASP.NET Core Web Application (.NET Framework) is a core framework(MVC6). (Not dependent on System.Web). Brand new project.json.. startup.cs and program.cs etc... And it supports all the old libraries of .net framework as well.
with .net core, you can run your web pages application in Linux or mac os whereas the .net will only be good for windows, i.e. less portable.

Categories

Resources