I wanted to step inside/debugging the web-api 2 (version 5.2.3) code source to understand it.
I've created a simple web api application, and in the WebApi.config, I've set a break point at this line:
config.Routes.MapHttpRoute(
name: "ExcludedRoute",
routeTemplate: "api/{controller}/{action}",
defaults: new { id = RouteParameter.Optional },
constraints: new { Controller = "healthcheck", action = "check" }
);
I could step inside the MapHttpRoute method and the other classes, but the debugger couldn't step inside the Route class from the System.Web dll, below the image:
I tried to use this symbol file locations:
I've also used the dotpeek tool for generating the pdb files from the bin folder, by setting to true the "copy local" feature of the referenced assemblies, but with no success. The path of system.web dll is
C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework.NETFramework\v4.5\System.Web.dll
I'm wondering Why the debugger couldn't step inside the Route class which belongs to the system.Web dll, its version is 4.0 and the version of web.api is the 5.2.3.
In my searching, I've downloaded the code source of the asp.net and i found that the project System.Web.Http.WebHost which contains the HttpWebRoute class.
Any idea?
Thanks!