Hi all.
I have a problem while calling the webservice defined in Nop.Plugin.Misc.WebServices
I have extend the webservices with this method (defined also in the INopService interface)
public Category GetCategoryById(string usernameOrEmail, string userPassword, int categoryId)
{
CheckAccess(usernameOrEmail, userPassword);
if (!_permissionSettings.Authorize(StandardPermissionProvider.ManageCategories))
throw new ApplicationException("Not allowed to manage categories");
Category c = _categoryService.GetCategoryById(categoryId);
if (c == null)
return null;
return c;
}
I have deployed my NopComemrce 3.0 solution on a local instalaltion (all with default data and test data in DB) and created a simple console application to interrogate the Webservices.
This is the code
NopServiceClient nsc = new NopServiceClient("BasicHttpBinding_INopService");
Category c = nsc.GetCategoryById("USERNAME", "PASSWORD", 3);
But i receive the following error
An error occurred while receiving the HTTP response to http://custom.nopcommerce.me/Plugins/Misc.WebServices/Remote/NopService.svc. This could be due to the service endpoint binding not using the HTTP protocol. This could also be due to an HTTP request context being aborted by the server (possibly due to the service shutting down). See server logs for more details.
The default methods from webservices instead works well.
What is the problem?
Regards.
M.