Get Help:Ask a Question in our Forums|Report a Bug|More Help Resources
Last post Dec 11, 2009 11:57 AM by nagappmking
Feb 07, 2006 06:41 PM|LINK
Feb 08, 2006 05:42 AM|LINK
Could you post some sample code of how the user control is being referenced?
Also -- how are you using the user-control? Are you programmatically referencing it, or simply declarating and using it on a page?
Lastly -- does it work when you compile and run in Visual Studio? Is it only when you do a publish that it fails?
Feb 08, 2006 05:44 PM|LINK
Feb 08, 2006 05:57 PM|LINK
You should be able to do this scenario just fine. If you are just using the control on a page, then you should be able to just use a <%@ Register %> directive (no refrence directive required).
Can you send me via email (email@example.com) a simple project that shows this problem? I can then help debug it more and figure out what is going on.
Feb 08, 2006 07:06 PM|LINK
Mar 23, 2006 10:53 PM|LINK
Did you manage to get anywhere with this? I have exactly the same problem.
To make things even more confusing I have 5 user controls in a directory, 4 work fine but the 5th (and any subsequent ones I make) cause the error describe above.
I've also noticed that when you publish the website a strange DLL is created. There are all of the normal DLLs (App_Web_xxxxxx.dll) but there is an extra one called App_Web_OffendingUserControlName.ascx.xxxxx.dll. This is only DLL that is named this way;
and I get one of them for every user control that doesn't work.
I can also confirm that moving the user control to the same directory as the page that it is used on resolves the issue.
Mar 30, 2006 03:00 PM|LINK
May 08, 2006 09:04 AM|LINK
I have precisely the same problem provided that I request the compiled application to be updatable (-u switch on aspnet_compiler). Without the switch, the problem disappears.
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.
Jun 02, 2006 11:32 AM|LINK
DId you find any resolve to this issue? I am stuck in an identical problem.
Please let me know