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
- Open the IIS Manager Console and click the CSharpGuitarBugs website
- Click on the .NET Compilation feature and set Debug to true, apply the changes
Figure 1, The impact of debug=true
- 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.
Figure 2, The impact of debug=true
- Delete all the contents…
- Access the website and browse to a few pages, for example Full Catalog pages, View by Manufacturer, Enter Payment Information, etc…
- Check to see how many files and the size of the created temporary files
Figure 3, The impact of debug=true
- Delete the temporary ASP.NET files (you may need to perform an IISReset)
- Now set Debug=false and perform the same action as before
- Check the size and number of temporary files created now
Figure 4, The impact of debug=true
- Take all the DLL files and copy them to the c:\temp directory
- Open the Reflector or Just Decompile and add the DLLs
- When Debug=False, all pages are compiled into a single DLL, view the code…
Figure 5, The impact of debug=true