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.”} […]
Read More →Search Results for: Web API
404 when I deploy an ASP.NET Core Web API
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 […]
Read More →Create and deploy an ASP.NET Core Web API to Azure Windows
There are a number of things I want to accomplish with this and a few future articles: How to deploy an ASP.NET Core Web API to an Azure App Services Web App How to deploy an ASP.NET Core Web API to an Azure VM Check out some of my other articles I wrote in regards […]
Read More →How (I) connected a console application to a Web API protected by an Azure Active Directory
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 trying to do here was realized when I received this […]
Read More →Using Entity Framework and Web API, I get a 500 Internal Server Error or a Hang
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 open or save via a message popup similar to that […]
Read More →Troubleshoot a Web API Self Host performance problem
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 W3WP process to take a memory dump of or applying […]
Read More →Troubleshooting Azure App Services Web App, Mobile App or API App 500s
When you get a response from your Azure Web App, Mobile App or API App which is a 500, you might want to look in the Event Viewer for the exception. A lot of times they include the stack that contains the method which threw an exception causing the 500. There are 2 ways to […]
Read More →Using the Azure WebJob API
I wrote an article here that discusses how to troubleshoot a WebJob, during the creation of that post I found decided to figure out this technique as well (calling the WebJob API). Originally, I was using the Azure SDK to trigger the WebJob from Visual Studio Server Explorer, as shown in Figure 1. Figure 1, […]
Read More →Why does my Azure App Service (Web, Mobile, API, Logic App) consume so much storage space
I worked on a case where the customer stated that their Web App was pretty small but when looking at the File System Storage metric in the Azure portal, they saw that is consumed almost 30 GB. The way I recommended they check it out is to use the KUDU console. I wrote an article […]
Read More →ASP.NET WebAPI results in a 405 Method Not Allowed HTTP response
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 [Route(“api/TC/{custId}”)] public IQueryable<EmployeeDTO> GetEmployees(string custId) { var db = […]
Read More →