When inspecting the browser console, why is it that my application throws some javascript errors at me at the login page?
I've set my web.config to contain the following:
<authentication mode="Forms">
<forms loginUrl="~/Login" timeout="90" />
</authentication>
And then I have a _AnonymousUserLayout.cshtml that contains the following scripts:
<!-- Bootstrap JS -->
<script src="@Url.Content("~/Scripts/jquery-1.8.2.js")"></script>
<script src="@Url.Content("~/Scripts/bootstrap.js")"></script>
<!-- Supersized JS -->
<script src="@Url.Content("~/Scripts/supersized.core.3.2.1.js")"></script>
And in my Login.cshtml (Rendered through RenderBody() in the layout-file) I'm including the following:
<script src="@Url.Content("~/Scripts/jquery.validate.js")" type="text/javascript"></script>
<script src="@Url.Content("~/Scripts/jquery.validate.unobtrusive.js")" type="text/javascript"></script>
In my Global.asax.cs I have defined this filter:
public static void RegisterGlobalFilters(GlobalFilterCollection filters)
{
filters.Add(new System.Web.Mvc.AuthorizeAttribute());
}
Lastly, I'm redirected to the login page in my _ViewStart.cshtml:
@{
if (Request.IsAuthenticated)
{
Layout = "~/Views/Shared/_Layout.cshtml";
}
else
{
Layout = "~/Views/Shared/_AnonymousUserLayout.cshtml";
}
}
Whenever I'm not logged in and redirected to the login page, I keep seeing the following errors in the developer console:
Uncaught SyntaxError: Unexpected token < :54837/Login?ReturnUrl=%2FScripts%2Fkendo%2F2013.1.319%2Fjquery.min.js:1
Uncaught SyntaxError: Unexpected token < :54837/Login?ReturnUrl=%2FScripts%2Fkendo%2F2013.1.319%2Fkendo.all.min.js:1
Uncaught SyntaxError: Unexpected token < Login?ReturnUrl=%2FScripts%2Fkendo%2F2013.1.319%2Fkendo.aspnetmvc.min.js:1
What am I doing wrong?