Lab 28: The impact of debug=true

Prerequisites

  • Read this about .NET Compilation
  • Read this about why debug=true is not good for performance
  • Understand that ASP.NET (ASPX, ASCX, ASAX, MVC) files are compiled into a DLL and stored into c:\Windows\Microsoft.NET\Framework?\v?.?.?\Temporary ASP.NET Files

Setup

  • Install CSharpGuitarBugs.zip onto an IIS web server as per Lab 1
  • Install the ASP.NET Role
  1. Open the IIS Manager Console and click the CSharpGuitarBugs website
  2. Click on the .NET Compilation feature and set Debug to true, apply the changes

image

Figure 1, The impact of debug=true
  1. Check the version which the CSharpGuitarBugs application pool is running under and then navigate to the associated ASP.NET temporary files (the application pool is configured to run in 64 bit and with .NET 4.5.2), therefore I look int e following directory for the Temporary ASP.NET files.

image

Figure 2, The impact of debug=true
  1. Delete all the contents…
  2. Access the website and browse to a few pages, for example Full Catalog pages, View by Manufacturer, Enter Payment Information, etc…
  3. Check to see how many files and the size of the created temporary files

image

Figure 3, The impact of debug=true
  1. Delete the temporary ASP.NET files (you may need to perform an IISReset)
  2. Now set Debug=false and perform the same action as before
  3. Check the size and number of temporary files created now

image

Figure 4, The impact of debug=true
  1. Take all the DLL files and copy them to the c:\temp directory
  2. Open the Reflector or Just Decompile and add the DLLs
  3. When Debug=False, all pages are compiled into a single DLL, view the code…

image

Figure 5, The impact of debug=true