1
I made a project and when I rotate it is the login page that is the first to be shown. I would like to know how I make to leave the home page as main and not login. How I do this?
1
I made a project and when I rotate it is the login page that is the first to be shown. I would like to know how I make to leave the home page as main and not login. How I do this?
2
I managed to remove. I did so:
In Controller Homecontroller, I removed the attribute [Authorize]
and in the View Index I Commented/Removed these lines:
@Scripts.Render("~/bundles/knockout")
@Scripts.Render("~/bundles/app")
Someone told me, that these compiled lines called, by javascript the index page.
1
Alter your RouteConfig.cs
, it stays in the directory App_Start
.
Example:
public class RouteConfig
{
public static void RegisterRoutes(RouteCollection routes)
{
routes.IgnoreRoute("{resource}.axd/{*pathInfo}");
routes.MapRoute(
name: "Default",
url: "{controller}/{action}/{id}",
defaults: new { controller = "Home", action = "Index", id = UrlParameter.Optional }
);
}
}
He’s already like this
@pnet, then there must be some Redirecttoaction in the Home index.
0
Hello,
Have you tried modifying or removing a tag similar to this in webconfig?
<authentication mode="Forms">
<forms loginUrl="~/Home/Login" name=".controlestoque" />
</authentication>
I hope it will be useful!!!
Anderson, there’s nothing like what you posted on my web.config
Browser other questions tagged c# asp.net-mvc single-page-application
You are not signed in. Login or sign up in order to post.
Do you start the project with the login page being the current page of Visual Studio? Test close all VS screens and start the project.
– Randrade
By chance your controller/action has the attribute
[Authorize]
?– Randrade