Advertisement
Guest User

Untitled

a guest
Jun 20th, 2019
85
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.59 KB | None | 0 0
  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. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement