usps api getting error 405

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.
13 years ago
I have the latest version of nopcommerce installed on my site and I'm receiving the following error when the customer gets to the shipping method selection page.

The remote server returned an error: (405) Method Not Allowed.
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.Net.WebException: The remote server returned an error: (405) Method Not Allowed.

Source Error:

An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.

Stack Trace:

[WebException: The remote server returned an error: (405) Method Not Allowed.]
   System.Net.HttpWebRequest.GetResponse() +5314029
   NopSolutions.NopCommerce.Shipping.Methods.USPS.USPSComputationMethod.DoRequest(String url, String requestString) in USPSComputationMethod.cs:301
   NopSolutions.NopCommerce.Shipping.Methods.USPS.USPSComputationMethod.GetShippingOptions(ShipmentPackage shipmentPackage, String& error) in USPSComputationMethod.cs:452
   NopSolutions.NopCommerce.BusinessLogic.Shipping.ShippingManager.GetShippingOptions(ShoppingCart cart, Customer customer, Address shippingAddress, Nullable`1 allowedShippingRateComputationMethodId, String& error) +807
   NopSolutions.NopCommerce.BusinessLogic.Shipping.ShippingManager.GetShippingOptions(ShoppingCart cart, Customer customer, Address shippingAddress, String& error) +84
   NopSolutions.NopCommerce.Web.Modules.CheckoutShippingMethodControl.BindData() in CheckoutShippingMethod.ascx.cs:103
   NopSolutions.NopCommerce.Web.CheckoutShippingMethodPage.Page_Load(Object sender, EventArgs e) in CheckoutShippingMethod.aspx.cs:55
   System.Web.Util.CalliHelper.EventArgFunctionCaller(IntPtr fp, Object o, Object t, EventArgs e) +14
   System.Web.Util.CalliEventHandlerDelegateProxy.Callback(Object sender, EventArgs e) +35
   System.Web.UI.Control.OnLoad(EventArgs e) +99
   NopSolutions.NopCommerce.Web.BaseNopPage.OnLoad(EventArgs e) in BaseNopPage.cs:80
   System.Web.UI.Control.LoadRecursive() +50
   System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +627


Is this a problem with USPS or is there a problem with the nopcommerce code on my site? Has anyone dealt with this exact error before?
13 years ago
I had the same problem. Can anyone help?
13 years ago
OK, I figured it out. USPS sends you the WRONG server address. Use http://production.shippingapis.com/ShippingAPI.dll instead of http://production.shippingapis.com (for non-secure servers).
13 years ago
A thousand thank you's singer777!  That fixed the problem for me!!
This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.