title: Razor Pages Default Page in aspnetcore 2
body: <p>By default a Razor Page app goes to Home/Index</p>
  <p>Is there a way to change this to Home/App?</p>
  <p>This is quite easy in MVC, but Razor pages using a different routing setup and thus MVC routing does not apply.</p>
  <p>I would think it would be in options somewhere, but I don't see it:</p>
  <pre><code>services.AddMvc()
              .AddRazorPagesOptions(options =&gt;
              {
                  options.Conventions.AuthorizeFolder(&quot;/Account/Manage&quot;);
                  options.Conventions.AuthorizePage(&quot;/Account/Logout&quot;);
                  options. ??SetDefaultPage??
              });
  </code></pre>
  <p>I have tried this:</p>
  <p><code>options.Conventions.AddPageRoute(&quot;/App&quot;, &quot;&quot;);</code></p>
  <p>But now two default routes are found and an error is generated:</p>
  <blockquote>
  <p>AmbiguousActionException: Multiple actions matched. The following actions matched route data and had all constraints satisfied:</p>
  <p>Page: /App</p>
  <p>Page: /Index</p>
  </blockquote>
  <p>It's possible to resolve this error by removing Pages/Index.cshtml from the project, but I wanted to keep that page as well.</p>