NullReferenceException when using the WooCommerce.NET plugin

1

I am using the "WooCommerce.NET" plugin, to make the connection between WooCommerce (version 2.6. *) and my application on asp.net with C # in Visual Studio 2013.

Trying to use the "GetProducts ()" method throws me the following exception:

I've already been "debugging" the classes and the exception is produced when it comes to executing the following line:

WebResponse wr = await httpWebRequest.GetResponseAsync();

Does anyone know what this exception is?

Thank you.

    
asked by Raúl Bernal V 28.09.2016 в 17:35
source

1 answer

0

That type of exception occurs when you have not initialized an object which points to null. Verify that you have instantiated your httpWebRequest object

HttpWebRequest httpwebRequest = (HttpWebRequest) WebRequest.Create(uri);

Greetings

    
answered by 29.09.2016 в 01:45