This project is read-only.

Routing issue

Topics: Customizing Orchard
Feb 2, 2012 at 4:54 AM



THis is my url


Here is my routing code


 new RouteDescriptor {
                                                   Route = new Route(
                                                         new RouteValueDictionary {
                                                                                      {"area", "eProp.Properties"},
                                                                                      {"controller", "Propertysearch"},
                                                                                      {"action", "List"}
                                                         new RouteValueDictionary (),
                                                         new RouteValueDictionary {
                                                                                      {"area", "eProp.Properties"}
                                                         new MvcRouteHandler())

My other routing working, But this one not working, I have  controller action with this parameter




Feb 2, 2012 at 4:57 AM

You need to provide more context: how is it not working? what are you trying to do? What are you expecting? How are you trying to achieve that?

Feb 2, 2012 at 5:04 AM

I want run this action

 public ActionResult List(int Typeid, int Provinceid, int Mandate)
          //  PropertySearch pSearch = new PropertySearch();           
            var Propertiess = _PropertiesService.Search1(Typeid,Provinceid,Mandate).Cast<ContentItem>().Select(b => Services.ContentManager.BuildDisplay(b, "Summary"));
            var list = Shape.List();

            dynamic viewModel = Shape.ViewModel()

            // Casting to avoid invalid (under medium trust) reflection over the protected View method and force a static invocation.
            return View((object)viewModel);

Now it returing this error

The resource cannot be found.

Description: HTTP 404. The resource you are looking for (or one of its dependencies) could have been removed, had its name changed, or is temporarily unavailable.  Please review the following URL and make sure that it is spelled correctly.

Requested URL: /OrchardLocal/Propertysearch/List


Feb 2, 2012 at 5:05 AM

Well, of course, you failed to provide any of the three required parameters, and your route doesn't specify defaults.

Feb 2, 2012 at 9:36 AM

Your route is this: 


And you're trying to access it on this url:


Can you see why it's not working? Hint: They're different.