PayPal Standard Plugin Routes 404 error (IController & Redirect) [SOLVED]

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.
13 Jahre weitere
nopCommerce v. 2.20

I’ve just started testing PayPal Standard using sandbox accounts. Installed PayPal Standard Plugin & configured it via the /Admin interface OK

However the links below return a 404 error which are defined routes in the PayPal Standard plugin RouteProvider.cs

/Plugins/PaymentPayPalStandard/IPNHandler
/Plugins/PaymentPayPalStandard/PDTHandler
/Plugins/PaymentPayPalStandard/CancelOrder

After reading other posts such as: https://www.nopcommerce.com/boards/t/10969/nop-20-plugin.aspx?p=4

- I have cleaned and rebuilt solution
- Deleted temp files in IIS temp folder & restarted server
- Used ‘Clear Cache’ & 'Restart Application' features within nop admin
- Made a change to the Global.asax file and save to force recomplilation
- Uninstalled and Reinstalled plugin

I had thought this was an issue with the plugin only but noticed another error in the log caused by the 'Reload list of plugins' button on the Admin/Plugin/List page which I have also included below as ERROR 3

The Log contains 2 entries (ERROR 1 & 2 below) related to the plugin issue.

ERROR 1)

Cannot redirect after HTTP headers have been sent.

System.Web.HttpException (0x80004005): Cannot redirect after HTTP headers have been sent. at System.Web.HttpResponse.Redirect(String url, Boolean endResponse, Boolean permanent) at System.Web.HttpResponseWrapper.Redirect(String url, Boolean endResponse) at System.Web.Mvc.RedirectToRouteResult.ExecuteResult(ControllerContext context) at System.Web.Mvc.ControllerActionInvoker.InvokeActionResult(ControllerContext controllerContext, ActionResult actionResult) at System.Web.Mvc.ControllerActionInvoker.<>c__DisplayClass1c.<InvokeActionResultWithFilters>b__19() at System.Web.Mvc.ControllerActionInvoker.InvokeActionResultFilter(IResultFilter filter, ResultExecutingContext preContext, Func`1 continuation) at System.Web.Mvc.ControllerActionInvoker.<>c__DisplayClass1c.<>c__DisplayClass1e.<InvokeActionResultWithFilters>b__1b() at System.Web.Mvc.ControllerActionInvoker.InvokeActionResultWithFilters(ControllerContext controllerContext, IList`1 filters, ActionResult actionResult) at System.Web.Mvc.ControllerActionInvoker.InvokeAction(ControllerContext controllerContext, String actionName)

ERROR 2)

The controller for path '/Plugins/PaymentPayPalStandard/CancelOrder' was not found or does not implement IController.

System.Web.HttpException (0x80004005): The controller for path '/Plugins/PaymentPayPalStandard/CancelOrder' was not found or does not implement IController. at System.Web.Mvc.DefaultControllerFactory.GetControllerInstance(RequestContext requestContext, Type controllerType) at System.Web.Mvc.DefaultControllerFactory.CreateController(RequestContext requestContext, String controllerName) at System.Web.Mvc.MvcHandler.ProcessRequestInit(HttpContextBase httpContext, IController& controller, IControllerFactory& factory) at System.Web.Mvc.MvcHandler.<>c__DisplayClass6.<BeginProcessRequest>b__2() at System.Web.Mvc.SecurityUtil.<>c__DisplayClassb`1.<ProcessInApplicationTrust>b__a() at System.Web.Mvc.SecurityUtil.<GetCallInAppTrustThunk>b__0(Action f) at System.Web.Mvc.SecurityUtil.ProcessInApplicationTrust(Action action) at System.Web.Mvc.SecurityUtil.ProcessInApplicationTrust[TResult](Func`1 func) at System.Web.Mvc.MvcHandler.BeginProcessRequest(HttpContextBase httpContext, AsyncCallback callback, Object state) at System.Web.Mvc.MvcHandler.BeginProcessRequest(HttpContext httpContext, AsyncCallback callback, Object state) at System.Web.Mvc.MvcHandler.System.Web.IHttpAsyncHandler.BeginProcessRequest(HttpContext context, AsyncCallback cb, Object extraData) at System.Web.HttpApplication.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() at System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously)

