cancel
Showing results forย 
Search instead forย 
Did you mean:ย 

Initialization Issue in .netcore3.1

Need help with this. 

 

Getting an exception while executing the code below in .NET Core 3.1 works fine in .net core 2.2

 

ApiOperationBase<ANetApiRequest, ANetApiResponse>.RunEnvironment = AuthorizeNet.Environment.SANDBOX;

 

exception = The type initializer for 'AuthorizeNet.Api.Controllers.Bases.ApiOperationBase`2' threw an exception.

 

inner exception: Method not found: 'Microsoft.Extensions.Logging.ILoggerFactory Microsoft.Extensions.Logging.DebugLoggerFactoryExtensions.AddDebug(Microsoft.Extensions.Logging.ILoggerFactory, Microsoft.Extensions.Logging.LogLevel)'.

at AuthorizeNet.Utilities.LogFactory.get_LoggerFactory()
at AuthorizeNet.Utilities.LogFactory.getLog(Type classType)
at AuthorizeNet.Api.Controllers.Bases.ApiOperationBase`2..cctor()

 

 

16 REPLIES 16

We are also experiencing this issue; were you able to resolve it?

Add some logging during application startup so you can clearly see when the application started without hitting any application endpoints. For example, in the Program.Main method write a timestamp to a log file:

System.IO.File.AppendAllText(@"C:\Temp\mvc-log.txt", $"Main: {DateTime.Now}\n");

Publish the application to IIS. Grant your application pool user (or everyone) write access to the folder you're logging to (e.g. c:\temp). When you hit the site you should see a message written to the log file.

 

 

tellthebell

Savage423
Member

Excellent web site. A lot of useful information here. Iโ€™m sending it to a few pals and also sharing in delicious. And of course, thank you to your effort!

 

 

Tellthebell

Brilliant site. A great deal of helpful data here. I'm sending it to a couple of buddies and furthermore partaking in heavenly. Furthermore, obviously, thank you to your work!

hixali9022
Member

The content of your article is very interested, I am very impressed with your post. Hope to receive more great posts. tell the bell

markcleark
Member

I faced similar kind of issue last time, I am still searching for some proper solution.

Flanagan-285
Member

Great Inspiring post! Thanks for sharing it . I would like to appreciate your content and piece of great information. I am new blogger and your post helping me alot.

find us Quality Hog Roasts

I faced similar kind of issue last time very impressed with your post.

Thomas_12
Member