Login  
Search All Forums
Dart Home | PowerTCP Zip Compression for .NET | Custom Development Reply | PowerTCP Zip Compression for .NET Topics | Forums   
AuthorForum: PowerTCP Zip Compression for .NET
Topic: Exception: The invoked member is not supported in a dynamic assembly
Brian Paulus

From: Westerville, OH USA
Posts: 3
Member Since: 01/27/12
posted January 27, 2012 11:01 AM

We are in the process up upgrading our web application to use .Net 4.0.

Everything went fine in our local development environments (which are Win7/64 + IIS7), but when we went to deploy to our test environment (which is Win2003 Server/32 + IIS6), we receive a runtime exception whenever we attempt to create an instance of Zip.Archive:

An exception of type 'System.NotSupportedException' occurred and was caught. ----------------------------------------------------------------------------
01/27/2012 08:42:22 Type : System.NotSupportedException, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 
Message : The invoked member is not supported in a dynamic assembly.
Source : mscorlib Help link :  Data : System.Collections.ListDictionaryInternal
TargetSite : System.String get_CodeBase() Stack Trace :  at System.Reflection.Emit.InternalAssemblyBuilder.get_CodeBase()   at
System.Reflection.Assembly.get_EscapedCodeBase()   at
0.7.0(Type , Assembly )   at
0.7.0(LicenseContext , Type , Object , Boolean )   at
0.7.1(LicenseContext , Type , Object , Boolean )   at
0.7.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)
at Dart.PowerTCP.Zip.Archive..ctor()

It appears that it is failing during the validation of the license.

I researched this exception online, and came across this interesting post regarding a very similar problem in another company's product:
http://forums.asp.net/t/1548815.aspx/1

Not sure what similarities there are between the licensing components, but I figured I would include this link in case it helps to track this down.

Does anyone know what the issue might be?

Thanks,
Brian Paulus
Brian Paulus

From: Westerville, OH USA
Posts: 3
Member Since: 01/27/12
posted January 27, 2012 12:45 PM

We did at this point manage to find a workaround. If we deploy our license file to the server, the exception goes away. I'm not sure why we needed to start doing this; per our environment team, we've only needed the license file our our dev machines in the past.
Nick B (Admin)

From: Utica, NY USA
Posts: 589
Member Since: 05/25/10

Extra Support Options
Custom Application Development

posted February 2, 2012 9:29 AM

Hello,

I apologize for the delayed reply; did you create a licenses.licx file in your web application's project, with the content "Dart.PowerTCP.Zip.Archive, Dart.PowerTCP.Zip" (without quotes)?

I was able to reproduce your issue by not including the licenses.licx, but including the file resolved it, and I successfully deployed a new ASP.NET Web Application from a licensed machine to an unlicensed machine, and could access the page without the error.
Nick B (Admin)

From: Utica, NY USA
Posts: 589
Member Since: 05/25/10

Extra Support Options
Custom Application Development

posted February 2, 2012 10:05 AM

Hello,

I've also entered this as TTWeb #5497 to see if we can raise an applicable error message instead.

For information and updates on its status, please contact jamie.powell@dart.com
Brian Paulus

From: Westerville, OH USA
Posts: 3
Member Since: 01/27/12
posted February 2, 2012 10:14 AM

Thank you for the response.

We do indeed have a license file in our web project, though it is named "license.licx" rather than "licenses.licx". Could that be significant?
Nick B (Admin)

From: Utica, NY USA
Posts: 589
Member Since: 05/25/10

Extra Support Options
Custom Application Development

posted February 2, 2012 10:54 AM

Hello,

It technically shouldn't matter, but there are some cases where it does. I'd recommend renaming it to licenses.licx to make sure that isn't the cause.

Are there any Version, Culture, or PublicKeyToken fields included in your licenses.licx? If there are, you may try to delete those; they can cause some licensing issues.

Are you able to create a new ASP.NET 4.0 Web Application with our control? Reference the control, and add:
Dart.PowerTCP.Zip.Archive archive1 = new Dart.PowerTCP.Zip.Archive();
to the Page_Load event, and add a licenses.licx file with the content I previously mentioned. Are you able to access that without an exception?

Alternatively, it's possible that the control is not picking up its licensing information on compile; run the license utility from the start menu program group 'As Administrator' from the right-click context menu. Is the component shown in the listbox, and is your serial number displayed when you select it?
You may also need to run VS2010 'As Administrator' from the right-click context menu in order for it to see the license as well. After this, it may be necessary to delete the project's 'bin' and 'obj' directories to force VS to get the now-available licensing information (no way for it to know that it changed). If you were running your previous version of Visual Studio 'As Administrator', but not VS2010, then this might be the resolution.
Reply | PowerTCP Zip Compression for .NET Topics | Forums   
This site is powered by PowerTCP WebServer Tool PowerTCP WebServer for ActiveX