Showing posts with label IIS. Show all posts
Showing posts with label IIS. Show all posts

Wednesday, November 30, 2016

How to debug application_start global.asax in ASP.net

A simple way to break in Application_Start() is to use the System.Diagnostics.Debugger class. You can force the application to break by inserting System.Diagnostics.Debugger.Break() where you would like the debugger to break.
  
    void Application_Start(object sender, EventArgs e) 
    {
          System.Diagnostics.Debugger.Break();
    }
    
Or else
  1. Attach the debugger to the IIS process.
  2. Open the global.asax file and put in a break point.
  3. Add a space to the web.config file and save the file (this causes the current web application to reset);
  4. Refresh / goto a web page on the site.
  5. Boom debugger stops at your break-point. :)

Monday, September 29, 2014

Solved: How To Fix a 503 Service Unavailable Error

The 503 Service Unavailable error displays inside the browser window, just as web pages do. HTTP Error 503. The service is unavailable in IIS  is caused if application pool is paused or disabled as shown in the picture below



The 503 Service Unavailable error is a server-side error which means the problem is usually with the web site's server. It can be a local server or public server.

Steps to solve HTTP Error 503: The service is unavailable.

Open IIS Manager and follow below image: