The number 400

400th article Benjamin Perkins
400th article Benjamin Perkins

What is significant about the number 400? 400 is 20² 400 is divisible by: 1, 2, 4, 5, 8, 10, 16, 20, 25, 40, 50, 80, 100, 200, 400 400 equals 2⁴ * 5² or ( 2*2*2*2*5*5) 400 is a self-number which are generated by this formula:  You can write 400 like this: four hundred,…

1

A route named ‘*’ is already in the route collection, Azure Web App

ASP.NET Benjamin Perkins
ASP.NET Benjamin Perkins

I was deploying an ASP.NET Web API to an Azure App Service Web App and I got this error: Server Error in ‘/’ Application. A route named ‘HelpPage_Default’ is already in the route collection. Route names must be unique. Parameter name: name Description: An unhandled exception occurred during the execution of the current web request….

0

Always get “Authorization has been denied for this request.” ASP.NET Web API

ASP.NET Benjamin Perkins
ASP.NET Benjamin Perkins

I was creating an ASP.NET Web API today and when I called one of the Web APIs (/api/values) I got the following response: {“Message”:”Authorization has been denied for this request.”} It turns out by default ‘Individual User Accounts” authentication is enabled by default.  See Figure 1. Figure 1, {“Message”:”Authorization has been denied for this request.”}…

0

404 when I deploy an ASP.NET Core Web API

ASP.NET Core Benjamin Perkins
ASP.NET Core Benjamin Perkins

When I deployed an ASP.NET Core Web API to my Azure App Service API App I received a 404 Not Found when the page was opened, as seen in Figure 1. Figure 1, 404 ASP.NET Core The reason for this is that the deployment or default ASP.NET Core Web API template does not include a…

2

Create a VNET and access an Azure VM hosted within it from an App Services Web App

Azure VNET
Azure VNET

This articles has been moved to its new home here:  https://benperk.github.io/msdn/2017/2017-02-create-a-vnet-and-access-an-azure-vm-hosted-within-it-from-an-app-serivces-web-app.html There are 2 kinds of VNETs at the moment, they are VNETv1 (ASM), also referred to as ‘Classic virtual networks’ and VNETv2 (ARM), aka ‘Resource Manager virtual networks’.  The binding between a VNETv1 and a Web App can be achieved within the AUX portal here,…

0

Using Postman to call Azure REST APIs

Azure REST API
Azure REST API

This article has been moved to its new home here:  https://benperk.github.io/msdn/2017/2017-01-using-postman-to-call-azure-rest-apis.html I had a need to call an Azure REST API and thought I would document that here.  Here are the steps required: Get the Postman app Get your Bearer Token for authentication Configure Postman for calling the Azure Rest API Get the Postman app In…

1

How (I) connected a console application to a Web API protected by an Azure Active Directory

Azure Active Directory (AAD) Benjamin Perkins
Azure Active Directory (AAD) Benjamin Perkins

This article has been moved to its new home here:  https://benperk.github.io/msdn/2016/2016-10-how-i-connected-a-console-application-to-a-web-api-protected-by-an-azure-active-directory.html The code can be downloaded from here or on GitHub. I wrote this post here where I discussed how I configured Azure Active Directory into one of my Azure App Service Web Apps.  One of the main differences between that post and what I am…

8

ASP.NET WebAPI results in a 405 Method Not Allowed HTTP response

ASP.NET Benjamin Perkins
ASP.NET Benjamin Perkins

This article has been moved to its new home here: https://benperk.github.io/msdn/2015/2015-07-asp-net-webapi-results-in-a-405-method-not-allowed-http-response.html I was working on an IoT project where my device was calling a WebAPI.  I had two methods, one had the signature shown in Listing 1 and the other in Listing 2. UPDATE 6-JUN-2016, check here for some exception handling tips. Listing 1, GET employees…

3

Using Entity Framework and Web API, I get a 500 Internal Server Error or a Hang

C# Benjamin Perkins
C# Benjamin Perkins

This article has been moved to its new home here: https://benperk.github.io/msdn/2015/2015-07-using-entity-framework-and-web-api-i-get-a-500-internal-server-error-or-a-hang.html I was working on some code that used Entity Framework and an ASP.NET WebAPI as the interface for accessing the data.  With my experience so far, when I publish my WebAPI and then access it, the result is a JSON formatted file that I can…

0

Troubleshoot a Web API Self Host performance problem

Web API
Web API

This article has been moved to its new home here: https://benperk.github.io/msdn/2015/2015-04-troubleshoot-a-web-api-self-host-performance-problem.html If you have not tried creating a Self-Hosted Web API, you might give it a shot, here is a good, getting started example.  Once it gets into production, if you are looking for ways to troubleshoot a slow performing self-hosted Web API, searching for a…

0