We're sorry Aspose doesn't work properply without JavaScript enabled.

Free Support Forum - aspose.com

Aspose.Words license problem

Hi !
I have a problem to set a license.
I use code:

var license = new Aspose.Words.License();
license.SetLicense(“Aspose.Words.lic”);

and get the error:
NotSuppportedException: "The invoked member is not supported in a dynamic assembly."
Stack trace:
at System.Reflection.Emit.InternalAssemblyBuilder.GetManifestResourceNames()
at x28925c9b27b37a46.x220f433da4115056.x0004f58017c756bc(Assembly xd3764619ec304ff0, String xf3a1146bd8778bac)
at x28925c9b27b37a46.x220f433da4115056.xde6236852622c268(String x1c1fc72fe1a3b4ea, Assembly x39e0a96279c40baa)
at x28925c9b27b37a46.x220f433da4115056.x7d0214bf69711dd9(String x1c1fc72fe1a3b4ea, Assembly x5807f920b6fc67c4)
at Aspose.Words.License.SetLicense(String licenseName)
at Reports.NewDocumentReport.DOCReport.Generate(String path) in C:\Cellebrite\Forensic\Trunk\PA\Export\Reports\NewDocumentReport\DOCReport.cs:line 22

Please tell me what I can do with it?
Thanks, Yulia

Sorry, guys!
It’s my fault: file Aspose.Words.lic was not defined as EmbeddedResource.
Now all works.
Thanks,
Yulia.

Hi Yulia,


Thanks for your inquiry. It’s great you were able to find what you were looking for. You may also want to take a look at this article that outlines how to apply a license. Please let us know any time you have any further queries.

Best regards,

I’ve actually had this error message a few times too. Normally it went away after updating with nuget and recompiling a few times. But could not pointpoint where the issue really came from.

Now I have it again and can’t get rid of it anymore :frowning:

I’ve got an ASP.NET 4.5 Web API Project. Nothing special about it and it actually just worked a few hours ago. The only thing I’ve done is update all nuget packages.


[NotSupportedException: The invoked member is not supported in a dynamic assembly.]
System.Reflection.Emit.InternalAssemblyBuilder.GetManifestResourceNames() +68
x28925c9b27b37a46.x220f433da4115056.x0004f58017c756bc(Assembly xd3764619ec304ff0, String xf3a1146bd8778bac) +31
x28925c9b27b37a46.x220f433da4115056.xde6236852622c268(String x1c1fc72fe1a3b4ea, Assembly x39e0a96279c40baa) +405
x28925c9b27b37a46.x220f433da4115056.x7d0214bf69711dd9(String x1c1fc72fe1a3b4ea, Assembly x5807f920b6fc67c4) +217
API.WebApiApplication.Application_Start() in c:\Users\Remy\Documents\Supertext\Supertext_App\API\Global.asax.cs:160

[HttpException (0x80004005): The invoked member is not supported in a dynamic assembly.]
System.Web.HttpApplicationFactory.EnsureAppStartCalledForIntegratedMode(HttpContext context, HttpApplication app) +12863325
System.Web.HttpApplication.RegisterEventSubscriptionsWithIIS(IntPtr appContext, HttpContext context, MethodInfo[] handlers) +175
System.Web.HttpApplication.InitSpecial(HttpApplicationState state, MethodInfo[] handlers, IntPtr appContext, HttpContext context) +304
System.Web.HttpApplicationFactory.GetSpecialApplicationInstance(IntPtr appContext, HttpContext context) +404
System.Web.Hosting.PipelineRuntime.InitializeApplication(IntPtr appContext) +475

[HttpException (0x80004005): The invoked member is not supported in a dynamic assembly.]
System.Web.HttpRuntime.FirstRequestInit(HttpContext context) +12880068
System.Web.HttpRuntime.EnsureFirstRequestInit(HttpContext context) +159
System.Web.HttpRuntime.ProcessRequestNotificationPrivate(IIS7WorkerRequest wr, HttpContext context) +12721257

Ahh, pitty.

You get this error if the path to the license file is not correct. Actually similar problem to above. Silly me.
But by all means, this error message is horrible misleading!
Hi,

Thanks for your inquiry. As the error suggests, the source of this problem is inside Global.asax.cs at line 160. Anyway, if we can help you with anything else, please feel free to ask.

Best regards,

I’m also having this problem. However, the problem is intermittent: my software (a WCF service that uses Aspose to convert .docx to .pdf) works for a few days, then it starts giving this error. If I redeploy the service to IIS, it works again for a few days.


This is the exception I’m getting:
System.NotSupportedException: The invoked member is not supported in a dynamic assembly.
at System.Reflection.Emit.InternalAssemblyBuilder.GetManifestResourceNames()

at x28925c9b27b37a46.x220f433da4115056.x0004f58017c756bc(Assembly xd3764619ec304ff0, String xf3a1146bd8778bac)

at x28925c9b27b37a46.x220f433da4115056.xde6236852622c268(String x1c1fc72fe1a3b4ea, Assembly x39e0a96279c40baa)

at x28925c9b27b37a46.x220f433da4115056.x7d0214bf69711dd9(String x1c1fc72fe1a3b4ea, Assembly x5807f920b6fc67c4)

at CreateMyWebServices.PdfService.Implementation.Controllers.Controller()

at System.ServiceModel.InstanceContext.GetServiceInstance(Message message)

at System.ServiceModel.Dispatcher.InstanceBehavior.EnsureServiceInstance(MessageRpc& rpc)

at System.ServiceModel.Dispatcher.ImmutableDispatchRuntime.ProcessMessage41(MessageRpc& rpc)

at System.ServiceModel.Dispatcher.Immuta…).


Does anyone know what might be going on? As said, the assembly has not changed, but it stops working after a while. This is quite hard for us to reproduce as I can’t pinpoint when the problem starts occurring. However, after it occurs for the first time, all subsequent calls get the same exception.

Any help would be most appreciated!

Hi,


Thanks for your inquiry. We are in coordination with product team to get answer pertaining to your query. Soon you will be updated with the required information.

Best regards,

Hi,


Thanks for being patient. Well, from the amount of info provided it is not that easy to pinpoint the cause. Given that the WCF service works initially and then breaks we would think that two cases are possible:

1) Some rare condition occurs (e.g. thread racing, locking)
2) Resource leakage problem.

Is deploy the only way to fix the problem? What about starting/stopping the service or maybe recycling of the app pool?

Is there a chance we can get the simplified WCF implementation from you along with some usage scenarios in order to reproduce this locally on our end?

If not possible we would like to recommend to add more logging to the WCF service. Also, we have not seen any issues like this previously so we cannot comment about .NET 2.0 Aspose.Words assembly being the cause.

Best regards,

We’re experiencing the same issue. Where after a certain amount of time we get this error.

Although I don’t think this should really be causing this, we are trying it as a resolution:
We were setting the license in the constructor of our class. So each instantiation caused the SetLicense() method to be called.

Apparently this is unnecessary (Not prohibited, mind you) as the last line on the applying a license page states: “You are only required to set a license once per application or process”

Hi,


Thanks for the your inquiry. Please also refer to the following article:
When to Apply a License

Best regards,