I am using url routing structure for my web site.When i use url routing (especially multi segment) my css and js file not load.i used Route.Ignor but not work.
void RouteMap(RouteCollection route)
{
route.RouteExistingFiles = false;
route.Ignore("{resource}.axd/{*pathInfo}"); //Not work
routes.Ignore("{resource}.css/{*pathInfo}"); //Not work
routes.Ignore("Styles/{*pathInfo}"); //Not work
routes.Ignore("Styles/"); //Not work
route.MapPageRoute("", "Guide", "~/Guide.aspx");
route.MapPageRoute("", "Guide/{key}", "~/Guide.aspx");
route.MapPageRoute("", "Search/{key}", "~/Search.aspx");
}
void Application_Start(object sender, EventArgs e)
{
RouteMap(RouteTable.Routes);
}
<link href="~/Styles/Site.css" rel="stylesheet" type="text/css" />
<script src="~/Scripts/jquery.min.js" type="text/javascript"></script>
Try to use IIS Integrated Application Pool (for css files to be processed by .NET runtime) for your application if you used classic mode.