0

I have a action in controller which is returning a class which hold only a message like

public Result UpdateTestCaseExecution(string appSecret, string appKey)
        {
            Result result = new Result();

            try.....
        }

problem is in routing this is the route i've made but its not getting hit

routes.MapRoute(
                name: "UpdateTestCaseExecution",
                url: "{controller}/{action}/{appsecret}/{appkey}",
                defaults: new { controller = "Dynamic", action = "UpdateTestCaseExecution", appsecret = UrlParameter.Optional, appkey = UrlParameter.Optional }
          );
Rai Vu
  • 1,595
  • 1
  • 20
  • 30
  • if your route `appSecret` and `appKey` is optional then you can set using `[Route("Dynamic/UpdateTestCaseExecution")]` or `[Route("Dynamic/UpdateTestCaseExecution/{appsecret}/{appkey}")]` you can set multiple routes on your action – Lalji Dhameliya Apr 23 '19 at 07:44
  • Can you post all of your routes? it is likely you are hitting a route declared earlier. such as the default route that the boilerplate code declares. – Slicksim Apr 23 '19 at 08:10
  • The problem had solved, it was not accessing because of protection on the partition and the IIS web server was not hitting the route, thank you guys :) – Adnan Hussain May 07 '19 at 07:15

0 Answers0