Plugin shows up as installed but cannot be reached

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.
Il y a 12 ans
I built a very simple plugin using

http://blog.csharpwebdeveloper.com/2011/09/10/writing-a-plugin-for-nopcommerce-2-x/#comment-6

as a guide.  It worked awesome!! but only in VS2010.

Once I copy the plugin up to my production server (windows 2003 IIS6) then the admin shows the plugin (I click install) but I cannot reach the plugin via URL. I think it is a routing issue as I get 404 when I try to reach the plugin.

Any advice... thanks
Il y a 12 ans
[email protected] wrote:
I built a very simple plugin using

http://blog.csharpwebdeveloper.com/2011/09/10/writing-a-plugin-for-nopcommerce-2-x/#comment-6

as a guide.  It worked awesome!! but only in VS2010.

Once I copy the plugin up to my production server (windows 2003 IIS6) then the admin shows the plugin (I click install) but I cannot reach the plugin via URL. I think it is a routing issue as I get 404 when I try to reach the plugin.

Any advice... thanks


Can you share the code in your route provider?
Il y a 12 ans
default code in the route provide for Nop.Web

Here is the code in my Plugin's route provider


   public void RegisterRoutes(RouteCollection routes) {

            routes.MapRoute("Nop.Plugin.Standards", "Standards", // The route name, and the actual route.
                                            new { controller = "Standards", action = "Index" }, // Route defaults
                                            new[] { "Nop.Plugin.Standards.Controllers" }); // The namespace where controllers are stored
        }



Keep in mind that this works fine when I'm using VS2010. I looked at other articles that talked about IIS6 issues and needing to setup route providers such as Standards.mvc and then setting the *.mvc mappings in IIS. I tried this too but maybe not correctly..

Thanks for responding... I really love nC and I'm having a lot of fun learning about it!!!
Il y a 12 ans
[email protected] wrote:
default code in the route provide for Nop.Web

Here is the code in my Plugin's route provider


   public void RegisterRoutes(RouteCollection routes) {

            routes.MapRoute("Nop.Plugin.Standards", "Standards", // The route name, and the actual route.
                                            new { controller = "Standards", action = "Index" }, // Route defaults
                                            new[] { "Nop.Plugin.Standards.Controllers" }); // The namespace where controllers are stored
        }



Keep in mind that this works fine when I'm using VS2010. I looked at other articles that talked about IIS6 issues and needing to setup route providers such as Standards.mvc and then setting the *.mvc mappings in IIS. I tried this too but maybe not correctly..

Thanks for responding... I really love nC and I'm having a lot of fun learning about it!!!


Did you recycle the application pool after you deployed?

Have you tried making the route something longer, rebuilding, deploying, and trying again? For example I would try changing the route from "standards" to "extensions/standards" and see if you get different results. It is interesting that it would behave differently between the two environments.
Il y a 12 ans
Recycled, cleared cache, and anything else I could think of.

I will try a longer path and let you know,

Thanks for the help.
Il y a 12 ans
[email protected] wrote:
Recycled, cleared cache, and anything else I could think of.

I will try a longer path and let you know,

Thanks for the help.


No problem. With a route so simple "standards" it is likely it matches the pattern of a different route. There is a route debugger available http://haacked.com/archive/2008/03/13/url-routing-debugger.aspx and it might give more insight. I'm not sure how well it will work with the nopCommerce platform, but I wouldn't expect any major issues.
Il y a 12 ans
Sorry for the late reply.. got caught up in 15 other projects and had to push pause on nC...

I will check out that route debugger.. it looks like some other route debugger was already in there but commented out.

I changed the Route Provider to




routes.MapRoute("Nop.Plugin.Standards", "Plugins/CommonCore", // The route name, and the actual route.
                                            new { controller = "Standards", action = "Index" }, // Route defaults
                                            new[] { "Nop.Plugin.Standards.Controllers" }); // The namespace where controllers are stored


and on VS2010 it works great such as:

http://localhost:2565/Plugins/CommonCore/

but once pushed to our dev environment... no routing.. 404..

I'm at a loss... but I'll try the route debugger next.

Thanks
Il y a 12 ans
I solved the problem...

It was because of the fact that I was using the Index as the default action ... I'm not 100% sure but I think that locally (vs2010) it was catching but on our dev environment the catch all was catching it first (or something)

In any case, I made it more complex and it worked... I also used the route debugger locally (but wasn't able to make it work on dev environment??? )

anyway, thanks for all your help..
Il y a 12 ans
Please read this post

Hope this helps!
This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.