Using Postman to Hit an API Management Endpoint with Subscription

In our previous posts, we created an App Service and an API Management in Azure. Let’s now use Postman to send a request to the Azure API Management endpoint. Go to the APIM and select the API. Under Settings, copy the Base URL: Now, in our case, we have /api/Customers to get all customers: So our URL is https://crmdevapim.azure-api.net/api/customers. Let’s open Postman and create this request. Click Send: We get a … Continue reading Using Postman to Hit an API Management Endpoint with Subscription

Backend service URL is not defined in Azure App Service

In this post, we will look at the error “Backend service URL is not defined” when making a request to an ASP.NET Web API through API Management. I have a .NET Core Web Api with Swashbuckle / Swagger. The Web Api is published to an Azure App Service, and an Azure API Management has this API loaded. We can run a test message using the APIM: We get a 500 … Continue reading Backend service URL is not defined in Azure App Service

Adding Swagger OpenAPI to an ASP.NET Web API

In this post, we will add Swagger OpenAPI to an ASP.NET Web API project. Swagger OpenAPI is a way to document the capabilities of your API. We can do this in .NET by adding the Swashbuckle NuGet package. Let’s continue with our Web Api project we created earlier. We will open the project in Visual Studio and add the Swashbuckle.AspNetCore package: Click OK: Now open Startup.cs and go to ConfigureServices: We … Continue reading Adding Swagger OpenAPI to an ASP.NET Web API

How to Add API Management (APIM) to an Azure App Service

In this post, we will look at how to add Azure API Management (APIM) to an Azure App Service. We will follow on from our previous post where we created an Azure App Service. There are a couple of ways to create an APIM. First, browse out to your App Service. We will use the one we created earlier using ASP.NET Core. Under API, select API Management: Click Create New: … Continue reading How to Add API Management (APIM) to an Azure App Service

HttpClient GetAsync, PostAsync, SendAsync in C#

HttpClient is a library in the Microsoft .NET framework 4+ that is used for GET and POST requests. Let’s go through a simple example of using HttpClient to GET and POST JSON from a web application. First, we will create our client application. We will create a new console app in Visual Studio: Add the System.Net.Http namespace. We will pull down JSON data from a REST service: Now, to read this, we … Continue reading HttpClient GetAsync, PostAsync, SendAsync in C#

Creating an ASP.NET Core 3.1 Visual Studio Project with Sample

In this post, we will install an ASP.NET Core 3.1 Project in Visual Studio. This will also install the Weather sample. To do this, first open Visual Studio, create a new project: Search for ASP.NET Core Web Application: Enter a name, e.g. Carl.Weather.API and click Create: Select ASP.NET Core 3.1 and API and click Create: We see the project created: Press F5 to run. We see the weather forecast sample … Continue reading Creating an ASP.NET Core 3.1 Visual Studio Project with Sample

Download and Install SoapUI Free Version

To install SoapUI, go to https://www.soapui.org/downloads/soapui/ and select Download SoapUI Open Source: This downloads the file below. Open it: Click Next: Click Next: Click Next: Click Next: Click Next: Click Next: Click Finish: SoapUI will now open: To test it working, let’s go to File->New SOAP Project: Enter the WSDL Url – http://www.dneonline.com/calculator.asmx?wsdl: The WSDL looks like this: And we can send a request and get a response:  

Creating a WCF REST Service with Entity Framework

In this post, we will go through how to use WCF to create a REST service, also using the Entity Framework to connect to a database. We have a SQL database that holds customer information. We would like to expose this as through a REST service. In the database, we have a table called Customers that we will build our service for: Open Visual Studio and create a new WCF Service … Continue reading Creating a WCF REST Service with Entity Framework

Using Browser Network Trace with Fiddler

When analyzing and troubleshooting network traces in browsers such as Edge, Chome, Firefox, and IE, you can export these and import them into Fiddler for further analysis. For example, let’s say you are working in Edge and are analyzing a REST API. You send a request through your browser to the API, that returns a list of customers: If you click F12 to open Developer Tools, you can see the request … Continue reading Using Browser Network Trace with Fiddler