<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>Forem: Nikhil Panchabhai</title>
    <description>The latest articles on Forem by Nikhil Panchabhai (@nikhil_panchabhai).</description>
    <link>https://forem.com/nikhil_panchabhai</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F3820346%2F4d72bff6-ffb7-431c-971e-06442720b765.png</url>
      <title>Forem: Nikhil Panchabhai</title>
      <link>https://forem.com/nikhil_panchabhai</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://forem.com/feed/nikhil_panchabhai"/>
    <language>en</language>
    <item>
      <title>Getting Started with Azure Bot Framework — Build Your First Bot in C#</title>
      <dc:creator>Nikhil Panchabhai</dc:creator>
      <pubDate>Thu, 26 Mar 2026 14:52:41 +0000</pubDate>
      <link>https://forem.com/nikhil_panchabhai/getting-started-with-azure-bot-framework-build-your-first-bot-in-c-464b</link>
      <guid>https://forem.com/nikhil_panchabhai/getting-started-with-azure-bot-framework-build-your-first-bot-in-c-464b</guid>
      <description>&lt;p&gt;&lt;em&gt;By Nikhil | Azure Developer | Bot Framework Enthusiast&lt;/em&gt;&lt;/p&gt;




&lt;h2&gt;
  
  
  Introduction
&lt;/h2&gt;

&lt;p&gt;So I was working on a project where I had to build a chatbot that could talk to users, understand what they are asking, and reply back intelligently. That is when I got introduced to &lt;strong&gt;Azure Bot Framework&lt;/strong&gt; and &lt;strong&gt;Azure Bot Service&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;Honestly, when I first started, I was confused — is Bot Framework and Bot Service the same thing? What is a Dialog? Why is there something called a Turn? It took me some time to connect all the dots.&lt;/p&gt;

&lt;p&gt;In this blog I will try to explain everything from scratch — the way I wish someone had explained it to me when I started. I will keep it simple and practical so even if you are completely new to this, you can follow along.&lt;/p&gt;

&lt;p&gt;Let's get started!&lt;/p&gt;




&lt;h2&gt;
  
  
  What is a Bot Anyway?
&lt;/h2&gt;

&lt;p&gt;Before we jump into Azure stuff, let me explain what a bot actually is in simple terms.&lt;/p&gt;

&lt;p&gt;A &lt;strong&gt;bot is just an application that can have a conversation with a user&lt;/strong&gt;. Instead of a user clicking buttons and filling forms, they just type (or speak) naturally — and the bot understands and responds.&lt;/p&gt;

&lt;p&gt;Some real world examples:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Customer support chatbot on a bank website&lt;/li&gt;
&lt;li&gt;HR bot inside Microsoft Teams that answers employee queries&lt;/li&gt;
&lt;li&gt;E-commerce bot that helps you track your order&lt;/li&gt;
&lt;li&gt;Flight booking bot that asks you where you want to go&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Bots are becoming very common in enterprise applications because they save time and reduce manual effort.&lt;/p&gt;




&lt;h2&gt;
  
  
  Azure Bot Framework vs Azure Bot Service — Are They Same?
&lt;/h2&gt;

&lt;p&gt;This was my first confusion when I started. Let me clear it up.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Bot Framework&lt;/strong&gt; is Microsoft's open source &lt;strong&gt;SDK&lt;/strong&gt; (Software Development Kit) that you use to &lt;strong&gt;write the bot logic&lt;/strong&gt;. Think of it as the toolkit you use to build your bot. It is available in C#, JavaScript and Python.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Azure Bot Service&lt;/strong&gt; is the &lt;strong&gt;cloud platform&lt;/strong&gt; on Azure that &lt;strong&gt;hosts and manages&lt;/strong&gt; your bot. It connects your bot to different channels like Web Chat, Microsoft Teams, Slack etc.&lt;/p&gt;

&lt;p&gt;Simple way to remember:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Bot Framework SDK  =  You build the bot here (code)
Azure Bot Service  =  You deploy and manage the bot here (cloud)
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;You build with Bot Framework and then deploy through Azure Bot Service. They work together but they are different things.&lt;/p&gt;




&lt;h2&gt;
  
  
  Architecture Overview
&lt;/h2&gt;

&lt;p&gt;Before writing any code, it is good to understand how all the pieces fit together.&lt;/p&gt;

