I have an asp.net C# MVC website. It uses SimpleAuthentication and forms authentication. Everything works fine, requiring people to log in to go to pages. However, I have one controller called "ReportsController". Whenever you go to the URL's of the actions within this controller it always pops up with "Authentication Required" in the browser window.
It is only doing it for this controller and not any others. The URL will be "www.domain.com/reports". This URL works fine when I run from IIS and from my development server, but not on my live server. This is running IIS7.
I have checked my web.config and it is definately set to Forms authentication and not Windows.
Anyone have any ideas why any urls beginning with "/Reports" would not work. I am guessing it is something specific to the server, such as an IIS setting or web.config change, but I cannot figure out what this would be.
namespace ProjectName.Controllers
{
public class ReportsController : Controller
{
public ActionResult Index()
{
throw new SystemException("here");
return View();
}
}
}
Web.config:
<authentication mode="Forms">
<forms loginUrl="~/" timeout="2880" />
</authentication>