title: @HTML.ActionLink and @URL.Action not working?
body: <p>I must be missing something simple here but I don't understand what's going on with my Links in my Razor pages? </p>
  
  <p>I've tried both of these to create a link to my Controller/ActionResult which is should be Gallery/Index. </p>
  
  <pre><code>@Html.ActionLink("Click Here", "Index", "Gallery", null, null)
  
  &lt;a href="@Url.Action("Index","Gallery")"&gt;Click here&lt;/a&gt;
  </code></pre>
  
  <p>When I use these and look at the Page Source it is creating the following links.</p>
  
  <pre><code>&lt;a href="/Gallery"&gt;Click Here&lt;/a&gt;
  
  &lt;a href="/Gallery"&gt;Click here&lt;/a&gt; to see examples of our work.
  </code></pre>
  
  <p>If click on either one of them I get this error message: </p>
  
  <pre><code>A default document is not configured for the requested URL, and directory browsing is not enabled on the server.
  </code></pre>
  
  <p>However, if I browse directly to /Gallery/Index then the page works fine. </p>
  
  <p>Why won't these ActionLink or UrlAction not create a link like "/Gallery/Index"?</p>