title: Asp.Net core 3.0 The path in 'value' must start with '/'
body: <p>I couldn't find the call stack for this problem, looks like everything is fine with the controller, but it has a problem with the "asp-href-include".</p>
  
  <p>Here is the exception: </p>
  
  <pre><code>ArgumentException: The path in 'value' must start with '/'. (Parameter 'value')
  Microsoft.AspNetCore.Http.PathString..ctor(string value)
  Microsoft.AspNetCore.Hosting.StaticWebAssets.StaticWebAssetsFileProvider.StartsWithBasePath(string subpath, out PathString rest)
  Microsoft.AspNetCore.Hosting.StaticWebAssets.StaticWebAssetsFileProvider.GetDirectoryContents(string subpath)
  Microsoft.Extensions.FileProviders.Composite.CompositeDirectoryContents.EnsureDirectoriesAreInitialized()
  Microsoft.Extensions.FileProviders.Composite.CompositeDirectoryContents.EnsureFilesAreInitialized()
  Microsoft.Extensions.FileProviders.Composite.CompositeDirectoryContents.GetEnumerator()
  Microsoft.AspNetCore.Mvc.TagHelpers.FileProviderGlobbingDirectory.EnumerateFileSystemInfos()+MoveNext()
  System.Collections.Generic.List&lt;T&gt;.InsertRange(int index, IEnumerable&lt;T&gt; collection)
  System.Collections.Generic.List&lt;T&gt;.AddRange(IEnumerable&lt;T&gt; collection)
  Microsoft.Extensions.FileSystemGlobbing.Internal.MatcherContext.Match(DirectoryInfoBase directory, string parentRelativePath)
  Microsoft.Extensions.FileSystemGlobbing.Internal.MatcherContext.Match(DirectoryInfoBase directory, string parentRelativePath)
  Microsoft.Extensions.FileSystemGlobbing.Internal.MatcherContext.Execute()
  Microsoft.Extensions.FileSystemGlobbing.Matcher.Execute(DirectoryInfoBase directoryInfo)
  Microsoft.AspNetCore.Mvc.TagHelpers.GlobbingUrlBuilder.FindFiles(Matcher matcher)
  Microsoft.AspNetCore.Mvc.TagHelpers.GlobbingUrlBuilder.ExpandGlobbedUrl(string include, string exclude)
  Microsoft.AspNetCore.Mvc.TagHelpers.GlobbingUrlBuilder.BuildUrlList(string staticUrl, string includePattern, string excludePattern)
  Microsoft.AspNetCore.Mvc.TagHelpers.LinkTagHelper.BuildGlobbedLinkTags(TagHelperAttributeList attributes, TagHelperContent builder)
  Microsoft.AspNetCore.Mvc.TagHelpers.LinkTagHelper.Process(TagHelperContext context, TagHelperOutput output)
  Microsoft.AspNetCore.Razor.TagHelpers.TagHelper.ProcessAsync(TagHelperContext context, TagHelperOutput output)
  Microsoft.AspNetCore.Razor.Runtime.TagHelpers.TagHelperRunner.RunAsync(TagHelperExecutionContext executionContext)
  AspNetCore.Views_Shared__Layout.&lt;ExecuteAsync&gt;b__17_0() in _Layout.cshtml
  -
      &lt;meta charset="utf-8" /&gt;
      &lt;title&gt;bizz - @ViewData["Title"]&lt;/title&gt;
      &lt;meta http-equiv="X-UA-Compatible" content="IE=edge"&gt;
      &lt;meta content="width=device-width, initial-scale=1" name="viewport" /&gt;
      &lt;meta content="" name="description" /&gt;
      &lt;meta content="" name="author" /&gt;
      &lt;link asp-href-include="~/bundle/metronic-mandatory.min.css" rel="stylesheet" asp-append-version="true" /&gt; &lt;-- this line is highlighted red
      &lt;link asp-href-include="~/bizz/style/common.min.css" rel="stylesheet" asp-append-version="true" /&gt;
      @RenderSection("style", false)
      &lt;script asp-src-include="~/bundle/metronic-mandatory.min.js" asp-append-version="true"&gt;&lt;/script&gt;
      &lt;script asp-src-include="~/bundle/common.min.js" asp-append-version="true"&gt;&lt;/script&gt;
      &lt;script asp-src-include="~/bundle/jquery-validation.min.js" asp-append-version="true"&gt;&lt;/script&gt;
  Microsoft.AspNetCore.Razor.Runtime.TagHelpers.TagHelperExecutionContext.SetOutputContentAsync()
  AspNetCore.Views_Shared__Layout.ExecuteAsync()
  Microsoft.AspNetCore.Mvc.Razor.RazorView.RenderPageCoreAsync(IRazorPage page, ViewContext context)
  Microsoft.AspNetCore.Mvc.Razor.RazorView.RenderPageAsync(IRazorPage page, ViewContext context, bool invokeViewStarts)
  Microsoft.AspNetCore.Mvc.Razor.RazorView.RenderLayoutAsync(ViewContext context, ViewBufferTextWriter bodyWriter)
  Microsoft.AspNetCore.Mvc.Razor.RazorView.RenderAsync(ViewContext context)
  Microsoft.AspNetCore.Mvc.ViewFeatures.ViewExecutor.ExecuteAsync(ViewContext viewContext, string contentType, Nullable&lt;int&gt; statusCode)
  Microsoft.AspNetCore.Mvc.ViewFeatures.ViewExecutor.ExecuteAsync(ActionContext actionContext, IView view, ViewDataDictionary viewData, ITempDataDictionary tempData, string contentType, Nullable&lt;int&gt; statusCode)
  Microsoft.AspNetCore.Mvc.ViewFeatures.ViewResultExecutor.ExecuteAsync(ActionContext context, ViewResult result)
  Microsoft.AspNetCore.Mvc.ViewResult.ExecuteResultAsync(ActionContext context)
  Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.&lt;InvokeNextResultFilterAsync&gt;g__Awaited|29_0&lt;TFilter, TFilterAsync&gt;(ResourceInvoker invoker, Task lastTask, State next, Scope scope, object state, bool isCompleted)
  Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.Rethrow(ResultExecutedContextSealed context)
  Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.ResultNext&lt;TFilter, TFilterAsync&gt;(ref State next, ref Scope scope, ref object state, ref bool isCompleted)
  Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.InvokeResultFilters()
  Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.&lt;InvokeNextResourceFilter&gt;g__Awaited|24_0(ResourceInvoker invoker, Task lastTask, State next, Scope scope, object state, bool isCompleted)
  Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.Rethrow(ResourceExecutedContextSealed context)
  Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.Next(ref State next, ref Scope scope, ref object state, ref bool isCompleted)
  Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.InvokeFilterPipelineAsync()
  Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.&lt;InvokeAsync&gt;g__Logged|17_1(ResourceInvoker invoker)
  Microsoft.AspNetCore.Routing.EndpointMiddleware.&lt;Invoke&gt;g__AwaitRequestTask|6_0(Endpoint endpoint, Task requestTask, ILogger logger)
  Microsoft.AspNetCore.Session.SessionMiddleware.Invoke(HttpContext context)
  Microsoft.AspNetCore.Session.SessionMiddleware.Invoke(HttpContext context)
  Microsoft.AspNetCore.ResponseCompression.ResponseCompressionMiddleware.Invoke(HttpContext context)
  Microsoft.AspNetCore.Diagnostics.StatusCodePagesMiddleware.Invoke(HttpContext context)
  Microsoft.AspNetCore.Diagnostics.DeveloperExceptionPageMiddleware.Invoke(HttpContext context)
  </code></pre>
  
  <p>the code: </p>
  
  <pre class="lang-cs prettyprint-override"><code>&lt;html&gt;
  &lt;head&gt;
      &lt;meta charset="utf-8" /&gt;
      &lt;title&gt;bizz- @ViewData["Title"]&lt;/title&gt;
      &lt;meta http-equiv="X-UA-Compatible" content="IE=edge"&gt;
      &lt;meta content="width=device-width, initial-scale=1" name="viewport" /&gt;
      &lt;meta content="" name="description" /&gt;
      &lt;meta content="" name="author" /&gt;
      &lt;link asp-href-include="~/bundle/metronic-mandatory.min.css" rel="stylesheet" asp-append-version="true" /&gt;
      &lt;link asp-href-include="~/bizz/style/common.min.css" rel="stylesheet" asp-append-version="true" /&gt;
      @RenderSection("style", false)
  
      &lt;script asp-src-include="~/bundle/metronic-mandatory.min.js" asp-append-version="true"&gt;&lt;/script&gt;
      &lt;script asp-src-include="~/bundle/common.min.js" asp-append-version="true"&gt;&lt;/script&gt;
      &lt;script asp-src-include="~/bundle/jquery-validation.min.js" asp-append-version="true"&gt;&lt;/script&gt;
      @RenderSection("script", false)
  ... other code
  </code></pre>
  
  <p>the controller (if needed)</p>
  
  <pre class="lang-cs prettyprint-override"><code>public ViewResult Index()
          {
  
  
              return View();
          }
  </code></pre>
  
  <p>EDIT:
  Maybe I forgot to mention this html is inside _Layout.cshtml. Does it have anything to do with the problem? Also, I whatever I write in it, it gets restored to how it was. </p>
  
  <p>EDIT2: I have edited my code according to one of the comments. 
  The error remains to be the same.
  <a href="https://i.stack.imgur.com/DaZRe.png" rel="nofollow noreferrer">picture</a></p>