I wrote an article here about how to capture a memory dump of the W3WP process that runs your Azure Web App. Once you get the Memory dump, here are the steps you need to find out what the reason for the slow performance is. First, I open the W3WP dump in WinDbg, as shown […]
Read More →Category: Debugging
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 →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 →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 →The webpage cannot be found (404) when accessing a file on Azure App Services Web App
404 status codes can be a little misleading. I wrote another article here about 404’s here from an on premise IIS perspective, but in principle the information applies. The fact about 404’s is that there are many sub status codes lined to the 404 status code. Most people believe that the 404 means simply that […]
Read More →Using Network Tracing to debug System.Net based issues
I have worked on a number of cases where web services or URLs are called using a code segment like the below code snippet. HttpWebRequest request = (HttpWebRequest)WebRequest.Create(URL); HttpWebResponse response = (HttpWebResponse)request.GetResponse(); The result of the GetResponse() method is some kind of error, for example a Timeout Exception, which is not always brought up to […]
Read More →Enable System.Net tracing on Azure Websites (unable to connect to remote server)
It is becoming a common scenario that customers of Azure Web Apps are making requests to services hosted on other Azure IaaS or PaaS platforms, services not hosted on the Azure platform (on premise) and which use the System.Net class. For example, making a request from your code that uses either of the following code […]
Read More →IIS Admin Service fails to start
I was working on an unrelated issue and all of a sudden I started getting some strange errors in IIS. Something like the errors shown in Figure 1 and Figure 2. Figure 1 was rendered when I opened the IIS management console and attempted to expand the server name to see the websites on the […]
Read More →Using LogParser to analyze the EVENTLOG.XML, Azure App Service Web App
If you have an active Azure Web App and you experience problems or want to do some checks on what might the problem, there is a file called EVENTLOG.XML which contain exceptions and information that may be helpful. The file is located in the /LogFiles directory on your Web App. Figure 1 illustrates how that […]
Read More →Configure Debug Diagnostic 2.0 to create a memory dump when a specific exception is thrown
Debugging a process crash is a challenging activity. Although you know the exception type, the exceptions error message and you know the method that it is being thrown from, you still can’t find out why the exception is being thrown. It is especially complicated when the error is happening randomly and you cannot reproduce it. […]
Read More →