I have an ASP.NET MVC app which is completely behind Forms Authentication. However there is one set of routes (/report/%) I need to force integrated windows authentication on, as those pages need to impersonate the current user (for security reasons).
If I set the whole site to integrated windows authentication this all works, except that firefox prompts users for the username/password twice as they hit the sites home page (once for windows authentication, then again for the forms authentication) whereas IE only prompts for forms authentication. This is fine and I know this is the default behavior of Firefox, however so as not to anoy users I've been asked to restrict the windows authentication requirement to only the /report/* section of the site, so they only get prompted if they go to any page within /report/%.
In ASP.NET WebForms this is easy enough as there is a physcial /report folder to place the authentication config on, but in MVC this URL is virtual, so I can't do this. Does anyone know a good way to do this? I've tried to create a "gateway" aspx page that users need to go through first before redirecting to the appropriate report page, and although Firefox does prompt the user for their windows credentials at the right point, it doesn't seem to keep sending those details for subsequent requests to any of the /report/% pages. Any ideas? Would be super grateful!