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,
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.
[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.
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.
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.
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…).
Hi,
Hi,
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,