&lt;p&gt;Here is what happens when a user sends a message:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;User types a message on Web Chat or Teams&lt;/li&gt;
&lt;li&gt;Message reaches &lt;strong&gt;Azure Bot Service&lt;/strong&gt;
&lt;/li&gt;
&lt;li&gt;Bot Service authenticates the request and converts it into a standard format&lt;/li&gt;
&lt;li&gt;Bot Service sends the message to your &lt;strong&gt;Bot API&lt;/strong&gt; (your C# code)&lt;/li&gt;
&lt;li&gt;Your bot processes the message and generates a reply&lt;/li&gt;
&lt;li&gt;Reply goes back to Bot Service&lt;/li&gt;
&lt;li&gt;Bot Service delivers it to the user on their channel&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;The beauty of this is — your bot code stays the same regardless of which channel the user is on. Bot Service handles all the translation.&lt;/p&gt;




&lt;h2&gt;
  
  
  Prerequisites
&lt;/h2&gt;

&lt;p&gt;Before we start, make sure you have these installed:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Visual Studio 2022&lt;/strong&gt; with Azure development workload&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Azure Account&lt;/strong&gt; (free tier works fine for practice)&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;ngrok&lt;/strong&gt; — for exposing your local bot to internet during development&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;.NET 6 or higher&lt;/strong&gt;&lt;/li&gt;
&lt;/ul&gt;




&lt;h2&gt;
  
  
  Step 1 — Create Your First Bot Project
&lt;/h2&gt;

&lt;p&gt;Open Visual Studio 2022 and follow these steps:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Click &lt;strong&gt;Create a new project&lt;/strong&gt;
&lt;/li&gt;
&lt;li&gt;Search for &lt;strong&gt;Bot Framework&lt;/strong&gt;
&lt;/li&gt;
&lt;li&gt;Select &lt;strong&gt;Core Bot&lt;/strong&gt; template&lt;/li&gt;
&lt;li&gt;Give it a name like &lt;code&gt;MyFirstBot&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;Click &lt;strong&gt;Create&lt;/strong&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Feqflv9trs4kodhgfovc3.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Feqflv9trs4kodhgfovc3.png" alt="Architecture diagram showing User → Channel → Azure Bot Service → ngrok → Bot API → Bot Logic" width="800" height="543"&gt;&lt;/a&gt;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Visual Studio will generate a complete bot project for you with a proper folder structure.&lt;/p&gt;




&lt;h2&gt;
  
  
  Step 2 — Understanding the Project Structure
&lt;/h2&gt;

&lt;p&gt;When you open the generated project, you will see something like this:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fdk6g2t9bi3l9kwofo0qx.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fdk6g2t9bi3l9kwofo0qx.png" alt="Visual Studio Solution Explorer showing CoreBot project structure" width="800" height="420"&gt;&lt;/a&gt;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Let me explain the important files:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;&lt;code&gt;appsettings.json&lt;/code&gt;&lt;/strong&gt; — This is where you put your Azure credentials like App ID, Password and Tenant ID.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;&lt;code&gt;Startup.cs&lt;/code&gt;&lt;/strong&gt; — This is where all services are registered including State, Dialogs and the Bot adapter.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;&lt;code&gt;Controllers/BotController.cs&lt;/code&gt;&lt;/strong&gt; — This is the entry point. All incoming messages hit the &lt;code&gt;/api/messages&lt;/code&gt; endpoint here.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;&lt;code&gt;Bots/DialogBot.cs&lt;/code&gt;&lt;/strong&gt; — This is the main bot class that receives activities and passes them to dialogs.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;&lt;code&gt;Dialogs/MainDialog.cs&lt;/code&gt;&lt;/strong&gt; — This is where your conversation logic lives.&lt;/p&gt;




&lt;h2&gt;
  
  
  Step 3 — Key Concepts You Must Know
&lt;/h2&gt;

&lt;p&gt;Let me explain the most important concepts before we go further.&lt;/p&gt;

&lt;h3&gt;
  
  
  What is an Activity?
&lt;/h3&gt;

&lt;p&gt;Everything that happens in a conversation is called an &lt;strong&gt;Activity&lt;/strong&gt;. When a user sends a message — that is an Activity. When a user joins the conversation — that is also an Activity. Even the typing indicator is an Activity.&lt;/p&gt;

&lt;p&gt;The most common Activity type is &lt;code&gt;message&lt;/code&gt; — which carries the actual text from the user.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight csharp"&gt;&lt;code&gt;&lt;span class="c1"&gt;// You can check the Activity type like this&lt;/span&gt;
&lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;turnContext&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;Activity&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;Type&lt;/span&gt; &lt;span class="p"&gt;==&lt;/span&gt; &lt;span class="n"&gt;ActivityTypes&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;Message&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="c1"&gt;// User sent a message&lt;/span&gt;
    &lt;span class="kt"&gt;var&lt;/span&gt; &lt;span class="n"&gt;userMessage&lt;/span&gt; &lt;span class="p"&gt;=&lt;/span&gt; &lt;span class="n"&gt;turnContext&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;Activity&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;Text&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;blockquote&gt;
&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fntop615ghk3u1ein6fxk.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fntop615ghk3u1ein6fxk.png" alt="Actual BotController.cs code from Visual Studio" width="800" height="419"&gt;&lt;/a&gt;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;h3&gt;
  
  
  What is a Turn?
&lt;/h3&gt;

&lt;p&gt;A &lt;strong&gt;Turn&lt;/strong&gt; is one complete round of conversation — the user sends one message and the bot sends one reply. That entire exchange is called a Turn.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;User: "Hi"           ← Start of Turn 1
Bot:  "Hello!"       ← End of Turn 1

User: "Book a flight" ← Start of Turn 2
Bot:  "Where to?"    ← End of Turn 2
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  What is TurnContext?
&lt;/h3&gt;

&lt;p&gt;&lt;strong&gt;TurnContext&lt;/strong&gt; is an object that is available during the entire Turn. It contains the incoming message, and methods to send a reply back.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight csharp"&gt;&lt;code&gt;&lt;span class="c1"&gt;// TurnContext gives you everything about the current turn&lt;/span&gt;
&lt;span class="k"&gt;public&lt;/span&gt; &lt;span class="k"&gt;async&lt;/span&gt; &lt;span class="n"&gt;Task&lt;/span&gt; &lt;span class="nf"&gt;OnTurnAsync&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;ITurnContext&lt;/span&gt; &lt;span class="n"&gt;turnContext&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; 
    &lt;span class="n"&gt;CancellationToken&lt;/span&gt; &lt;span class="n"&gt;cancellationToken&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="c1"&gt;// Read user message&lt;/span&gt;
    &lt;span class="kt"&gt;var&lt;/span&gt; &lt;span class="n"&gt;userMessage&lt;/span&gt; &lt;span class="p"&gt;=&lt;/span&gt; &lt;span class="n"&gt;turnContext&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;Activity&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;Text&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

    &lt;span class="c1"&gt;// Send reply&lt;/span&gt;
    &lt;span class="k"&gt;await&lt;/span&gt; &lt;span class="n"&gt;turnContext&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;SendActivityAsync&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s"&gt;"Hello! How can I help?"&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;blockquote&gt;
&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F06x2lstm4x7ks09njudn.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F06x2lstm4x7ks09njudn.png" alt="DialogBot.cs OnTurnAsync method from Visual Studio" width="800" height="420"&gt;&lt;/a&gt;&lt;/p&gt;
&lt;/blockquote&gt;




&lt;h2&gt;
  
  
  Step 4 — Understanding Dialogs
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;Dialogs&lt;/strong&gt; are reusable components that manage a specific conversation flow. Think of a Dialog as a function that handles one specific task — like a registration flow, booking flow, or FAQ flow.&lt;/p&gt;

&lt;h3&gt;
  
  
  Types of Dialogs
&lt;/h3&gt;

&lt;p&gt;&lt;strong&gt;WaterfallDialog&lt;/strong&gt; — This is a step by step linear dialog. Each step asks something and moves to the next step.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight csharp"&gt;&lt;code&gt;&lt;span class="c1"&gt;// WaterfallDialog example — step by step flow&lt;/span&gt;
&lt;span class="nf"&gt;AddDialog&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="k"&gt;new&lt;/span&gt; &lt;span class="nf"&gt;WaterfallDialog&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="k"&gt;nameof&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;WaterfallDialog&lt;/span&gt;&lt;span class="p"&gt;),&lt;/span&gt; &lt;span class="k"&gt;new&lt;/span&gt; &lt;span class="n"&gt;WaterfallStep&lt;/span&gt;&lt;span class="p"&gt;[]&lt;/span&gt;
&lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="n"&gt;AskNameStepAsync&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;    &lt;span class="c1"&gt;// Step 1: Ask name&lt;/span&gt;
    &lt;span class="n"&gt;AskAgeStepAsync&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;     &lt;span class="c1"&gt;// Step 2: Ask age&lt;/span&gt;
    &lt;span class="n"&gt;ConfirmStepAsync&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;    &lt;span class="c1"&gt;// Step 3: Confirm details&lt;/span&gt;
    &lt;span class="n"&gt;FinalStepAsync&lt;/span&gt;       &lt;span class="c1"&gt;// Step 4: Save and finish&lt;/span&gt;
