Build the future of communications.
Start building for free

"net" posts

  • By Dustin Ewers
    Building A Cloud Native ASP.NET Core Application and Deploying it to Azure Kubernetes Service with Docker 7EUCzPY9JgIdXMFYmG1BWkow-WFFrnyLHtoiBRhdFWRzMC4rqJ1afaZqAR6VyBd8pB9s_XzO9AmmcJMjDeW8j7Zimys2HbbxY5qh5q27hBHVd3o2zJbHw450LnCGAZp3u2gMMVus

    As developers, we mostly focus on building applications. However, building the app is only half the story. To consider things “done,” we need to get that app deployed into the wild where people can use it. In the .NET world, there’s no shortage of ways we can host our apps, but today, I’d like to focus on building cloud native .NET applications.

    In this post, you’ll learn about building cloud native applications in ASP.NET Core. You’ll learn how to design for the cloud, spin up an Azure Kubernetes Service instance, and deploy your application into the cloud. By the end of this post, you’ll have the tools to build and deploy your own cloud native ASP.NET applications.

    What do you mean by “cloud native”?

    “Cloud native” is one of those terms that sounds obvious, but there’s a more specific definition.

    The Cloud ...

    Read More
  • By Layla Porter
    Test Driven AutoMapper with .NET Core VNcMVOXYfSc2DCoiaq5heVIF6fTmdIPVXG81WxYpM5QG06S-df8fuYYbNjgavC69zPz6U9afsp2RIjnxL0VA0T3M5TwyCqdIpmgXGStZp7NvzSP0utazOyORagpt1LutXk1m21bH

    If you use data in a project then you have most likely had to map one model to another.  Whether you've done that in the constructor, a dedicated method, or used a mapper of some sort, it can be repetitive and tedious.

    AutoMapper, a library for .NET written by Jimmy Bogard, has been around for a while.  It had a revamp to work with .NET Core and Dependency Injection but can still feel a little bit like magic.

    I use AutoMapper for an internal Twilio tool.  I struggled to create valid maps that work without requiring me to map everything manually.

    I found the best way to configure AutoMapper is by writing tests and lettingAutoMapper tell me exactly what I need to configure. Let me show you how that works.

    I have created a solution in this repository that has the AutoMapper NuGet package already installed and all the basic ...

    Read More
  • By Thomas Ardal
    Get Real-Time SMS Error Messages from ASP.NET Core Web Apps with elmah.io and Twilio 7z3YSw1j6d2sMHB1qoex_03nAFDteK2w837uLuCbalj-pX_AmNw1glIMHESuyKFzjdLDS5yTAhTpCtNIupPG32mKayiokwgVw2jWAG9MwDDpsB-R68Fsoyk5cC7_8jghr2nhw6TC

    Getting instant notifications when an error happens on a website can mean life and death for a business. The faster developers fix the bug, the fewer users get frustrated with your website. Using elmah.io and Twilio, getting SMS notifications when your ASP.NET Core application starts failing requires nothing more than a few lines of code. In this post, you will learn how.

    elmah.io is a cloud-based error logging and uptime monitoring service for .NET web developers. elmah.io monitors your websites for crashes and outages and alerts you in real time when an event happens.

    You can receive elmah.io alerts through a variety of channels, including Slack and Microsoft Teams, using integrations provided for those and other products. You can also receive alerts by SMS using the elmah.io integration for Twilio. With a Twilio Phone Number you can receive text notifications about your website wherever ...

    Read More
  • By Luce Carter
    Deploying and Running Your First C# Xamarin Mobile App Deploying and Running Your First C# Xamarin Mobile App

    Creating mobile apps with Xamarin involves more than just coding and pressing F5. Since your apps will be running on a mobile operating system like Android or iOS, testing and debugging them requires running them on a device running one of those operating systems or a simulation of a device.

    The first post in this series showed how to get set up and build your first app in Xamarin with C# .NET. This post will show you how to deploy and run your Xamarin app on an iPhone or Android device. You’ll also learn how to deploy and run on iOS and Android emulators. With these techniques you’ll be able to test and debug a single app on a variety of devices and OS versions without needing a stack of phones.

    Prerequisites

    Visual Studio 2017/2019 for Windows or Visual Studio for Mac

    Mobile development with .NET workload ...

    Read More
  • By Luce Carter
    Building Your First Mobile App with C# .NET and Xamarin Building Your First Mobile App with C# .NET and Xamarin

    Nearly everyone these days has a mobile phone, and most of these are smartphones. Everyone downloads apps, from social media to games to fitness.

    As developers, a lot of you probably think about making an app for your phones. Whether it's just for a laugh, or to solve an actual problem, our curious minds get us thinking.

    In this post you will get an introduction to how you can create mobile apps using C# and Visual Studio, taking advantage of the awesome Xamarin mobile tooling built into Visual Studio.

    Today you will cover the following set of topics:

    • What is Xamarin?
    • What tools will I need?
    • Getting started with the Visual Studio tools for Xamarin
    • Creating a simple counter app
    • Learning more

    What is Xamarin?

    Xamarin is a cross-platform mobile development framework that now ships with Visual Studio 2019 for Windows and Visual Studio for Mac.

    It is a thin ...

    Read More
  • By Andrew Lock
    Verifying Phone Number Ownership in ASP.NET Core Identity with Twilio Verify v2 and Razor Pages Copy of Product Template - Verify.png

    ASP.NET Core Identity is a membership system that adds user sign in and user management functionality to ASP.NET Core apps. It includes many features out of the box and has basic support for storing a phone number for a user. By default, ASP.NET Core Identity doesn't try to verify ownership of phone numbers, but you can add that functionality yourself by integrating Twilio’s identity verification features into your application.

    In this post you'll learn how you can prove ownership of a phone number provided by a user using Twilio Verify in an ASP.NET Core application using Razor Pages. This involves sending a code in an SMS message to the provided phone number. The user enters the code received and Twilio confirms whether it is correct. If so, you can be confident the user has control of the provided phone number.

    You typically only confirm phone ...

    Read More
  • By Bryan Hogan
    More Resilient Service-to-Service Communication with Polly and .NET HttpClientFactory Copy of Generic Blog Header 4.png

    Using Polly, the resilience framework for .NET, you can gracefully handle the lost packets, thrown exceptions, and failed requests which inevitably make their way into service-to-service communications on the web. A previous post on the Twilio blog introduced Polly, the .NET resilience framework. This post builds on that knowledge to strengthen your application's interaction with API endpoints.

    The original .NET HttpClient was a convenient way to send and receive HTTP requests and responses on the web, but unless HttpClient was carefully implemented its use could result in socket exhaustion. The release of .NET Core 2.1 introduced HttpClientFactory, which can be instantiated once and used throughout the life of an application.

    This post will show you how to combine HttpClientFactory with Polly to achieve efficient and resilient service-to-service communications. You'll see how you can do it more reliably, conveniently, and with less code than using HttpClient.

    Prerequisites

    To follow along ...

    Read More
  • By AJ Saulsberry
    Developers Developers Developers: Our Favorite .NET Tutorials for May 2019 tDdWLD_jWklqrqxi8sNHq-_u2qUlw4D88_T3f4Fz4qxPv8SjBClM9AIxEuiIns4_EA1jorEDqqBkhE2-bFRrm2ZPdn8CdEC_WUsM20Ad6zYAs2iKbgZNpGTjr5K28rr32e3YlNA8

    Over the last month we've climbed out of numerous programming rabbit holes thanks to fellow .NET developers writing public tutorials for the community. We've rounded up some of our favorites in this post.

    Each tutorial listed below is easy enough for beginner-level programmers to follow. More experienced developers should be able to breeze through the code while building a useful project or using these tutorials as convenient refreshers.

    Enjoy these awesome tutorials!

    Making complex authentication easier

    Are you excited about authentication? If so, please tweet us, you are a delightfully special breed of developer. Here are a few great authentication tutorials for those folks that aren't  as stoked about the topic and who just want to get the sign in page working.

    Updating Microsoft Account Logins in ASP.NET Core With OpenID Connect And Azure Active Directory by Damien Bod

    Add Authentication to Angular 7 App using ASP.NET Core ...

    Read More
  • By Andrew Lock
    Verifying Phone Number Ownership with Twilio using ASP.NET Core Identity and Razor Pages N42fIkogDGzNKe3tTttod6s49R0D_TquDiukriib9G7KUp0fhtSttA-AZYmGRfdERxp3Lp0IS_QXjf8C6lULRL8n9NJlsncTExtblcjvVKpnhxeYQmZHjgoG3mH2mVizLs671HE8

    ASP.NET Core Identity is a membership system that adds user sign in and user management functionality to ASP.NET Core apps. It includes many features out of the box and has basic support for storing a phone number for a user. By default, ASP.NET Core Identity doesn't try to verify ownership of phone numbers, but you can add that functionality yourself by integrating Twilio’s identity verification features into your application.

    In this post you’ll learn how you can prove ownership of a phone number provided by a user using Twilio Verify in an ASP.NET Core application using Razor Pages. This involves sending a code in an SMS message to the provided phone number. The user enters the code received and Twilio confirms whether it is correct. If so, you can be confident the user has control of the provided phone number.

    You typically only confirm ...

    Read More
  • By Bryan Hogan
    Building Resilient Service-to-Service Communications in ASP.NET Core with Polly, the .NET Resilience Framework rwNecMwoSUez0Ube7w9hsk4xKt_AVXOmIPDyu8qHhgvjZZUDl2t5hQyMp0YIclb6XpIdKdRSFRVnhg0Tf78mV7SmPFSWHGpkGMUzF68JTo2D40YC1VlT-auZj3qg-5Ub40shcDCu

    Service-to-service communication is becoming more and more common, but we know the network has never been reliable and that other people's code has bugs. Packets are lost, exceptions are thrown, and requests fail; it will happen to your application—to all applications!
    Using the Polly Resilience Framework you can easily retry a failed request, no messy for loops or try catches needed. Just a few lines of code and your applications will never be the same!

    This post shows how to make reliable requests to an unreliable "remote" service with almost no overhead.

    You’ll start with a “remote” Web API application that returns errors 75% of the time. Then you’ll build a “local“ Web API application that calls the remote one (of course receiving errors three quarters of the time).

    Finally, you will add Polly to the “local” application to perform retires on failed requests. With a few ...

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