This repository was archived by the owner on Dec 14, 2018. It is now read-only.
This repository was archived by the owner on Dec 14, 2018. It is now read-only.
URL.Page returns null #8280
Closed
Description
Is this a Bug or Feature request?:
Bug
Steps to reproduce (preferably a link to a GitHub repo with a repro project):
Description of the problem:
Url.Page(
"/Account/ConfirmEmail",
pageHandler: null,
values: new { userId = userId, code = code },
protocol: Request.Scheme);
The above code works without issues under Areas/Identity/Pages/Account/Manage/Index.cshtml.cs.
However when I try to run the same code in a different model, in a different directory such as Pages/Private/Home.cs, I find that it does not work. Reading documentation on this code does not give any clues why the above code will return null.
Version of Microsoft.AspNetCore.Mvc
or Microsoft.AspNetCore.App
or Microsoft.AspNetCore.All
:
Microsoft.AspNetCore.Mvc (2.1)