&lt;span class="p"&gt;}));&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;ComponentDialog&lt;/strong&gt; — This is a container that groups related dialogs together. Your MainDialog is a ComponentDialog.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;PromptDialogs&lt;/strong&gt; — These are specialized dialogs for collecting specific types of input from user:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;code&gt;TextPrompt&lt;/code&gt; — for any text input&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;NumberPrompt&lt;/code&gt; — for numbers only&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;ChoicePrompt&lt;/code&gt; — for multiple choice options&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;ConfirmPrompt&lt;/code&gt; — for yes/no questions&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;DateTimePrompt&lt;/code&gt; — for dates and times&lt;/li&gt;
&lt;/ul&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Furziyw38dnd2iud8zhnv.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Furziyw38dnd2iud8zhnv.png" alt="DialogBot.cs OnTurnAsync method from Visual Studio" width="800" height="450"&gt;&lt;/a&gt;&lt;/p&gt;
&lt;/blockquote&gt;




&lt;h2&gt;
  
  
  Step 5 — State Management
&lt;/h2&gt;

&lt;p&gt;This is a very important concept. By default, a bot has no memory — every Turn is independent. If you ask the user their name in Turn 1, the bot will forget it by Turn 2.&lt;/p&gt;

&lt;p&gt;That is where &lt;strong&gt;State Management&lt;/strong&gt; comes in.&lt;/p&gt;

