Build the future of communications.
Start Building for Free

ASP.NET 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
    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 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
  • By Niels Swimberghe
    What's new in the Twilio helper library for ASP.NET (v6.0.0 - August 2022) What's new in the Twilio helper library for ASP.NET (v6.0.0 - August 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 6, we're expanding the library's capabilities and improving existing features.

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

    What's new in Twilio.AspNet v6.0.0

    V6.0.0 is a major release of the Twilio.AspNet library because it contains breaking changes. Starting from this release, version numbers do not match the version of the Twilio .NET SDK.

    Here's an overview of the changes:

    🎉 NEW FEATURES

    • You can now add the TwilioRestClient to ASP.NET Core's dependency injection (DI) container, using the .AddTwilioClient method. This Twilio client will use an HttpClient provided by the HTTP client factory. You can find more information about this …
    Read More
  • By Niels Swimberghe
    Use Visual Studio dev tunnels to handle Twilio Webhooks Use Visual Studio dev tunnels to handle Twilio Webhooks

    Visual Studio recently introduced a new feature called dev tunnels. By using dev tunnels, Visual Studio will create a new public URL (tunnel URL) for you, and HTTP requests sent to the tunnel URL will be forwarded to your ASP.NET Core project running on localhost.

    Dev tunnels has a lot of use cases. You could use this to easily test your web application on other devices like mobiles phone and tablets. You could also use this to make your application temporarily, publicly available for doing interactive demos and inviting your audience to participate.

    How to use dev tunnels with Twilio

    The most exciting use case for Twilio is that you can use dev tunnels to test webhooks. What are webhooks again?

    "Webhooks are user-defined HTTP callbacks. They are triggered by some event in a web application and can facilitate integrating different applications or third-party APIs, like Twilio." …

    Read More
  • By Similoluwa Adegoke
    Send Recurring Emails using C# .NET and Hangfire with SendGrid Send Recurring Emails using C# and Hangfire

    Sometimes you need to send out emails at a certain interval - monthly, weekly, daily, or even more frequent. To run jobs on a time interval, you can use operating system tools like cron jobs on Linux or the task scheduler on Windows. Alternatively, you can create your own long running application that schedules the jobs for you. However, developing a robust job scheduler is not an easy task. Luckily, there are some great libraries that take care of this for you like Hangfire.

    In this tutorial you will learn how to send recurring emails using Hangfire and the SendGrid Email API.

    Check out this article to learn how to send recurring emails using Quartz.NET, which is another scheduling system for .NET.

    Prerequisites

    You will need a few things to follow along:

    • A Twilio SendGrid Account. Sign up here to send up to 100 emails per day …
    Read More
  • By Similoluwa Adegoke
    How to build an Email Newsletter application using ASP.NET Core and SendGrid How to build an Email Newsletter using ASP.NET Core and SendGrid

    Sending out newsletters is a great way to keep your audience up-to-date on the latest news. There are existing newsletter products like SendGrid Email Marketing, however, in a scenario where the client demands more customization, building a newsletter app yourself using the SendGrid Email API is a great alternative.

    The advantage of building your own newsletter application is that you can control the nuts and bolts of the system and still maximize deliverability and measure engagement with SendGrid.

    In this tutorial, you will learn how to build a newsletter app using ASP.NET Core Razor Pages and SendGrid.

    Solution Overview

    Every newsletter application involves two parties: the subscriber of the newsletter, and the author of the newsletter.

    The subscriber's journey goes like this: The soon-to-be subscriber fills out a form to subscribe that includes their email address and other details (depending on your business needs). When the subscriber submits the …

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