Get Help:Ask a Question in our Forums|Report a Bug|More Help Resources
May 27, 2006 08:44 PM|LINK
I was getting this problem as well, and think I might have figured out what is going on. Of course if Scott Gu puts another post up here ... I would go with whatever he suggests.
The problem that I was having is that I was trying to precompile my site, and then move it to the live server that the site is actually hosted on. I was getting this error because the machine that I was coding on was running
the 64-bit version of the .NET Framework 2.0 (which refers to the extensions at C:\WINDOWS\Microsoft.NET\Framework64\v2.0.50727). It turns out the computer that the site is hosted on is running the 32-bit version of the ASP.NET 2.0 (refers to the extensions
So, what I am guessing is that when Visual Studio 2005 precompiles the code it does it with respect to a target version of the framework ... namely whatever version your computer is running. Then when I moved that code that was designed for the 64-bit version
of the .NET Framework 2.0 over to the 32-bit version ... some things that didn't match up (there has to be some differences or you would refer to the same folder for extensions).
The solution I came up with ... don't precompile the site. Move the files out there, and the first time the site is hit it will dynamically compile for whatever version of the .NET Framework the server is running.