I load a user control in a web page which throws an exception:
this.LoadControl(someusercontrol); // throws TypeLoadException
The details :
System.Reflection.ReflectionTypeLoadException: The classes in the module cannot be loaded.
at (wrapper managed-to-native) System.Reflection.Assembly:GetTypes (bool)
at System.Reflection.Assembly.GetTypes ()
...
in /usr/src/packages/BUILD/mono2.4.2.3/mcs/class/System.Web/System.Web.Compilation/BuildManager.cs:864
Error message:
"could not load type 'System.Web.UI.WebControls.WebParts.WebPartsZone from assembly 'System.Web, Version=2.0.0.0 ..."
I get it t开发者_如何转开发hat WebPartsZone is not implemented in System.Web. What I do not get is why does it try to load that. I'm not using WebParts in my webpage, or in my control.
How can I find WHO (or WHAT) is calling/using WebPartsZone ? A simple "find in files" search for "webparts" returns no finds.. so what next?
Edit: I'm using ajax control toolkit 3.5 .. MOMA says gives a warning about this assembly using the webparts... is it possible that asp:Panel or asp:UpdatePanel uses a webpart somewhere ? Last I heard, Ajaxcontroltoolkit was working under Mono , right?
I ran grep -rHin webparts in the source of the control toolkit and there are a few controls that have a using System.Web.UI.WebControls.WebParts
in them (MaskedEdit, TabPanel,...).
However, I just built the AjaxControlToolkit.dll assembly from those sources in mono (I'm using subversion trunk, which is quite close to the soon to be release 2.6) and it built fine. I can even run the demo with all the controls (SampleWebSite folder) without a problem... I think that some controls have the using
for WebParts but none is actually using any type from that namespace.
精彩评论