&lt;p&gt;Bot Framework provides three types of state:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;UserState&lt;/strong&gt; — Remembers data for a specific user across all conversations. Good for storing user profile, preferences etc.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;ConversationState&lt;/strong&gt; — Remembers data for the current conversation. Good for tracking which step of a dialog the user is on.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;PrivateConversationState&lt;/strong&gt; — Remembers data that is private to one user in one specific conversation.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight csharp"&gt;&lt;code&gt;&lt;span class="c1"&gt;// Register state in Startup.cs&lt;/span&gt;
&lt;span class="n"&gt;services&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;AddSingleton&lt;/span&gt;&lt;span class="p"&gt;&amp;lt;&lt;/span&gt;&lt;span class="n"&gt;IStorage&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;MemoryStorage&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;();&lt;/span&gt; &lt;span class="c1"&gt;// Use for local dev only&lt;/span&gt;
&lt;span class="n"&gt;services&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;AddSingleton&lt;/span&gt;&lt;span class="p"&gt;&amp;lt;&lt;/span&gt;&lt;span class="n"&gt;UserState&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;();&lt;/span&gt;
&lt;span class="n"&gt;services&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;AddSingleton&lt;/span&gt;&lt;span class="p"&gt;&amp;lt;&lt;/span&gt;&lt;span class="n"&gt;ConversationState&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;();&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;blockquote&gt;
&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F1y91wlog8zq20yyflpr6.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F1y91wlog8zq20yyflpr6.png" alt="Startup.cs showing state registration" width="800" height="418"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;⚠️ &lt;strong&gt;Important:&lt;/strong&gt; Use &lt;code&gt;MemoryStorage&lt;/code&gt; only for local development and testing. It stores data in RAM and loses everything when the bot restarts. For production, always use &lt;strong&gt;Azure Blob Storage&lt;/strong&gt; or &lt;strong&gt;Azure Cosmos DB&lt;/strong&gt;.&lt;/p&gt;
&lt;/blockquote&gt;




&lt;h2&gt;
  
  
  Step 6 — Middleware Pipeline
&lt;/h2&gt;

