locked
Attribute Routing Caching Issue RRS feed

  • Question

  • User1349647816 posted

    Hi,

    I am using attribute routing and when I change the Route name to something else it does not update for some reason, I am debugging my program locally and using Visual Studio 2015 with IIS Express. An example follows:

    [Route("myFirstRoute")]
    public ActionResult ViewSingleAdID(int adID, string Desc)
    {
    
    }
    
    [Route("mySecondRoute")]
    public ActionResult ViewSingleAd(string d)
    {
    
    }

    Now when I change the any of the routes like this

    [Route("myFirstChanged")]
    public ActionResult ViewSingleAdID(int adID, string Desc)
    {
    
    }
    
    [Route("mySecondRoute")]
    public ActionResult ViewSingleAd(string d)
    {
    
    }

    and run the program, the url still contains the old route name and breaks because it can't find the old named route, what is happening here, is it a bug in visual studio somehow? How do I rectify this problem and get the updated renamed route to appear?

    Tuesday, April 30, 2019 9:43 AM

All replies

  • User753101303 posted

    Hi,

    Not sure to get "which url" you are talking about and how it is generated. This is not the "start page" configured in your Visual Studio project properties ???

    Tuesday, April 30, 2019 1:59 PM
  • User1349647816 posted

    Patrice your reply makes no sense and I cannot understand it.

    Friday, May 3, 2019 6:11 AM
  • User-474980206 posted
    You say the url breaks. What url, how is it generated. Do you type it in the browser, is it a link on a page?
    Friday, May 3, 2019 2:16 PM