Quantcast
Channel: Don't Be Iffy: ASP.NET
Viewing all articles
Browse latest Browse all 10

Thank you Tomas - bug fix moving ascx files from asp.net 1.1 to asp.net 2.0

$
0
0

I wasted most of my afternoon trying to fix a bizarre error that appeared after I finally moved thedatafarm.com (the main applicaiton) from 1.1 to 2.0. There was a compiler error telling me that my ascx file names/references were ambiguous.

The runtime error was

"[controlname]_ascx is ambiguous in the namespace ASP".

So for example

"talksbydate_ascx is ambiguous in the namespace ASP".

Clearly my control is not named in a way that it conflicts with an ASP control.

And of course it was not happening on my dev machine, only on the deployed application.

I spent a lot of time trying to see if something was hanging around from the old site.

Finally  (finally) I found a blog post, There's a bug in the compiler, that cleared up with the actual problem was. It was not in my own compiled dll, but in the on the fly compilation that ASP.NET does on the server.

It is the result of a known bug in the compiler. The fix is to stop batch compiling and you do that by editing the compilation line in your web.config file to add:

<compilation debug="true" batch="false"/>

Thanks Tomas!

I couldn't find this anywhere on connect, so I have submitted this myself. If you have been bitten by this problem, you can vote for it here.


Viewing all articles
Browse latest Browse all 10

Trending Articles