This will walk you through creating a Crazor App Project using Blazor.
Cards are part of card applications and they are hosted in a ASP.NET web service. There are two easy ways of creating a new hosting service.
Create a Crazor App Server project
NOTE: you can alternatively create the project from the cli by using
dotnet new crazorserver
For bots to work with Teams and other apps they need a public addressable endpoint. Dev tunnels does exactly that, so we will create a dev tunnel with the following options:
- TunnelType=Persistant
- Access=Public
Run the project. You will be launched a on page like https://jx4wclpb-7232.usw2.devtunnels.ms/. You will have an error, but that's OK. We just want to get the url for your project. Copy that and save it off someplace.
Click on your devtunnel settings to manage the tunnel:
Make sure that Use Tunnnel Domain is turned on:
(ALTERNATIVE) Create a public tunnel using ngrok.io
ngrok http --host-header=preserve https://localhost:7232
The URL it creates will look something like this:
https://1a52-50-35-77-214.ngrok-free.app
In the same folder as your csproj, run RegisterBot tool to create a development bot called MyBot-Dev.
registerbot --name MyBot-Dev --endpoint https://jx4wclpb-7232.usw2.devtunnels.ms/
NOTE: By convention we use {BOTNNAME}-Dev because when we publish to production we want to register {BOTNAME} as the production bot
You should see this:
And if you click on the card you should see this:
- Card Views - How to define views with CardView with Blazor
- Card Apps - How to create a CardApp class to define state and operations against state.
- Card App Memory - Information on persistence and memory model
- Card Routing - Information on customizing urls to support deep linking into cards
- Authentication - Authenticating users and Authorizing access to create per-user secure views
- Writing Unit tests - Writing unit tests for your cards.
- Components (Advanced) - How to define reusable components via Blazor Components