Comments on: AngularJS URLs missing trailing slash /104/ Jeremy Hutchinson's Tech Blog Thu, 28 Aug 2014 01:49:51 +0000 hourly 1 http://wordpress.org/?v=4.0 By: Peter /104/#comment-2174 Fri, 22 Aug 2014 02:54:14 +0000 /?p=104#comment-2174 Used to stop the default mvc route from having no trailing slash.
This caused my client side breezeJs code to crash.

Thanks

]]>
By: Joost van Schaik /104/#comment-1970 Mon, 18 Aug 2014 09:32:51 +0000 /?p=104#comment-1970 Thanks sir! Worked like a charm!

]]>
By: Lars Johannesson /104/#comment-1482 Fri, 08 Aug 2014 10:05:52 +0000 /?p=104#comment-1482 I ended up here after googling for a solution to my problem where a missing trailing slash caused the browser to get stuck in an infinite loop downloading the page and all its resources until it finally crashed.

While the solution here did not work in my case (my setup is a bit different) it inspired me to a solution which did work)


protected void Application_BeginRequest(object sender, EventArgs e) {
//
// This fixes an annoying bug where the browser gets stuck in infinite recursion downloading the entire page time after time until crashing.
if (Request.Path.Equals("/dashboard", StringComparison.CurrentCultureIgnoreCase))
{
var redirectUrl = VirtualPathUtility.AppendTrailingSlash(Request.Path);
Response.RedirectPermanent(redirectUrl);
}
}

In my case the angular application is running under http://host/dashboard/ which is referring to DashboardController/Index-action

]]>
By: Jeremy Hutchinson /104/#comment-419 Wed, 21 May 2014 12:20:00 +0000 /?p=104#comment-419 I’m glad it helped.

]]>
By: Jean-François Gagnon /104/#comment-418 Tue, 20 May 2014 22:22:00 +0000 /?p=104#comment-418 Thanks, work perfectly !

]]>