GithubHelp home page GithubHelp logo

Comments (10)

lucaspimentel avatar lucaspimentel commented on June 1, 2024

Hey, @L1qu1d1c3. From your last comment in "Additional context," it looks like you originally didn't reference the Datadog.Trace.ClrProfiler.Managed NuGet package in your application. This is a necessary step for now in .NET Core so our managed libraries get deployed with your app. (In .NET Framework, we can deploy it to the GAC using the MSI installer.)

Did the 500 errors stop then you added the Datadog.Trace.ClrProfiler.Managed NuGet package? Where are you seeing the "website name cannot be empty" message? This is not one of our error messages. Can you provide a minimal project that reproduces this issue?

Also (and this is probably not important for this issue), but I'm not sure what you mean by ".NET Core 4.1" since .NET Core is only up to 2.2.x (and a 3.0 preview). For reference:

from dd-trace-dotnet.

L1qu1d1c3 avatar L1qu1d1c3 commented on June 1, 2024

Hi @lucaspimentel ,

I implemented the Nuget Package and i'm getting the following issues:

2019-01-22 16:07:48.6164 | Application startup exception | Fatal  | System.AggregateException: One or more errors occurred. (Could not load file or assembly 'System.Data, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089'. The system cannot find the file specified.) ---> System.IO.FileNotFoundException: Could not load file or assembly 'System.Data, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089'. The system cannot find the file specified.
   at Datadog.Trace.ClrProfiler.Integrations.AdoNetIntegration.ExecuteDbDataReaderAsync(Object this, Int32 behavior, Object cancellationTokenSource)
   at System.Data.Common.DbCommand.ExecuteReaderAsync(CommandBehavior behavior, CancellationToken cancellationToken)
   at System.Data.Common.DbCommand.ExecuteReaderAsync(CancellationToken cancellationToken)
   at Microsoft.EntityFrameworkCore.Storage.Internal.RelationalCommand.<ExecuteAsync>d__26.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter`1.GetResult()
   at Microsoft.EntityFrameworkCore.Migrations.HistoryRepository.<GetAppliedMigrationsAsync>d__32.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter`1.GetResult()
   at Microsoft.EntityFrameworkCore.Migrations.Internal.Migrator.<MigrateAsync>d__12.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Ids.xxx.Startup.<InitializeDatabaseAsync>d__5.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Ids.xxx.Startup.<>c__DisplayClass9_0.<<Configure>b__0>d.MoveNext()
   --- End of inner exception stack trace ---
   at System.Threading.Tasks.Task.ThrowIfExceptional(Boolean includeTaskCanceledExceptions)
   at System.Threading.Tasks.Task.Wait(Int32 millisecondsTimeout, CancellationToken cancellationToken)
   at System.Threading.Tasks.Task.Wait()
   at Ids.xxx.Startup.Configure(IApplicationBuilder app, IHostingEnvironment env, ILoggerFactory loggerFactory)
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at Microsoft.AspNetCore.Hosting.ConventionBasedStartup.Configure(IApplicationBuilder app)
   at Microsoft.Extensions.DependencyInjection.IServiceCollectionExtensions.InjectApiVersionRoutePolicy.<>c__DisplayClass2_0.<Configure>b__0(IApplicationBuilder app)
   at Microsoft.AspNetCore.Hosting.Internal.WebHost.BuildApplication()
