Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

The invoked member is not supported in a dynamic assembly #4511

Open
lrwh opened this issue Aug 14, 2023 · 5 comments
Open

The invoked member is not supported in a dynamic assembly #4511

lrwh opened this issue Aug 14, 2023 · 5 comments

Comments

@lrwh
Copy link

lrwh commented Aug 14, 2023

Describe the bug
Hi,I have a .NET application that uses versions 1.31.2, 2.32, and 2.27 of dd-trace-donet. An error was reported in the application call flowchart. If the. NET probe is not used, this exception will not occur. It seems that ddtrace and the application used the same dll, but this is just my speculation.

Error info

CustomerHandlerErrorAttribute
System.Web.HttpParseException (0x80004005): The invoked member is not supported in a dynamic assembly. ---> System.NotSupportedException: The invoked member is not supported in a dynamic assembly.
   At System.Reflection.Emit.InternalAssemblyBuilder.get_Location()
   At System.Web.UI.Util.GetAssemblyCodeBase(Assembly assembly)
   At System.Web.UI.Util.AddAssemblyToStringCollection(Assembly assembly, StringCollection toList)
   At System.Web.UI.Util.AddAssembliesToStringCollection(ICollection fromList, StringCollection toList)
   At System.Web.Compilation.AssemblyBuilder.AddCodeCompileUnit(BuildProvider buildProvider, CodeCompileUnit compileUnit)
   At System.Web.WebPages.Razor.RazorBuildProvider.GenerateCodeCore(IAssemblyBuilder assemblyBuilder)
   At System.Web.Compilation.AssemblyBuilder.AddBuildProvider(BuildProvider buildProvider)
   At System.Web.Compilation.AssemblyBuilder.AddBuildProvider(BuildProvider buildProvider)
   At System.Web.Compilation.BuildProvidersCompiler.ProcessBuildProviders()
   At System.Web.Compilation.BuildProvidersCompiler.PerformBuild()
   At System.Web.Compilation.BuildManager.CompileWebFile(VirtualPath virtualPath)
   At System.Web.Compilation.BuildManager.GetVPathBuildResultInternal(VirtualPath virtualPath, Boolean noBuild, Boolean allowCrossApp, Boolean allowBuildInPrecompile, Boolean throwIfNotFound, Boolean ensureIsUpToDate)
   At System.Web.Compilation.BuildManager.GetVPathBuildResultWithNoAssert(HttpContext context, VirtualPath virtualPath, Boolean noBuild, Boolean allowCrossApp, Boolean allowBuildInPrecompile, Boolean throwIfNotFound, Boolean ensureIsUpToDate)
   At System.Web.Compilation.BuildManager.GetVirtualPathObjectFactory(VirtualPath virtualPath, HttpContext context, Boolean allowCrossApp, Boolean throwIfNotFound)
   At System.Web.Compilation.BuildManager.GetCompiledType(VirtualPath virtualPath)
   At System.Web.Mvc.BuildManagerCompiledView.Render(ViewContext viewContext, TextWriter writer)
   At System.Web.Mvc.ViewResultBase.ExecuteResult(ControllerContext context)
   At System.Web.Mvc.ControllerActionInvoker.InvokeActionResultFilterRecursive(IList`1 filters, Int32 filterIndex, ResultExecutingContext preContext, ControllerContext controllerContext, ActionResult actionResult)
   At System.Web.Mvc.ControllerActionInvoker.InvokeActionResultFilterRecursive(IList`1 filters, Int32 filterIndex, ResultExecutingContext preContext, ControllerContext controllerContext, ActionResult actionResult)
   At System.Web.Mvc.ControllerActionInvoker.InvokeActionResultWithFilters(ControllerContext controllerContext, IList`1 filters, ActionResult actionResult)
   At System.Web.Mvc.Async.AsyncControllerActionInvoker.<>c__DisplayClass3_1.<BeginInvokeAction>b__5(IAsyncResult asyncResult)

dd-trace-dotnet debug log

dotnet-tracer-native-w3wp-72892.log.txt

This is a very old application that cannot be upgraded to code. Can we filter from the .NET probe, but I don't know what the conflicting component is. I need your help. Thank you!

@lrwh lrwh changed the title Called members are not supported in dynamic assemblies The invoked member is not supported in a dynamic assembly Aug 14, 2023
@andrewlock
Copy link
Member

Hi @lrwh, sorry to see you're having issues. Please could you provide some more details?

Hi,I have a .NET application that uses versions 1.31.2, 2.32, and 2.27 of dd-trace-donet

How are you using multiple versions? Are you using custom instrumentation and automatic instrumentation? That would still only allow 2

uses versions 1.31.2

This is a very old version of the tracer, which has known bugs, especially related to enumerating dynamic assemblies. We strongly recommend updating to a newer version of the tracer.

If the. NET probe is not used

When you say ".NET probe", do you mean that it doesn't happen if you don't use the tracer? How are you running your application? Have you installed the MSI? Are you using custom instrumentation?

Thanks

@lrwh
Copy link
Author

lrwh commented Sep 1, 2023

Hi,andrewlock ,Thank you very much for your reply.

How are you using multiple versions? Are you using custom instrumentation and automatic instrumentation? That would still only allow 2

Use one version at a time, not all.

This is a very old version of the tracer, which has known bugs, especially related to enumerating dynamic assemblies. We strongly recommend updating to a newer version of the tracer.

Unable to update program version, it was written by another team.

When you say ".NET probe", do you mean that it doesn't happen if you don't use the tracer? How are you running your application? Have you installed the MSI? Are you using custom instrumentation?

Using MSI without customization,We speculate that this engine Razor is not supported. If possible, we hope to find the configuration and eliminate it to avoid this error.

Thanks

@andrewlock
Copy link
Member

Thanks for the reply @lrwh!

We speculate that this engine Razor is not supported

Razor is definitely supported, we have tests for it and haven't run into any issues.

I think we're going to need more information to get to the bottom of this problem (which version of the framework you're using, which libraries, all the debug logs etc). Could you please open a support ticket by visiting https://help.datadoghq.com/hc/en-us/requests/new and they'll handle securely collecting all the relevant information. You can link back to this github issue when you submit the request. Thanks!

@lrwh
Copy link
Author

lrwh commented Sep 7, 2023

Sorry, @andrewlock , some information cannot be obtained due to the customer's environment.

The current knowledge is as follows:

  • The operating system is window server 2012 R2

  • The version of iis is 4.0

  • All dotnet applications are deployed under iss

This business is mainly a workflow business, which occasionally does not report errors, but in most cases, errors occur. After uninstalling the probe, the application is normal.

After the code is executed to return view, the front-end reports an error: System.Web.HttpParseException (0x80004005): The invoked member is not supported in a dynamic assembly

image

@andrewlock
Copy link
Member

Hi @lrwh, could you please open a support ticket by visiting https://help.datadoghq.com/hc/en-us/requests/new and they'll handle securely collecting all the relevant information. You can link back to this github issue when you submit the request. Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants