views:

189

answers:

2

I'm trying to do exactly the same thing as detailed in this question:

ASP.NET MVC: Redirecting back to page when no parameter is given to URL

Here's my code:

public ActionResult Details(long? id)
{
    if (!id.HasValue)
        return RedirectToAction("Index");

    Models.Track track = Models.Track.GetTrack(id.Value);
    if (track == null)
        return View("NotFound");
    else
        return View("Details", track);
}

However, when I call RedirectToAction("Index") and I'm viewing the page in Firefox 3, the page hangs. It redirects fine in IE7.

Are there any known issues with RedirectToAction in Firefox 3?

A: 

I don't know how your urls are configured but maybe you are in a recursive loop? That you are continously redirecting to the same page?

Michael
If I were doing this, surely I would observe the same behaviour in IE7?
Paul Suart
+2  A: 

Try this. Open Firefox. Type "about:config" in the address bar. Hit enter. Accept the warning. Then look for:

network.dns.disableIPv6

set it to true by double-clicking the line. Try your web app now. Does that work?

robnardo
Yup, that seemed to do the trick. Are you able to offer any insight as to what's happening here? Many thanks.
Paul Suart
According to some articles on the web, there is a problem with looking up DNS on localhost.. probably because you are behind a proxy? I am at work and I used to get this problem. I think it has to with how the network is configured.
robnardo