&lt;p&gt;Middleware in Bot Framework works exactly like ASP.NET Core middleware. Every Activity passes through the middleware pipeline before reaching your bot logic and after your bot sends a response.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Incoming Activity
      ↓
Logging Middleware
      ↓
State Middleware
      ↓
Your Bot Logic
      ↓
(Same pipeline in reverse for response)
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Some built-in middleware:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;code&gt;AutoSaveStateMiddleware&lt;/code&gt; — automatically saves state after each turn&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;ShowTypingMiddleware&lt;/code&gt; — shows typing indicator while bot is processing&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;TranscriptLoggerMiddleware&lt;/code&gt; — logs all conversations&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;You can also write your own custom middleware for things like logging, translation, or profanity filtering.&lt;/p&gt;




&lt;h2&gt;
  
  
  Step 7 — Setup Azure Bot Service
&lt;/h2&gt;

&lt;p&gt;Now that our bot code is ready, we need to connect it to Azure Bot Service.&lt;/p&gt;

&lt;h3&gt;
  
  
  Create App Registration
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;Go to &lt;strong&gt;Azure Portal&lt;/strong&gt;
&lt;/li&gt;
&lt;li&gt;Navigate to &lt;strong&gt;Azure Active Directory → App Registrations&lt;/strong&gt;
&lt;/li&gt;
&lt;li&gt;Click &lt;strong&gt;New Registration&lt;/strong&gt;
&lt;/li&gt;
&lt;li&gt;Give it a name&lt;/li&gt;
&lt;li&gt;Select appropriate account type&lt;/li&gt;
&lt;li&gt;Click &lt;strong&gt;Register&lt;/strong&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fehzb4pzux3kvkdfnc0gk.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fehzb4pzux3kvkdfnc0gk.png" alt="Azure Portal App Registration creation screen" width="800" height="400"&gt;&lt;/a&gt;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;After creating, note down:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Application (client) ID&lt;/strong&gt; — this is your &lt;code&gt;MicrosoftAppId&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Directory (tenant) ID&lt;/strong&gt; — this is your &lt;code&gt;MicrosoftAppTenantId&lt;/code&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Then go to &lt;strong&gt;Certificates &amp;amp; Secrets&lt;/strong&gt; and create a new Client Secret. Copy the &lt;strong&gt;Value&lt;/strong&gt; immediately — you won't see it again!&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;⚠️ &lt;strong&gt;Common Mistake:&lt;/strong&gt; People often copy the Secret ID instead of Secret Value. Always copy from the VALUE column, not the ID column.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;h3&gt;
  
  
  Create Azure Bot Resource
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;Azure Portal → &lt;strong&gt;Create a resource&lt;/strong&gt; → Search &lt;strong&gt;Azure Bot&lt;/strong&gt;
&lt;/li&gt;
&lt;li&gt;Fill in bot handle and resource group&lt;/li&gt;
&lt;li&gt;Select appropriate App type&lt;/li&gt;
&lt;li&gt;Click &lt;strong&gt;Create&lt;/strong&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F62nhj7p6no2j1svqag1q.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F62nhj7p6no2j1svqag1q.png" alt="Azure Bot creation screen in Azure Portal" width="800" height="411"&gt;&lt;/a&gt;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;h3&gt;
  
  
  Update appsettings.json
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight json"&gt;&lt;code&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"MicrosoftAppType"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"SingleTenant"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"MicrosoftAppId"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"your-app-id-here"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"MicrosoftAppPassword"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"your-client-secret-value-here"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"MicrosoftAppTenantId"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"your-tenant-id-here"&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;blockquote&gt;
&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fq32h4yiptbpb5jxu36rl.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fq32h4yiptbpb5jxu36rl.png" alt="Appsettings.json from Visual Studio with masked credentials" width="800" height="419"&gt;&lt;/a&gt;&lt;/p&gt;
&lt;/blockquote&gt;




&lt;h2&gt;
  
  
  Step 8 — Local Testing with ngrok
&lt;/h2&gt;

&lt;p&gt;During development your bot runs on &lt;code&gt;localhost&lt;/code&gt;. But Azure Bot Service needs a public HTTPS URL to reach your bot. This is where &lt;strong&gt;ngrok&lt;/strong&gt; comes in.&lt;/p&gt;

