This topic contains 21 replies, has 3 voices, and was last updated by  muhammadmobeen 4 months ago.

  • Author
    Posts
  • Participant
    muhammadmobeen
    Member
    Member since: 01.06.2017
    Number of posts: 16

    Hello,

    I am using eSignLive in my UWP project. It was working fine last couple of weeks before. But now it throwing an exception at

    eslClient = new EslClient(API_KEY, API_URL);

    Exception: The type initializer for ‘log4net.Core.LoggerManager’ threw an exception.

    My code is as below

    <Button Content="Button" HorizontalAlignment="Left" Height="200" Width="200" Tapped="Button_Tapped" VerticalAlignment="Top"/>
    
           private string API_URL = string.Empty;
            private string API_KEY = string.Empty;
            private static EslClient eslClient;
    private void Button_Tapped(object sender, Windows.UI.Xaml.Input.TappedRoutedEventArgs e)
            {
                try
                {
                   API_URL = "https://sandbox.esignlive.com/api";
                    API_KEY = "M2JPbjpXQVlOmE3N3VIenhJVQ==";
    
                    eslClient = new EslClient(API_KEY, API_URL);
    
                }
                catch (Exception ex)
                {
                 }
            }
    

    Any help would be appreciated.

    Thanks

    Keymaster
    Haris
    Jedi Master
    Member since: 05.11.2015
    Number of posts: 1450

    Score

    0

    Hi,

    I am assuming you trimmed down the API key correct?


    Haris Haidary
    OneSpan Technical Consultant
    Participant
    muhammadmobeen
    Member
    Member since: 01.06.2017
    Number of posts: 16

    Score

    0

    I just changed api key only for post. If you ask I can give you my account api key.

    Keymaster
    Haris
    Jedi Master
    Member since: 05.11.2015
    Number of posts: 1450

    Score

    0

    No, that’s fine. Can you please share the complete exception (including the inner exception)?

    Thanks,


    Haris Haidary
    OneSpan Technical Consultant
    Participant
    muhammadmobeen
    Member
    Member since: 01.06.2017
    Number of posts: 16

    Score

    0

    Exception: {System.TypeInitializationException: The type initializer for ‘log4net.Core.LoggerManager’ threw an exception. —> System.MethodAccessException: Attempt by method ‘log4net.Core.LoggerManager.RegisterAppDomainEvents()’ to access method ‘System.AppDomain.add_ProcessExit(System.EventHandler)’ failed. at log4net.Core.LoggerManager.RegisterAppDomainEvents() at log4net.Core.LoggerManager..cctor() — End of inner exception stack trace — at log4net.Core.LoggerManager.GetLogger(Assembly repositoryAssembly, String name) at log4net.LogManager.GetLogger(Assembly repositoryAssembly, String name) at log4net.LogManager.GetLogger(Type type) at Silanis.ESL.SDK.Support..ctor() at Silanis.ESL.SDK.EslClient..ctor(String apiKey, String baseUrl) at eSignLiveWorkUWP.EmailDocForSignature.GetESignCredentials()}

    InnerException: {System.MethodAccessException: Attempt by method ‘log4net.Core.LoggerManager.RegisterAppDomainEvents()’ to access method ‘System.AppDomain.add_ProcessExit(System.EventHandler)’ failed.
    at log4net.Core.LoggerManager.RegisterAppDomainEvents()
    at log4net.Core.LoggerManager..cctor()}

    Inner Exception Message: Attempt by method ‘log4net.Core.LoggerManager.RegisterAppDomainEvents()’ to access method ‘System.AppDomain.add_ProcessExit(System.EventHandler)’ failed.

    InnerException StackTrace: at log4net.Core.LoggerManager.RegisterAppDomainEvents()
    at log4net.Core.LoggerManager..cctor()

    Participant
    muhammadmobeen
    Member
    Member since: 01.06.2017
    Number of posts: 16

    Score

    0

    I have also provided my code project to Ankur Barthakur.

    Thanks

    Participant
    Sham007
    Newbie
    Member since: 09.02.2016
    Number of posts: 2

    Score

    0

    case #00107263
    – Code project attached.

    • This reply was modified 4 months, 2 weeks ago by  Sham007.
    Attachments:
    You must be logged in to view attached files.
    Keymaster
    Haris
    Jedi Master
    Member since: 05.11.2015
    Number of posts: 1450

    Score

    0

    Thanks, I will have a look and get back to you when I have more info.


    Haris Haidary
    OneSpan Technical Consultant
    Keymaster
    Haris
    Jedi Master
    Member since: 05.11.2015
    Number of posts: 1450

    Score

    0

    And just for my information, did you make any modifications to your code between the time it worked and stopped working?


    Haris Haidary
    OneSpan Technical Consultant
    Participant
    muhammadmobeen
    Member
    Member since: 01.06.2017
    Number of posts: 16

    Score

    0

    no change

    Keymaster
    Haris
    Jedi Master
    Member since: 05.11.2015
    Number of posts: 1450

    Score

    0

    Can you send me the following dll file “Syncfusion Controls for UWP XAML”? You can send it to developer@esignlive.com


    Haris Haidary
    OneSpan Technical Consultant
    Participant
    muhammadmobeen
    Member
    Member since: 01.06.2017
    Number of posts: 16

    Score

    0

    My mistake. Its an extra assembly, please remove this.

    Thanks

    Keymaster
    Haris
    Jedi Master
    Member since: 05.11.2015
    Number of posts: 1450

    Score

    0

    I don’t get any errors. Is there anything specific that I should do to reproduce the issue?


    Haris Haidary
    OneSpan Technical Consultant
    Attachments:
    You must be logged in to view attached files.
    Participant
    muhammadmobeen
    Member
    Member since: 01.06.2017
    Number of posts: 16

    Score

    0

    But I am getting this error.
    I am using VS-Professional 2017 version 15.6.6, .NET Framework 4.7.03056. and Target version Build 16299.

    Attachments:
    You must be logged in to view attached files.
    Keymaster
    Haris
    Jedi Master
    Member since: 05.11.2015
    Number of posts: 1450

    Score

    0

    I use VS Community 2017 version 15.7.3, .NET Framework 4.7.02046. Try re-compiling the code with a lower framework version see if that helps. And are you using the latest .NET SDK?


    Haris Haidary
    OneSpan Technical Consultant

You must be logged in to reply to this topic.