Reply
Highlighted
Member
Posts: 2
Registered: ‎12-01-2017

Could not load file or assembly 'AuthorizeNet, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null

Could not load file or assembly 'AuthorizeNet"

Can the Sdk-dotnet be usied directly in an ASP.NET Web Project? I am unable to get it to work.

 

var controller = new createCustomerProfileController(request);
controller.Execute();
// get the response from the service (errors contained if any)
createCustomerProfileResponse response = controller.GetApiResponse();

 

When trying to use above getting the error below:
S_### erver Error in '/' Application.

Could not load file or assembly 'AuthorizeNet, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null' or one of its dependencies. A strongly-named assembly is required. (Exception from HRESULT: 0x80131044)

Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

Exception Details: System.IO.FileLoadException: Could not load file or assembly 'AuthorizeNet, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null' or one of its dependencies. A strongly-named assembly is required. (Exception from HRESULT: 0x80131044)_

Highlighted
Authorize.Net Expert
Posts: 84
Registered: ‎11-16-2017

Re: Could not load file or assembly 'AuthorizeNet, Version=0.0.0.0, Culture=neutral, PublicKeyToken=

I have tried with Blank ASP.NET New Solution that has Webapplication csproj. And added the Authorize.NET csproj into the ASP.NET solution. Then go to WEB ApplicationProject > references> add the reference to the Authorize.NET csproj.  With these steps i am able to build the solution successfullly. Please try the above steps and let us know if you are still facing the issues. Screenshot here - ASP.NET Solution