To make it even easier to add IMS LTI support to your learning app, I wrapped LtiLibrary into its own NuGet Package. To add LtiLibrary to your application, run the following command in the Package Manager Console:
PM> Install-Package LtiLibrary
There is also an LtiLibrary.Sample package which adds sample MVC and Web Forms to an empty ASP.NET Web Application.
PM> Install-Package LtiLibrary.Sample
Using the LtiLibrary.Sample Package
Want to poke around a simple sample application? Try this:
- In Visual Studio start a New Project.
- Select the ASP.NET Web Application template:
- Select the Empty template and add folders and core references for Web Forms, MVC, and Web API:
- After the project is created, enter the following command in the Package Manager Console to install LtiLibrary.Sample:
- Run the project and click on the Launch link to launch a sample tool.
LtiLibrary.Sample has MVC, Web Forms, and Web API sample code that implements LTI 1.0, 1.1, and draft 1.2 services. Here is a table of contents for the sample files:
- LTI 1.0 Tool Consumer and Tool Provider
- MVC
- Tool Consumer
- Controllers\ConsumerController.cs
- Views\Consumer\Launch.cshtml
- Tool Provider
- Controllers\ProviderController.cs
- Views\Provider\Tool.cshtml
- Web Forms
- Tool Consumer
- WebForms\Launch.ashx
- Tool Provider
- WebForms\Tool.aspx
- Tool Consumer
- LTI 1.1 Outcomes Service
- Web API and MVC
- Tool Consumer
- Controllers\OutcomesApiController.cs
- Tool Provider
- Views\Provider\Outcomes.cshtml
- Tool Consumer
- Web API and MVC
- LTI 1.2 Tool Consumer Profile
- Web API
- Tool Consumer
- Controllers\ToolConsumerProfileApiController.cs
- Tool Consumer
- Web API
If you are looking for a more robust example of a Tool Consumer and Tool Provider, check out the LtiSamples code in CodePlex.
Let me know if you find this useful.
I followed the steps for installing LtiLibrary.Sample but am getting the follow error:
Parser Error Message: Could not load type ‘WebApplication5.WebForms.Default’.
Source Error:
Line 1:
Line 2:
Line 3:
Source File: /WebForms/Default.aspx Line: 1
Would you mind posting LtiLibrary questions over on http://ltisamples.codeplex.com?
Hi,
i did a test to connect the consumer to another provider (Big Blue Button),
the Asp .net MVC works very well, but not the Web Forms sample.
> for Asp .net MVC project i modified:
on ConsumerController/Launch() methode:
ConsumerKey = “***”,
ResourceLinkId = “launch”,
Url = new Uri(“******”)
and modify the secret key here
return View(ltiRequest.GetLtiRequestViewModel(“*******”)); and it works!
> i did the same thing in the Web Form project: on Launch.ashx.cs
and modify the secret key here: context.Response.WriteLtiRequest(ltiRequest, “****”);
but it doesn’t work 😦 , do you see something wrong…? or any suggestion please?
I’m sorry, but I’m not able to help debug your code.
Thank you for your answer, could you debeug with this values please?:
ConsumerKey =”bbb”,
ResourceLinkId = “launch”,
Url = new Uri(“http://test-install.blindsidenetworks.com/lti/tool.xml”)
context.Response.WriteLtiRequest(ltiRequest, “b00be971feb0726fa697671c9cf2e883”);
It Works on ie but not on chrome and firefox;
Sincerely.
i’ve done a test on IE 10 and it works, but not on chrome
Thank you for the sample, the WebForm works only on Internet Explorer and not with chrome and firefox.