Thursday, July 31, 2008

This is a marker file generated by the precompilation tool, and should not be deleted!

We precompiled our aspx files without problem. The precompilation process work fine. After the precompilation process finsihed, We move all the file to the IIS and when we run the aspx file in the browser we see: "This is a marker file generated by the precompilation tool, and should not be deleted!" and not the original file rendered.

The following are the ways I would use to overcome this problem:

1. Make sure you have also uploaded the PrecompiledApp.config file and check if its not containing any illegal characters in it. Remove if it has.

2. This also occurs when IIS has lost its mappings to ASP.NET. Then try this...

a. Open a command prompt
b. Change to the following directory (or whatever version of the .NET Framework you are using): C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727
c. Run the command "aspnet_regiis.exe -i". This may take several minutes and will report the success/failure of the process.

Try now....worked? Yes (Cool)...or no (well sometimes it does not work, then reinstall IIS.)