none
WSDL issue - System.ArgumentException: 'Cannot bind to the target method because its signature or security transparency is not compatible with that of the delegate type.' RRS feed

  • Question

  • We are exporting a WSDL from our application and we are getting the below error:

    System.ArgumentException: 'Cannot bind to the target method because its signature or security transparency is not compatible with that of the delegate type.'

    at the below CreateDelegate methodminside my constructor-

      public OracleBatchCommandSet()
            {
                Assembly sysData = Assembly.Load("Oracle.DataAccess, Version=4.122.19.1, Culture=neutral, PublicKeyToken=89B483F429C47342");
                orclCmdSetType = sysData.GetType("Oracle.DataAccess.Client.OracleCommand");
                orclCmdSet = Activator.CreateInstance(orclCmdSetType, true); 
                append = (AppendDelegate)Delegate.CreateDelegate(typeof(AppendDelegate), orclCmdSet, "Append");

    The context is- we are migrating our data layer from ADO.Net to ODP.Net. This was a working code with ADO.Net and i am seeing this error with new ODP.Net (oracle 19c).

    It shouldn't be related to data provider, but that is the only change i can see.

    .Net Framework - 4.5

    ASP.Net 3.5

    Oracle DB - 19C

    Data Provider - ODP.Net Unmanaged driver (Oracle.DataAccess.dll 19c)

    Any help here is appreciated!

    Thanks,

    Mounika.


    Mounika K




    • Edited by Mounika_K Saturday, January 25, 2020 10:54 AM
    Saturday, January 25, 2020 6:49 AM

All replies