Last post Sep 04, 2012 02:22 PM by jcutrono
Sep 04, 2012 09:37 AM|jcutrono|LINK
I have a website I am precompiling. Most pages are standard aspx with codebehinds, but some are either html or aspx files with no codebehind. All of these files get filled with the marker file content. What is strange now is when I go to these pages,
the message is the only thing I see. ASPX files render correctly, but html files do not render their content. In the documentation I have read, the HTML files should just be copied over and not replaced with the marker file text.
1. ASP.NET is registered with IIS "aspnet regiis -i"
2. The precompiled.config has correct content (version="2" updatable="false")
Sep 04, 2012 09:53 AM|jcutrono|LINK
I also confirmed that in the bin folder, the .compiled files that correspond to the static files are there.
This is strange considering I made a test site with some similar file structures and the content of HTML files was left unchanged. Any ideas on what could cause this? I used the same aspnet_compiler for both:
aspnet_compiler -m /LM/W3SVC/3/ROOT/ -f "C:\Projects\PrecompileTest"
To triple check everything thus far, I have the source directory and compiled directory both setup in IIS and the source directory displays everything correctly, and the compiled does not
Sep 04, 2012 01:40 PM|jcutrono|LINK
After much reading and manipulating of the parameters to the aspnet_compiler, I have no idea why it is trying to compile HTML files. My workaround for now is after compilation to copy over all HTML files from the source directory. All content is now showing
correctly. I would appreciate any follow up to this to explain why HTML content is being replaced with marker file content as if it were and ASPX page as well as having a .compiled file generated to the bin folder.
Sep 04, 2012 02:22 PM|jcutrono|LINK
I found the problem
<add extension=".html" type="System.Web.Compilation.PageBuildProvider" />
<add extension=".htm" type="System.Web.Compilation.PageBuildProvider" />
Removing these lines solved the problem and allows the compiler to ignore html files. Hope this adds one more check for everyone before going down the rabbit hole