&lt;p&gt;ngrok creates a public tunnel to your localhost.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="c"&gt;# Start ngrok to expose port 3978&lt;/span&gt;
ngrok http 3978
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;blockquote&gt;
&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Foon7ifxwuz4b45iniqcw.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Foon7ifxwuz4b45iniqcw.png" alt="ngrok terminal showing the https forwarding URL" width="800" height="405"&gt;&lt;/a&gt;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Copy the HTTPS URL from ngrok and paste it in Azure Bot Service:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Azure Portal → Your Bot → &lt;strong&gt;Configuration&lt;/strong&gt;
&lt;/li&gt;
&lt;li&gt;Set &lt;strong&gt;Messaging Endpoint&lt;/strong&gt; to: &lt;code&gt;https://your-ngrok-url.ngrok-free.app/api/messages&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;Click &lt;strong&gt;Apply&lt;/strong&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fncf1q2rc80vf42vjr06q.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fncf1q2rc80vf42vjr06q.png" alt="Azure Bot Configuration page with messaging endpoint filled" width="800" height="400"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;⚠️ &lt;strong&gt;Important:&lt;/strong&gt; Every time you restart ngrok the URL changes. You need to update it in Azure Bot Configuration every time.&lt;/p&gt;
&lt;/blockquote&gt;




&lt;h2&gt;
  
  
  Step 9 — Test Your Bot
&lt;/h2&gt;

&lt;p&gt;Now run your project in Visual Studio (F5) and go to:&lt;/p&gt;

&lt;p&gt;Azure Portal → Your Bot → &lt;strong&gt;Test in Web Chat&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Type &lt;code&gt;Hi&lt;/code&gt; and your bot should respond!&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fyo9w8bbnqxotb0q8w89d.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fyo9w8bbnqxotb0q8w89d.png" alt="Azure Web Chat showing bot responding to Hi message" width="800" height="466"&gt;&lt;/a&gt;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;If you see a response — congratulations! Your first bot is working! &lt;/p&gt;




&lt;h2&gt;
  
  
  Common Errors and How I Fixed Them
&lt;/h2&gt;

&lt;p&gt;I faced quite a few errors while setting this up. Here are the most common ones and how to fix them:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;&lt;code&gt;Operation returned an invalid status code 'Unauthorized'&lt;/code&gt;&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Check your &lt;code&gt;MicrosoftAppId&lt;/code&gt; and &lt;code&gt;MicrosoftAppPassword&lt;/code&gt; in appsettings.json&lt;/li&gt;
&lt;li&gt;Make sure you copied Secret VALUE not Secret ID&lt;/li&gt;
&lt;li&gt;Verify App type matches between Azure Bot and appsettings.json&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;&lt;code&gt;Application was not found in the directory 'Bot Framework'&lt;/code&gt;&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;This usually means App type mismatch — SingleTenant vs MultiTenant&lt;/li&gt;
&lt;li&gt;Verify your &lt;code&gt;MicrosoftAppType&lt;/code&gt; in appsettings.json matches the Bot Service configuration&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;&lt;code&gt;ngrok — Upgrade to WebSocket is required&lt;/code&gt;&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;This is normal! It appears when you open the ngrok URL directly in browser&lt;/li&gt;
&lt;li&gt;The bot endpoint only accepts POST requests from Bot Framework&lt;/li&gt;
&lt;li&gt;Test through Azure Web Chat, not by opening the URL in browser&lt;/li&gt;
&lt;/ul&gt;




&lt;h2&gt;
  
  
  What is LUIS / CLU?
&lt;/h2&gt;

&lt;p&gt;Most real bots need to understand what the user is saying in natural language. For example if user types "I want to book a ticket to Mumbai for next Friday" — your bot needs to understand:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Intent&lt;/strong&gt; — user wants to book a ticket (BookFlight)&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Entity&lt;/strong&gt; — destination is Mumbai, date is next Friday&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;This is where &lt;strong&gt;LUIS (Language Understanding Intelligent Service)&lt;/strong&gt; comes in. You train LUIS with example phrases and it learns to identify intents and entities from user messages.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;⚠️ &lt;strong&gt;Note for interviews:&lt;/strong&gt; LUIS is being retired and replaced by &lt;strong&gt;Azure AI Language — CLU (Conversational Language Understanding)&lt;/strong&gt; in 2025. Mention this in interviews to show you are up to date.&lt;/p&gt;
&lt;/blockquote&gt;




