Build the future of communications.
Start Building for Free

asp.net core posts

  • By Niels Swimberghe
    What's new in the Twilio helper library for ASP.NET (v7.0.0 - November 2022) What's new in the Twilio helper library for ASP.NET (v7.0.0 - November 2022)

    The Twilio helper library for ASP.NET (Twilio.AspNet) is a community-driven open-source project to make integrating Twilio with ASP.NET easier, for both ASP.NET Core and ASP.NET MVC on .NET Framework. The library helps you achieve common use cases and with the release of version 7, we're expanding the library's capabilities and improving existing features.

    Wondering what was previously introduced? You can read about v6 and prior releases here.

    What's new in Twilio.AspNet v7.0.0

    V7.0.0 is a major release of the Twilio.AspNet library because it contains breaking changes.

    Here's an overview of the changes:

    🎉 NEW FEATURES

    • You can now use the ValidateTwilioRequestFilter to validate that HTTP requests originate from Twilio. This adds validation to endpoints including Minimal APIs.
    • You can also use the new ValidateTwilioRequestMiddleware to validate Twilio requests for when you can't use the [ValidateRequest] attribute or the ValidateTwilioRequestFilter.
    • There are new overloads for the TwiMLResult constructor and …
    Read More
  • By Niels Swimberghe
    Configure Twilio Webhooks automatically with Visual Studio dev tunnels during ASP.NET Core startup Configure Twilio Webhooks with Visual Studio dev tunnels during ASP.NET Core startup

    In a previous blog post, I showed how you can use Visual Studio dev tunnels to make your ASP.NET Core application publicly available and then use your public application to handle the Twilio SMS webhook.

    In this blog post, you will learn how to retrieve the tunnel URL from your ASP.NET Core application and use it to automatically update the Twilio SMS Webhook, so you don't have to do this manually whenever the tunnel URL changes.

    Prerequisites

    You'll need the following things to complete this tutorial:

    You can find details on how to do these steps …

    Read More
  • By Bryan Hogan
    How to containerize your ASP.NET Core application and SQL Server with Docker How to containerize your ASP.NET Core application  along your SQL Server container with Docker

    In my previous blog post, I showed how to deploy SQL Server in a Docker container, then connect to it from a .NET Web API application using Entity Framework Core.

    In this post, you're going to build on the previous post and learn how to deploy a .NET Web API application in a Docker container and connect it to SQL Server running in a container also.

    Prerequisites

    You will need the following things in this tutorial:

    Get Started …

    Read More
  • By Niels Swimberghe
    How to build a URL Shortener with C# .NET and Redis Build a URL Shortener with .NET and Redis

    URLs are used to locate resources on the internet, but URLs can be long making them hard to use. Especially when you have to type the URL manually, even more so when having to do so on a mobile phone. Long URLs are also problematic when you have a limited amount of characters such as within an SMS segment or a Tweet.

    A solution to this is to use a URL shortener which will create URLs that are short and sweet. When you open the shortened URL, the URL will forward you to the long destination URL. This makes it easier to manually type the URL and also save precious characters.

    Shortened URLs also obfuscate the real URL so users don't know where they will land on the internet when they click the URL. This could be abused by malicious actors, so make sure your URL shortener is secure! If …

    Read More
  • By Rahul Rai
    Implementing Stateful Work-In-Progress Pattern with Durable Azure Functions Implement Stateful Work-In-Progress Pattern with Durable Azure Functions

    In some cases, you need to gather chunks of data from multiple sources and submit the final information package to the server for processing. The work-in-progress (WIP) pattern enables you to gather lots of data over a long period of time before reviewing it and submitting the data collected for processing.

    The key component of the WIP pattern is a persistent “work document” that you keep enriching with input over time and finally submit to the server after a review. The work document is not a single entity, and the pattern allows you to manage several work documents simultaneously. For example, you might want to create individual work documents for every customer requesting approval for credit purchases.

    A work-in-progress application should support the following operations:

    1. Create document: Create a new work document.
    2. Read document: Get a single work document.
    3. List documents: Get the list of work documents. …
    Read More
  • By Bryan Hogan
    Dockerize your SQL Server and use it in ASP.NET Core with Entity Framework Core How to containerize your SQL Server with Docker and use it in ASP.NET Core with EF Core.

    I love learning and writing blogs about .NET and related technologies. One of my favorites over the past 10 years or so has been Entity Framework (EF) and Entity Framework Core (EF Core). I have used it professionally with MS SQL Server, Postgres, and MySQL. But the thing I don’t like is installing these databases on my computer, they are large, they add services that run on startup, and consume lots of resources.

    Instead, when I want to write an application using EF and one of those databases, I download a docker image for the database, start up the container, and connect to that instance from my .NET application. When I’m done for the day, I shut down the container, and when I’m done with the application, I delete the container, and image, and my system is clean of the database.

    The other great thing about using a database in …

    Read More
  • By Similoluwa Adegoke
    Respond to Twilio Webhooks using Azure Functions Respond to  Twilio Webhooks  using Azure Functions

    Azure Functions is built on the concept of Triggers and Bindings, and while there's a Twilio binding for sending SMS, there is no trigger for receiving messages or calls. However, Azure Functions does have an HTTP trigger which you can use to receive webhook requests from Twilio.

    In this tutorial, you will learn how to respond to Twilio webhooks using Azure Functions. You will learn what webhooks are, how to set up an Azure Function, and then use your Azure Function app to respond to a Twilio SMS webhook.

    Prerequisites

    You will need the following things to follow along:

    Read More
  • By Niels Swimberghe
    Use XML Literals in Visual Basic .NET to generate TwiML Use XML Literals in Visual Basic .NET to generate TwiML

    While JSON and YAML have become very popular data serialization languages, XML is still everywhere. XML is used on the HTML page you are reading right now. XML is used in your .NET project files and MSBuild scripts. Twilio also has their own flavor of XML called TwiML, but more on that later.

    If you need to work with XML and are a Visual Basic .NET (VB) developer, then you're in luck because VB has a built-in feature for generating XML called XML Literals. In this tutorial, you'll learn how to generate TwiML with XML Literals with an ASP.NET Core Minimal API.

    Prerequisites

    Here’s what you will need to follow along:

    Read More
  • By Niels Swimberghe
    How to generate TwiML using Strings in C# Generate TwiML using Strings in C#

    Over the decades, C# has added different ways to create a string, each with their own benefit. In this tutorial, you'll learn how to generate TwiML using the different C# string features with an ASP.NET Core Minimal API and compare it to the object oriented way of generating TwiML.

    But first, let's get you up to speed on how Twilio uses webhooks and TwiML to respond to text messages and voice calls.

    Prerequisites

    Here’s what you will need to follow along:

    Read More
  • By Volkan Paksoy
    Forward Voicemails with Transcript to your Email using C# and ASP.NET Core Forward Voicemails with Transcript to your Email using C# and ASP.NET Core

    Whether you like it or not, phone calls are essential to our daily communications. However, sometimes nobody is available to take the call right there and then. Luckily, Twilio Programmable Voice lets you record voicemail so the caller can leave a message. But what if instead of having to call into a voicemail box, you could receive the voicemail and transcript in as an email instead? In this article, you will build a Twilio Voice app that sends voicemails and the call transcript to your email address using SendGrid.

    Prerequisites

    You'll need the following things in this tutorial:

    Read More
  • Newer
    Older
    Sign up and start building
    Not ready yet? Talk to an expert.