---> (Inner Exception #0) System.IO.FileNotFoundException: Could not load file or assembly 'System.Data, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089'. The system cannot find the file specified.
File name: 'System.Data, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089'
   at Datadog.Trace.ClrProfiler.Integrations.AdoNetIntegration.ExecuteDbDataReaderAsync(Object this, Int32 behavior, Object cancellationTokenSource)
   at System.Data.Common.DbCommand.ExecuteReaderAsync(CommandBehavior behavior, CancellationToken cancellationToken)
   at System.Data.Common.DbCommand.ExecuteReaderAsync(CancellationToken cancellationToken)
   at Microsoft.EntityFrameworkCore.Storage.Internal.RelationalCommand.<ExecuteAsync>d__26.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter`1.GetResult()
   at Microsoft.EntityFrameworkCore.Migrations.HistoryRepository.<GetAppliedMigrationsAsync>d__32.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter`1.GetResult()
   at Microsoft.EntityFrameworkCore.Migrations.Internal.Migrator.<MigrateAsync>d__12.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Ids.xxx.Startup.<InitializeDatabaseAsync>d__5.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Ids.xxx.Startup.<>c__DisplayClass9_0.<<Configure>b__0>d.MoveNext()<---

I am unable to start the application because of this. I'm using version 0.7.0.0-beta of the ClrProfiler.

I've contacted support directly and created a ticket with them,

from dd-trace-dotnet.

lucaspimentel avatar lucaspimentel commented on June 1, 2024

@L1qu1d1c3: Can you confirm which version of .NET your application targets at build time (see <TargetFramework> in the csproj file) and which version(s) of the runtime are installed on the host?

I think there's some kind of mix up going on here. The Datadog.Trace.ClrProfiler.Managed NuGet package targets three different frameworks: netstandard2.0, net45, and net461. The netstandard2.0 assembly references System.Data.Common.dll while the net45/net461 assemblies reference System.Data.dll, which is the one in the error message:

Could not load file or assembly 'System.Data, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089'. The system cannot find the file specified.

from dd-trace-dotnet.

L1qu1d1c3 avatar L1qu1d1c3 commented on June 1, 2024

@lucaspimentel , targetted framework is <TargetFramework>net461</TargetFramework>

from dd-trace-dotnet.

lucaspimentel avatar lucaspimentel commented on June 1, 2024

@L1qu1d1c3: I'm sorry, but <TargetFramework>net461</TargetFramework> is .NET Framework 4.6.1, but you said your app runs on .NET Core. Both frameworks are very different internally and we need to know which one you are using (and which version) to be able to provide useful support. See this article for more information on target frameworks.

At the moment, my best guess is that you have multiple projects with mixed targets (.NET Framework, .NET Core, .NET Standard), which could be causing the final application to reference the wrong System.Data assembly.

I've heard of similar issues happening with System.Net.Http:

(edit: add links to similar issues with System.Net.Http and link to target frameworks article)

from dd-trace-dotnet.

L1qu1d1c3 avatar L1qu1d1c3 commented on June 1, 2024

Hi @lucaspimentel , my apologies, we have 2 projects and one of them is in net461, the other is .net core
<TargetFramework>netcoreapp1.1</TargetFramework>

For the project with net461, i was using the tracer for IIS, which doesn't work aswell.

from dd-trace-dotnet.

L1qu1d1c3 avatar L1qu1d1c3 commented on June 1, 2024

Hi @lucaspimentel ,
i'd like to update this issue:
I've gotten it to work with .net core and it's nuget package. The issue i'm having now is with IIS sites because i'm using net461.

Thank you

from dd-trace-dotnet.

lucaspimentel avatar lucaspimentel commented on June 1, 2024

@L1qu1d1c3: let's handle this through the ticket you created with the Support team

from dd-trace-dotnet.

odyth avatar odyth commented on June 1, 2024

what was the resolution to this? I'm also having this problem, just started too.

from dd-trace-dotnet.

pierotibou avatar pierotibou commented on June 1, 2024

Hello @odyth, Thanks for reaching out. I haven't found all the details of the related support ticket unfortunately.
Nevertheless, would you mind explaining the exact issue on your end and your setup (framework, tracer version). Can you also activate the debug logs to see if you have specific errors that could indicate the cause of the issue?
Anyhow, I'd invite you to open a new issue or a support ticket cause the underlying issues may be different anyway and it will ease the follow-up.

from dd-trace-dotnet.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.