HttpCompileException on Seemingly Valid ASP.NET Pages

M

Mike Hofer

I am being plagued by a recurring issue in Visual Studio .NET 2003
(.NET Framework 1.1). I'm developing on XP SP2, under IIS 5.1.

Here's what's happening. I'll be designing a Web Form and everything
is cruising along just fine. I add some controls, run the app, it
renders fine, add some more controls, and everything is fine. Once
I've got all the controls in place, I start putting in the back-end
code. No more changes to the HTML take place at that point. But then,
all of a sudden, ASP.NET starts refusing to compile the HTML. The VB
code compiles, but the page itself fails to load into the browser, and
an inspection of the event log reveals the following exception:

System.Web.HttpCompileException: External component has thrown an
exception.
at
System.Web.Compilation.BaseCompiler.ThrowIfCompilerErrors(CompilerResults
results, CodeDomProvider codeProvider, CodeCompileUnit sourceData,
String sourceFile, String sourceString)
at System.Web.Compilation.BaseCompiler.GetCompiledType()
at System.Web.Compilation.PageCompiler.CompilePageType(PageParser
pageParser)
at System.Web.UI.PageParser.CompileIntoType()
at
System.Web.UI.TemplateParser.GetParserCacheItemThroughCompilation().

Research reveals that there's something wrong with my HTML. So I've
examined the HTML but for the life of me, I can't find anything wrong.
Further, this has happened several different times, on several
different pages, at various times in the development cycle. The
project isn't particularly large. There are only about 75 Web forms in
the site. We don't use any custom controls.

But here's the really confusing part. I can take that HTML, and all
the code from the page, cut it out, paste it into Notepad, then delete
the form, create a new form, and paste the same exact code into the
page, and it will compile just fine.

What the heck is going on? Has anyone else seen this behavior? I've
read other posts that swear that there's something wrong with my HTML
code, but if that were the case, it wouldn't compile when I pasted it
back in. This behavior is a time sink, and it's starting to occur with
increasing frequency.

I'm open to suggestions, and any help would be greatly appreciated.

Thanks in advance,
Mike
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Staff online

Members online

Forum statistics

Threads
473,769
Messages
2,569,582
Members
45,071
Latest member
MetabolicSolutionsKeto

Latest Threads

Top