asp.net core performance profile error

i got following error when running .net core app using ants performance profiler v9

mnbbr9bm2h8n.png


i would appreciate any help

info: Hangfire.SqlServer.SqlServerStorage[0]
Start installing Hangfire SQL objects...

Unhandled Exception: System.TypeLoadException: Could not load type 'System.Data.CommandType' from assembly 'System.Data.SqlClient, Version=4.1.1.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'.
at System.Data.SqlClient.SqlCommand.ExecuteDbDataReader(CommandBehavior behavior)
at Dapper.SqlMapper.ExecuteReaderWithFlagsFallback(IDbCommand cmd, Boolean wasClosed, CommandBehavior behavior)
at Dapper.SqlMapper.<QueryImpl>d__124`1.MoveNext()
at System.Collections.Generic.List`1..ctor(IEnumerable`1 collection)
at System.Linq.Enumerable.ToList[TSource](IEnumerable`1 source)
at Dapper.SqlMapper.Query[T](IDbConnection cnn, String sql, Object param, IDbTransaction transaction, Boolean buffered, Nullable`1 commandTimeout, Nullable`1 commandType)
at Hangfire.SqlServer.SqlServerObjectsInstaller.IsSqlEditionSupported(DbConnection connection)
at Hangfire.SqlServer.SqlServerObjectsInstaller.Install(DbConnection connection, String schema)
at Hangfire.SqlServer.SqlServerStorage..ctor(String nameOrConnectionString, SqlServerStorageOptions options)
at Hangfire.SqlServerStorageExtensions.UseSqlServerStorage(IGlobalConfiguration configuration, String nameOrConnectionString)
Tagged:

Comments

  • Hi,

    If you use Proccess Explorer to find out the commands being passed to dotnet.exe, you can try running the command by hand from the command prompt to see if you get the same result or not, that would at least narrow down where the problem lies.

    It would also be really helpful for us to know what command is being passed - if you don't want to publish this email please it into support.
    Have you visited our Help Centre?
  • LoganRLoganR Posts: 1 New member
    I have the same TypeLoadException with System.Data.CommandType (dependency for Dapper). Was a resolution for this ever found?

    I can run the dotnet core application from a command line and everything is fine. But when I launch the same application within ANTS Profiler, I get these errors.
  • Jessica RJessica R Posts: 1,319 Rose Gold 4
    Hi @LoganR,

    We've received your support request on this issue.

    I will post an update here once we've made any conclusions.

    Jessica Ramos | Product Support Engineer | Redgate Software

    Have you visited our Help Center?


  • I am seeing a similar exception when trying to profile. Did you ever reach a conclusion?
  • Jessica RJessica R Posts: 1,319 Rose Gold 4
    Hi @AndreasHjelle!

    We determined that it was caused by the "Enable SQL query profiling" option, though we haven't gotten to the bottom of why this is yet (we've got a bug logged with reference PP-3987).

    @LoganR didn't need the SQL results so disabling the option was a suitable workaround- would you be able to do this as well?

    Jessica Ramos | Product Support Engineer | Redgate Software

    Have you visited our Help Center?


Sign In or Register to comment.