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

GRPC error when use Register-OpenTelemetryForIIS #4048

Open
staringnight opened this issue Feb 17, 2025 · 2 comments
Open

GRPC error when use Register-OpenTelemetryForIIS #4048

staringnight opened this issue Feb 17, 2025 · 2 comments
Assignees

Comments

@staringnight
Copy link

staringnight commented Feb 17, 2025

Bug Report

Symptom

Describe the bug
Our web service in IIS have bugs when create gprc channel after integrate opentelemetry

.net framework is 4.72
grpc.core is 2.46.6
os is windows Server 2019

the integrate script is
`$module_url = "https://github.com/open-telemetry/opentelemetry-dotnet-instrumentation/releases/latest/download/OpenTelemetry.DotNet.Auto.psm1"
$download_path = Join-Path $env:temp "OpenTelemetry.DotNet.Auto.psm1"
Invoke-WebRequest -Uri $module_url -OutFile $download_path -UseBasicParsing

Import-Module $download_path

Install-OpenTelemetryCore

Register-OpenTelemetryForIIS`

this error is
Error loading native library. Not found in any of the possible locations: C:\Windows\Microsoft.Net\assembly\GAC_MSIL\Grpc.Core\v4.0_2.0.0.0__d754f35622e28bad\grpc_csharp_ext.x86.dll,C:\Windows\Microsoft.Net\assembly\GAC_MSIL\Grpc.Core\v4.0_2.0.0.0__d754f35622e28bad\runtimes/win-x86/native\grpc_csharp_ext.x86.dll,C:\Windows\Microsoft.Net\assembly\GAC_MSIL\Grpc.Core\v4.0_2.0.0.0__d754f35622e28bad\../..\runtimes/win-x86/native\grpc_csharp_ext.x86.dll

Expected behavior
we need the web service grpc can work like before

Image
@pjanotti pjanotti self-assigned this Feb 26, 2025
@pjanotti
Copy link
Contributor

Hi @staringnight - we don't have a repro for it, could you provide minimal steps to reproduce the issue? At first we don't add these to the GAC since they are native libraries.

It seems that your application has a direct reference to Grpc.Core, could you confirm is that is really the case? Are you referencing the Grpc.Core NuGet package from your app?

@staringnight
Copy link
Author

Hi @pjanotti , Yes, our application has a direct reference to Grpc.Core, and it is a very old project. We find that the grpc_csharp_ext.x86.dll still in bin folder . So, why our service load dll at gac rather than bin, and when it can not load from gac , why not try to load at bin? is there any way to let it load grpc_csharp_ext.x86.dll from bin? or we copy the dll to the gac folder?

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