Last post Apr 30, 2010 08:50 AM by JoelDKraft
Apr 19, 2010 08:37 AM|JoelDKraft|LINK
I am working on our development site that we are migrating from ASP.NET 3.5 to 4.0. Most stuff seems to be working fairly well, with only a few tweaks necessary so far.
My issue is with a third party component that uses version 2.1 of Xheo.Licensing.dll. We've been using the control and licensing successfully under 3.5 since it was first released, but in 4.0 things have gotten a little hairy.
The licensing control iterates over all of the assemblies in the AppDomain and accesses the CodeBase property on them. I now get a "The invoked member is not supported in a dynamic assembly." exception during that iteration. This was not a problem under
3.5! More frustrating is that is doesn't happen all of the time.
I was able to do a little investigation and found a couple of assemblies that appear to be created by the framework itself.
The first assembly has a unique GUID name (A_f3fd500a_14ae_46c4_8df9_5ad80e8c7744, for example) and a varying number of classes, each also with a GUID name (T_f8b496b1_d316_4973_8f42_24fc8871eb30 and T_2cf3382c_031d_40c6_b1c6_0fec31022de0, for example).
Each of the exposed classes implements only the System.Web.Util.IWebObjectFactory interface.
The second dynamic assembly that I have been able to identify was named "Anonymously Hosted DynamicMethods Assembly", though there were no classes in it.
When things recycle, things work until one of these classes is created again, though I have not been able to determine any sort of pattern or operation that can reproduce it.
I know that none of my code does this, and it doesn't seem that the third-party components do, either, since they worked under 3.5 without creating the dynamic assemblies. Has something changed under the hood in 4.0 that now creates dynamic assemblies? Is
there a way to revert to the old behavior?
I obviously want the problem fixed at the licensing DLL-level, but that is slow going...
Apr 19, 2010 01:14 PM|dswersky|LINK
Your best bet is to contact the vendor of that third-party component. I would be wary of making configuration changes to your environment just to fix that one problem- you could end up breaking other things in the process.
You could also contact Xheo, they may be able to assist.
Apr 19, 2010 01:38 PM|JoelDKraft|LINK
I agree that is the correct long-term solution. I'm not the person with the contract with Xheo, but I'll give it a try with them directly as well.
I'd still like to figure out the answer. I like to know what secret things the system might be doing, and would like to keep up our testing of the site, even if a configuration change never made it into production.
Apr 21, 2010 09:02 PM|JoelDKraft|LINK
Well I sorted out the issue.
It's not that dynamic assembles weren't created under previous frameworks, but that the 4.0 framework handles them differently.
The licensing assembly checked to see if an assembly was a System.Reflection.Emit.AssemblyBuilder (with System.Reflection.Assembly as a base) to determine if an assembly was dynamic. If it was, then it was ignored, otherwise it went on to access the CodeBase
In .NET 4.0, dynamic assembles are of type System.Reflection.Emit.InternalAssemblyBuilder!! Since this is also has System.Reflection.Assembly as a base, the check breaks!
Apr 22, 2010 08:46 AM|dswersky|LINK
Interesting! Did your vendor or Xheo say they'll be updating for 4.0?
Apr 22, 2010 08:58 AM|JoelDKraft|LINK
I haven't gotten any confirmation. I'm not sure if they even believe it is a problem yet, since I seem to be the only one that experienced it so far.
My vendor is using version 2.1 of the Xheo controls, and they are up to 4.x now. I'm not sure they are even supporting his version any more. I reported it to them directly as well, though, but haven't heard back yet.
Apr 23, 2010 03:51 PM|RdeG|LINK
I've been looking at this problem today also.
Apr 29, 2010 07:44 PM|stas.popov|LINK
I have the same problem with the Xheo.Licensing.dll after migrating to ASP.Net 4.0
The application cannot resolve the Xheo and generates a invalid license response.
Event code: 3005
Event message: An unhandled exception has occurred.
Event time: 30/04/2010 10:05:36 a.m.
Event time (UTC): 29/04/2010 10:05:36 p.m.
Event ID: 75e13c4c6819426a840b813d9ef73dba
Event sequence: 53
Event occurrence: 3
Event detail code: 0
Application domain: /LM/W3SVC/1146484069/Root/evl-1-129170490436718750
Trust level: Full
Application Virtual Path: /xxx
Application Path: E:\xxx\xxx\wwwxx1.xxx.xxx\xxx\
Machine name: WWW
Process ID: 8164
Process name: w3wp.exe
Account name: NT AUTHORITY\NETWORK SERVICE
Exception type: LicenseException
Exception message: An unexpected error occurred while attempting to obtain a valid license for SurveyBox. Please contact Feedback Server for assistance (Url = http://www.dataillusion.com/fs, Email = firstname.lastname@example.org, Phone = N/A). The exception thrown
was The invoked member is not supported in a dynamic assembly.
at Xheo.Licensing.ExtendedLicenseProvider.GetLicense(LicenseContext context, Type type, Object instance, Boolean allowExceptions)
at System.ComponentModel.LicenseManager.ValidateInternalRecursive(LicenseContext context, Type type, Object instance, Boolean allowExceptions, License& license, String& licenseKey)
at System.ComponentModel.LicenseManager.Validate(Type type, Object instance)
at DataIllusion.FeedbackServer.WebControls.SurveyBox.OnInit(EventArgs e)
at System.Web.UI.Control.InitRecursive(Control namingContainer)
at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)
The invoked member is not supported in a dynamic assembly.
at Xheo.Licensing.ExtendedLicenseProvider.ᐁ(LicenseContext , Type , Object , LicenseSigningKey , ArrayList , StringBuilder )
Request path: /xxx/ContentPages/DataEntry/xxx/StudentSurveyBoxInsert.aspx
User host address: xxx.xxx.xxx.xx
Is authenticated: True
Authentication Type: Forms
Thread account name: NT AUTHORITY\NETWORK SERVICE
Thread ID: 1
Is impersonating: False
Stack trace: at Xheo.Licensing.ExtendedLicenseProvider.GetLicense(LicenseContext context, Type type, Object instance, Boolean allowExceptions)
Custom event details:
For more information, see Help and Support Center at http://go.microsoft.com/fwlink/events.asp.
Apr 30, 2010 08:50 AM|JoelDKraft|LINK
HA! I was having the issue with FeedbackServer as well.
I was actually trying to help Thomas identify the scope of the issue when I made this post, and we were finally able to figure it out.
They are working on an updated build that works around the issue now.