Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Prerendering in Blazor 3.2.0 #3

Open
kumaranbsundar opened this issue May 28, 2020 · 0 comments
Open

Prerendering in Blazor 3.2.0 #3

kumaranbsundar opened this issue May 28, 2020 · 0 comments

Comments

@kumaranbsundar
Copy link

Is server side pre rendering still supported in the released 3.2.0 GA version? I wanted to prerender the start page for SEO reasons. I have tried the following article but it is erroring out with 3.2.0 release - https://chrissainty.com/prerendering-a-client-side-blazor-application/ and the code - https://github.com/chrissainty/ClientSideBlazorPrerendering

First of all I could no longer find Microsoft.AspNetCore.Blazor.Server nuget package in nuget. Is there a new version of it? So i was sticking to the preview version like below

    <PackageReference Include="Microsoft.AspNetCore.Blazor.Server" Version="3.2.0-preview1.20073.1" />

But when i run the server web application, I get the following exception. crit: Microsoft.AspNetCore.Hosting.Diagnostics[6] Application startup exception System.IO.FileNotFoundException: Could not find file 'c:\Users\KSundar\source\repos\WebApplication4\bin\Debug\netcoreapp3.1\BlazorApp1.blazor.config'. File name: 'c:\Users\KSundar\source\repos\WebApplication4\bin\Debug\netcoreapp3.1\BlazorApp1.blazor.config' at System.IO.FileStream.ValidateFileHandle(SafeFileHandle fileHandle) at System.IO.FileStream.CreateFileOpenHandle(FileMode mode, FileShare share, FileOptions options) at System.IO.FileStream..ctor(String path, FileMode mode, FileAccess access, FileShare share, Int32 bufferSize, FileOptions options) at System.IO.StreamReader.ValidateArgsAndOpenPath(String path, Encoding encoding, Int32 bufferSize) at System.IO.StreamReader..ctor(String path, Encoding encoding) at System.IO.File.ReadLines(String path) at Microsoft.AspNetCore.Blazor.Server.BlazorConfig..ctor(String assemblyPath) at Microsoft.AspNetCore.Blazor.Server.BlazorConfig.Read(String assemblyPath) at Microsoft.AspNetCore.Builder.BlazorHostingApplicationBuilderExtensions.UseClientSideBlazorFiles(IApplicationBuilder app, String clientAssemblyFilePath) at Microsoft.AspNetCore.Builder.BlazorHostingApplicationBuilderExtensions.UseClientSideBlazorFiles[TClientApp](IApplicationBuilder app) at WebApplication4.Startup.Configure(IApplicationBuilder app, IWebHostEnvironment env) in c:\Users\KSundar\source\repos\WebApplication4\Startup.cs:line 50 at System.RuntimeMethodHandle.InvokeMethod(Object target, Object[] arguments, Signature sig, Boolean constructor, Boolean wrapExceptions) at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture) at Microsoft.AspNetCore.Hosting.ConfigureBuilder.Invoke(Object instance, IApplicationBuilder builder) at Microsoft.AspNetCore.Hosting.ConfigureBuilder.<>c__DisplayClass4_0.b__0(IApplicationBuilder builder) at Microsoft.AspNetCore.Hosting.GenericWebHostBuilder.<>c__DisplayClass13_0.b__2(IApplicationBuilder app) at Microsoft.AspNetCore.Mvc.Filters.MiddlewareFilterBuilderStartupFilter.<>c__DisplayClass0_0.g__MiddlewareFilterBuilder|0(IApplicationBuilder builder) at Microsoft.AspNetCore.HostFilteringStartupFilter.<>c__DisplayClass0_0.b__0(IApplicationBuilder app) at Microsoft.AspNetCore.Hosting.GenericWebHostService.StartAsync(CancellationToken cancellationToken)

Is there an article of github that showcases prerendering with the latest release bits? Appreciate your help.

Thanks, Kumaran

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant