I did a project using the VS2015 SPA template. I want to take the start login page

Asked

Viewed 52 times

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?

  • 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.

  • 1

    By chance your controller/action has the attribute [Authorize]?

3 answers

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

You are not signed in. Login or sign up in order to post.