ERROR 3)

Cannot redirect after HTTP headers have been sent.

System.Web.HttpException (0x80004005): Cannot redirect after HTTP headers have been sent. at System.Web.HttpResponse.Redirect(String url, Boolean endResponse, Boolean permanent) at System.Web.HttpResponseWrapper.Redirect(String url, Boolean endResponse) at System.Web.Mvc.RedirectToRouteResult.ExecuteResult(ControllerContext context) at System.Web.Mvc.ControllerActionInvoker.InvokeActionResult(ControllerContext controllerContext, ActionResult actionResult) at System.Web.Mvc.ControllerActionInvoker.<>c__DisplayClass1c.<InvokeActionResultWithFilters>b__19() at System.Web.Mvc.ControllerActionInvoker.InvokeActionResultFilter(IResultFilter filter, ResultExecutingContext preContext, Func`1 continuation) at System.Web.Mvc.ControllerActionInvoker.<>c__DisplayClass1c.<>c__DisplayClass1e.<InvokeActionResultWithFilters>b__1b() at System.Web.Mvc.ControllerActionInvoker.InvokeActionResultWithFilters(ControllerContext controllerContext, IList`1 filters, ActionResult actionResult) at System.Web.Mvc.ControllerActionInvoker.InvokeAction(ControllerContext controllerContext, String actionName) at System.Web.Mvc.Controller.ExecuteCore() at System.Web.Mvc.ControllerBase.Execute(RequestContext requestContext) at System.Web.Mvc.ControllerBase.System.Web.Mvc.IController.Execute(RequestContext requestContext) at System.Web.Mvc.MvcHandler.<>c__DisplayClass6.<>c__DisplayClassb.<BeginProcessRequest>b__5() at System.Web.Mvc.Async.AsyncResultWrapper.<>c__DisplayClass1.<MakeVoidDelegate>b__0() at System.Web.Mvc.Async.AsyncResultWrapper.<>c__DisplayClass8`1.<BeginSynchronous>b__7(IAsyncResult _) at System.Web.Mvc.Async.AsyncResultWrapper.WrappedAsyncResult`1.End() at System.Web.Mvc.MvcHandler.<>c__DisplayClasse.<EndProcessRequest>b__d() at System.Web.Mvc.SecurityUtil.<GetCallInAppTrustThunk>b__0(Action f) at System.Web.Mvc.SecurityUtil.ProcessInApplicationTrust(Action action) at System.Web.Mvc.MvcHandler.EndProcessRequest(IAsyncResult asyncResult) at System.Web.Mvc.MvcHandler.System.Web.IHttpAsyncHandler.EndProcessRequest(IAsyncResult result) at System.Web.HttpApplication.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() at System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously)

Page URL:   http://localhost:3810/admin/plugin/reloadlist
Referrer URL:   http://localhost:3810/Admin/Plugin/List
13 Jahre weitere
Errors 1 and 3 are not related to the paypal plugin. And the second error requires you to save Global.asax file (although you already did it). Try one more time as suggested here (solution is on page 4)
13 Jahre weitere
Global.asax saved - (File Time Stamp Changed)

Issue unchanged

Followed steps below to attempt to illiminate cache;

1) Uninstall PayPal Standard Plugin
2) Clicked 'Reload list of Plugins' Button
3) Delete PayPal Standard folder from plugin folder on hard drive
4) Clicked 'Reload list of Plugins' Button
5) Click 'Restart application' link
6) Stop website in IIS
7) Delete TEMP ASP.NET Files within C:\Windows\Microsoft.NET\Framework\v4.0.30319\Temporary ASP.NET Files\root\ on hard drive
8) Save Global.asax
9) Copied PayPal Standard folder back into plugin folder
10) Start website in IIS
11) Install PayPal Standard Plugin
12) Configure plugin (plugin still says it's active? active status stored in db?)
13) Click 'Restart application' link

Issue unchanged

both urls below return 404

