opentelemetry-dotnet-instru.../test/test-applications/integrations/TestApplication.AspNet.NetF...
Igor Kiselev 6e307db05b
Automatic LoaderOptimization.SingleDomain (#4187)
* All non-default app domains use LoaderOptimization.SingleDomain

Solves "Loading this assembly would produce a different grant set from other instances" for IIS .Net Framework applications.
__DDVoidMethodType__  injected to mscorlib.
__DDVoidMethodType__.__DDPatchAppDomainSetup__ use reflection-created delegate that calls
OpenTelemetry.AutoInstrumentation.Loader.AppConfigUpdater.ModifyConfig to modify AppDomainSetup by setting LoaderOptimization.SingleDomain.
That method called from AppDomain.CreateDomain and AppDomainManager.CreateDomainHelper.
OpenTelemetry.AutoInstrumentation.Loader.AppConfigUpdater loader assembly loaded from __DDVoidMethodType__ static ctor.
Added helpers: SignatureBuilder and MemberResolver.

* Added installer parameter to skip GAC registration

Added Asp.Net tests without registration assemblies in GAC.
Removed LoaderOptimization=SingleDomain through registry change for ASP.Net tests.

* Removed LoaderOptimization workaround from test dockerfiles

* Code format applied

* Updated test build to produce no-GAC docker images

* Extended  SignatureBuilder by providing semi-safe wrappers

Moved it to be header-only.
Added unit tests for SignatureBuilder.

* Updated change log and documentation

* Removed Troubleshooting link from IIS instrumentation docs

* Fixed accident docker file changes

* Added comment about callers of AppConfigUpdater.ModifyConfig

* Update CHANGELOG.md typo based on review

Co-authored-by: Chris Ventura <45495992+nrcventura@users.noreply.github.com>

* Smaller cleanups

* Minor names/comments changes based on @zacharycmontoya review

* Fixed formatting

* Make AppConfigUpdater internal

---------

Co-authored-by: Chris Ventura <45495992+nrcventura@users.noreply.github.com>
2025-05-12 13:39:04 +02:00
..
App_Start Add Asp.Net WebApi tests (#2272) 2023-03-01 11:49:07 +00:00
Controllers GraphQL support for 8.0+ (#3615) 2024-09-09 08:22:37 +02:00
Helpers Update TestApplication.AspNet (#1910) 2023-01-09 15:29:26 -08:00
Properties Update TestApplication.AspNet (#1910) 2023-01-09 15:29:26 -08:00
Views CodeQL fixes - tests applications (#4158) 2025-04-16 10:33:23 +02:00
.dockerignore Update TestApplication.AspNet (#1910) 2023-01-09 15:29:26 -08:00
Directory.Build.props Update TestApplication.AspNet (#1910) 2023-01-09 15:29:26 -08:00
Dockerfile Automatic LoaderOptimization.SingleDomain (#4187) 2025-05-12 13:39:04 +02:00
Global.asax Update TestApplication.AspNet (#1910) 2023-01-09 15:29:26 -08:00
Global.asax.cs Add Asp.Net WebApi tests (#2272) 2023-03-01 11:49:07 +00:00
TestApplication.AspNet.NetFramework.csproj [TestApplication.AspNet.NetFramework] remove reference to non-existing file (#4143) 2025-04-11 10:51:08 +00:00
Web.config CodeQL fixes - tests applications (#4158) 2025-04-16 10:33:23 +02:00
packages.config Bump OTel to 1.11.2 + transitive dependencies + internal dependencies (#4077) 2025-03-06 11:08:15 +01:00