&lt;h2&gt;
  
  
  Channels — Deploy Your Bot Everywhere
&lt;/h2&gt;

&lt;p&gt;One of the best things about Azure Bot Service is &lt;strong&gt;Channels&lt;/strong&gt;. You write your bot code once and connect it to multiple platforms.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F8k9y25yq8wdtj2b356kr.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F8k9y25yq8wdtj2b356kr.png" alt="Azure Bot Channels page showing available channels" width="800" height="539"&gt;&lt;/a&gt;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Some popular channels:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Web Chat&lt;/strong&gt; — embed on any website&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Microsoft Teams&lt;/strong&gt; — enterprise users&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Direct Line&lt;/strong&gt; — for custom applications and mobile apps&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Slack&lt;/strong&gt; — team collaboration&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Facebook Messenger&lt;/strong&gt; — social platform&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;WhatsApp&lt;/strong&gt; — mobile users&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;For custom web or mobile apps, &lt;strong&gt;Direct Line&lt;/strong&gt; is the recommended approach. You get a secret key and use the Direct Line SDK to connect your custom UI to the bot.&lt;/p&gt;




&lt;h2&gt;
  
  
  What I Learned from This Experience
&lt;/h2&gt;

&lt;p&gt;Building my first bot was a great learning experience. A few things I want to highlight:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Start simple&lt;/strong&gt; — Don't try to add LUIS, state management and everything at once. First get a simple echo bot working, then add features one by one.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Use Bot Framework Emulator&lt;/strong&gt; — For local testing, the emulator is much easier than setting up ngrok and Azure. Connect directly to &lt;code&gt;http://localhost:3978/api/messages&lt;/code&gt; with empty credentials.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Understand the flow&lt;/strong&gt; — Once you understand the Turn, Activity, Dialog stack flow — everything else falls into place. It took me some time but once it clicked, it became easy.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;State management is important&lt;/strong&gt; — Don't underestimate this. A bot without proper state management will forget everything between turns and create a terrible user experience.&lt;/p&gt;




&lt;h2&gt;
  
  
  Next Steps
&lt;/h2&gt;

&lt;p&gt;If you have got your first bot working, here is what you can explore next:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Add LUIS / CLU&lt;/strong&gt; — Make your bot understand natural language&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Adaptive Cards&lt;/strong&gt; — Create rich UI cards with buttons, images and forms inside the chat&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Proactive Messaging&lt;/strong&gt; — Make your bot send notifications without user initiating&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;OAuth Authentication&lt;/strong&gt; — Let users login through your bot&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Deploy to Azure App Service&lt;/strong&gt; — Move from ngrok to proper production deployment&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Direct Line Integration&lt;/strong&gt; — Embed your bot in a custom React or mobile app&lt;/li&gt;
&lt;/ul&gt;




&lt;h2&gt;
  
  
  Conclusion
&lt;/h2&gt;

&lt;p&gt;Azure Bot Framework and Bot Service is a really powerful combination for building enterprise grade chatbots. Once you understand the core concepts — Activity, Turn, TurnContext, Dialogs, State — building bots becomes quite straightforward.&lt;/p&gt;

&lt;p&gt;I hope this blog helped you get started. If you have any questions or faced any errors during setup, drop them in the comments — I will try to help based on my experience.&lt;/p&gt;

&lt;p&gt;Happy coding! &lt;/p&gt;




&lt;p&gt;&lt;em&gt;If you found this helpful, do share it with your developer friends. Follow me for more Azure and .NET content.&lt;/em&gt;&lt;/p&gt;




&lt;p&gt;&lt;strong&gt;Tags:&lt;/strong&gt; &lt;code&gt;#azure&lt;/code&gt; &lt;code&gt;#botframework&lt;/code&gt; &lt;code&gt;#dotnet&lt;/code&gt; &lt;code&gt;#csharp&lt;/code&gt; &lt;code&gt;#chatbot&lt;/code&gt; &lt;code&gt;#azurebotservice&lt;/code&gt; &lt;code&gt;#beginners&lt;/code&gt;&lt;/p&gt;

</description>
      <category>azure</category>
      <category>csharp</category>
      <category>dotnet</category>
      <category>botframework</category>
    </item>
  </channel>
</rss>
