SHARE
TWEET

Untitled

a guest Jun 20th, 2019 45 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. public void Configure(IServiceCollection services, IApplicationBuilder app, IHostingEnvironment env)
  2.     {
  3.  
  4.  
  5.         app.AddMvc().AddRazorPagesOptions(options =>
  6.         {
  7.             options.Conventions.AddPageRoute("/Products/Index", "");
  8.         });
  9.      
  10. InvalidOperationException: No service for type 'Microsoft.Extensions.DependencyInjection.IServiceCollection' has been registered.
  11.      
  12. public void ConfigureServices(IServiceCollection services)
  13. {
  14.     services.AddMvc().AddRazorPagesOptions(options =>
  15.     {
  16.         options.Conventions.AddPageRoute("/Products/Index", "");
  17.     });
  18. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top