In ASP.NET Core RC 1 I used the following code to retrieve the value of context (full address of the page). Then I recorded this value in the configuration.
p
You can add in this way.
services.AddSingleton();