/Plugins/PaymentPayPalStandard/PDTHandler
/Plugins/PaymentPayPalStandard/CancelOrder

As a further note I am experiencing this problem both on a local dev version and a live pre-launch version.

I should also say that I have applied the following changesets to the original v2.20;

154c6ded0146 - Plugin issue fixed. The controller for path '/Admin/{0}/{1}' was not found or does not implement IController. Global.asax file requires write permissions now
d21c5993c77f and dd416ab78db1 fix Garbled Characters (Weird characters on error page)
ab43e5da80fc Currency localization
0d2e7db116e4 IE 8 fails to load onepagecheckout.js script due to supplemental comma in lines.

I have enabled route debugging and have read the Route Debugger table that apears in /admin/
The following entries are related to to the plugins I have installed;

HomePageSliders/HomePageSliders
HomePageSliders/HomePage3DSlider
HomePageSliders/HomePageCarouselSlider
admin/Plugins/SevenSpikes/HomePageSlidersAdmin/Index
admin/Plugins/SevenSpikes/HomePageSlidersAdmin/List
admin/Plugins/SevenSpikes/HomePageSlidersAdmin/Create
admin/Plugins/SevenSpikes/HomePageSlidersAdmin/Edit
admin/Plugins/SevenSpikes/HomePageSlidersAdmin/HomePageSlidersSettings
admin/Plugins/SevenSpikes/HomePageSlidersAdmin/HomePage3DSliderSettings
admin/Plugins/SevenSpikes/HomePageSlidersAdmin/HomePageCarouselSliderSettings
Plugins/ShippingFixedRate/Configure

PLUGINS INSTALLED;

SevenSpikes.Core
SevenSpikes.Nop.Plugins.HomePageSliders
Payments.PayPalStandard
Shipping.FixedRate
Tax.FreeTaxRate

ERROR LOG;

The controller for path '/Plugins/PaymentPayPalStandard/PDTHandler' was not found or does not implement IController.

System.Web.HttpException (0x80004005): The controller for path '/Plugins/PaymentPayPalStandard/PDTHandler' was not found or does not implement IController. at System.Web.Mvc.DefaultControllerFactory.GetControllerInstance(RequestContext requestContext, Type controllerType) at System.Web.Mvc.DefaultControllerFactory.CreateController(RequestContext requestContext, String controllerName) at System.Web.Mvc.MvcHandler.ProcessRequestInit(HttpContextBase httpContext, IController& controller, IControllerFactory& factory) at System.Web.Mvc.MvcHandler.<>c__DisplayClass6.<BeginProcessRequest>b__2() at System.Web.Mvc.SecurityUtil.<>c__DisplayClassb`1.<ProcessInApplicationTrust>b__a() at System.Web.Mvc.SecurityUtil.<GetCallInAppTrustThunk>b__0(Action f) at System.Web.Mvc.SecurityUtil.ProcessInApplicationTrust(Action action) at System.Web.Mvc.SecurityUtil.ProcessInApplicationTrust[TResult](Func`1 func) at System.Web.Mvc.MvcHandler.BeginProcessRequest(HttpContextBase httpContext, AsyncCallback callback, Object state) at System.Web.Mvc.MvcHandler.BeginProcessRequest(HttpContext httpContext, AsyncCallback callback, Object state) at System.Web.Mvc.MvcHandler.System.Web.IHttpAsyncHandler.BeginProcessRequest(HttpContext context, AsyncCallback cb, Object extraData) at System.Web.HttpApplication.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() at System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously)
13 Jahre weitere
RESOLVED:

Deleted Source Folder: \Plugins\Nop.Plugin.Payments.PayPalStandard
Copied back original from nopCommerce v2.20 Release
Rebuilt Solution
Uploaded recompiled plugin to /Plugins/Payments.PayPalStandard to LIVE server
Saved /Global.asax

I don't understand what happened to the original plugin source as I didn't make any changes to it. It didn't ever raise complilation errors either. -  strange. The only thing I can think of, is that at some point before I had these issues I copied the compiled plugin folder into the source directory by mistake.
This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.