diff --git a/src/ProjectTemplates/Web.ProjectTemplates/RazorComponentsWeb-CSharp.csproj.in b/src/ProjectTemplates/Web.ProjectTemplates/RazorComponentsWeb-CSharp.csproj.in index b32e272e0c..38d448a86f 100644 --- a/src/ProjectTemplates/Web.ProjectTemplates/RazorComponentsWeb-CSharp.csproj.in +++ b/src/ProjectTemplates/Web.ProjectTemplates/RazorComponentsWeb-CSharp.csproj.in @@ -10,7 +10,6 @@ - diff --git a/src/ProjectTemplates/Web.ProjectTemplates/content/RazorComponentsWeb-CSharp/Services/WeatherForecast.cs b/src/ProjectTemplates/Web.ProjectTemplates/content/RazorComponentsWeb-CSharp/Data/WeatherForecast.cs similarity index 84% rename from src/ProjectTemplates/Web.ProjectTemplates/content/RazorComponentsWeb-CSharp/Services/WeatherForecast.cs rename to src/ProjectTemplates/Web.ProjectTemplates/content/RazorComponentsWeb-CSharp/Data/WeatherForecast.cs index 28f07c428e..65859af504 100644 --- a/src/ProjectTemplates/Web.ProjectTemplates/content/RazorComponentsWeb-CSharp/Services/WeatherForecast.cs +++ b/src/ProjectTemplates/Web.ProjectTemplates/content/RazorComponentsWeb-CSharp/Data/WeatherForecast.cs @@ -1,6 +1,6 @@ using System; -namespace RazorComponentsWeb_CSharp.Services +namespace RazorComponentsWeb_CSharp.Data { public class WeatherForecast { diff --git a/src/ProjectTemplates/Web.ProjectTemplates/content/RazorComponentsWeb-CSharp/Services/WeatherForecastService.cs b/src/ProjectTemplates/Web.ProjectTemplates/content/RazorComponentsWeb-CSharp/Data/WeatherForecastService.cs similarity index 94% rename from src/ProjectTemplates/Web.ProjectTemplates/content/RazorComponentsWeb-CSharp/Services/WeatherForecastService.cs rename to src/ProjectTemplates/Web.ProjectTemplates/content/RazorComponentsWeb-CSharp/Data/WeatherForecastService.cs index e09d48fdad..1e27490eda 100644 --- a/src/ProjectTemplates/Web.ProjectTemplates/content/RazorComponentsWeb-CSharp/Services/WeatherForecastService.cs +++ b/src/ProjectTemplates/Web.ProjectTemplates/content/RazorComponentsWeb-CSharp/Data/WeatherForecastService.cs @@ -2,7 +2,7 @@ using System; using System.Linq; using System.Threading.Tasks; -namespace RazorComponentsWeb_CSharp.Services +namespace RazorComponentsWeb_CSharp.Data { public class WeatherForecastService { diff --git a/src/ProjectTemplates/Web.ProjectTemplates/content/RazorComponentsWeb-CSharp/Pages/FetchData.razor b/src/ProjectTemplates/Web.ProjectTemplates/content/RazorComponentsWeb-CSharp/Pages/FetchData.razor index 6374201ea9..3b24942890 100644 --- a/src/ProjectTemplates/Web.ProjectTemplates/content/RazorComponentsWeb-CSharp/Pages/FetchData.razor +++ b/src/ProjectTemplates/Web.ProjectTemplates/content/RazorComponentsWeb-CSharp/Pages/FetchData.razor @@ -1,5 +1,5 @@ @page "/fetchdata" -@using RazorComponentsWeb_CSharp.Services +@using RazorComponentsWeb_CSharp.Data @inject WeatherForecastService ForecastService

Weather forecast

diff --git a/src/ProjectTemplates/Web.ProjectTemplates/content/RazorComponentsWeb-CSharp/Pages/Host.cshtml b/src/ProjectTemplates/Web.ProjectTemplates/content/RazorComponentsWeb-CSharp/Pages/_Host.cshtml similarity index 100% rename from src/ProjectTemplates/Web.ProjectTemplates/content/RazorComponentsWeb-CSharp/Pages/Host.cshtml rename to src/ProjectTemplates/Web.ProjectTemplates/content/RazorComponentsWeb-CSharp/Pages/_Host.cshtml diff --git a/src/ProjectTemplates/Web.ProjectTemplates/content/RazorComponentsWeb-CSharp/Startup.cs b/src/ProjectTemplates/Web.ProjectTemplates/content/RazorComponentsWeb-CSharp/Startup.cs index 4e418d70a4..6c995fe3ab 100644 --- a/src/ProjectTemplates/Web.ProjectTemplates/content/RazorComponentsWeb-CSharp/Startup.cs +++ b/src/ProjectTemplates/Web.ProjectTemplates/content/RazorComponentsWeb-CSharp/Startup.cs @@ -10,7 +10,7 @@ using Microsoft.AspNetCore.HttpsPolicy; #endif using Microsoft.Extensions.DependencyInjection; using Microsoft.Extensions.Hosting; -using RazorComponentsWeb_CSharp.Services; +using RazorComponentsWeb_CSharp.Data; namespace RazorComponentsWeb_CSharp { @@ -20,11 +20,8 @@ namespace RazorComponentsWeb_CSharp // For more information on how to configure your application, visit https://go.microsoft.com/fwlink/?LinkID=398940 public void ConfigureServices(IServiceCollection services) { - services.AddRazorPages() - .AddNewtonsoftJson(); - + services.AddRazorPages(); services.AddRazorComponents(); - services.AddSingleton(); } @@ -45,6 +42,7 @@ namespace RazorComponentsWeb_CSharp #if (RequiresHttps) app.UseHttpsRedirection(); + #endif app.UseStaticFiles(); @@ -52,9 +50,8 @@ namespace RazorComponentsWeb_CSharp app.UseEndpoints(endpoints => { - endpoints.MapRazorPages(); endpoints.MapComponentHub(); - endpoints.MapFallbackToPage("/Host"); + endpoints.MapFallbackToPage("/_Host"); }); } } diff --git a/src/ProjectTemplates/Web.ProjectTemplates/content/RazorComponentsWeb-CSharp/wwwroot/favicon.ico b/src/ProjectTemplates/Web.ProjectTemplates/content/RazorComponentsWeb-CSharp/wwwroot/favicon.ico deleted file mode 100644 index a3a799985c..0000000000 Binary files a/src/ProjectTemplates/Web.ProjectTemplates/content/RazorComponentsWeb-CSharp/wwwroot/favicon.ico and /dev/null differ