How do I precompile my ASP.NET 1.1 application? I don't want to go through every page to check for compile errors!

ASP.NET 2.0 has precompilation built-in (when you compile through VS.NET 2005 or above) or with the command line aspnet_compiler.exe. However, if you are using ASP.NET 1.1, you can use this tip.

Place the following http handler section into your web.config:

      <add verb="*" path="precompile.axd" type="System.Web.Handlers.BatchHandler"/>

Then surf to the file http://webservername/VirtualDirectoryName/Precompile.axd

If your site has no errors, you will get a message "Batch Compilation Successful" displaying on the page. Otherwise, you will get an error from the pages on your site that do not precompile. Note that this will only work for the current directory. If you have subfolders, you will need to run it on the subfolders as well.

You may also have to restart you ASP.NET worker process (or just restart IIS) for the ASP.NET 1.1 precompiler to work.

Note: A more comprehensive way to find any error on any page is to: