I'm using MVC 4 with .NET Framework 4.5.1.
I'm using an external library to create a chart. The html references a dynamically created image,
<img usemap="#MainContent_C1WebChart1_MAP" id="MainContent_C1WebChart1" src="chartimage.aspx?SessionID=FooBar&Delete=T">
But it's looking at /Home/chartimage.aspx?SessionID=FooBar&Delete=T
(which returns file not found)
It currently exists under /chartimage.aspx?SessionID=FooBar&Delete=T
What would be the best way to fix this pathing error? I cannot change the src attribute in the img to include a '/' prior to run time it as this is generated by an external library.
Controller: /Controllers/HomeController
View: /Views/Home/Sitemaster and /Views/Home/Default.aspx.
If I make this view the default startup page it works. RouteConfig:
routes.MapRoute(
name: "Default",
url: "{controller}/{action}/{id}",
defaults: new { controller = "Home", action = "Index", id = UrlParameter.Optional }
);
//localhost:9000 Works great! But I don't want this as the default page.
//localhost:9000/Home/Index Doesn't work :( It's trying to get the resource from /Home/chartimage.aspx...