I have set default routing in razor this my code. But it's not working
- services.AddMvc().AddRazorPagesOptions(options =>
- {
- options.Conventions.AddPageRoute("/PageTemplates/_Home", "");
- });
- }
- public void Configure(IApplicationBuilder app, IWebHostEnvironment env)
- {
- if (!env.IsDevelopment())
- {
- app.UseHsts();
- }
- app.UseHttpsRedirection();
- app.UseCofoundry();
- app.UseRouting();
- app.UseEndpoints(endpoints =>
- {
- endpoints.MapRazorPages();
- });
By default Error.cshtml page run i want to run home page .Please help me