blogifierdotnet / Blogifier

Blogifier is an open-source publishing platform Written in ASP.NET and Blazor WebAssembly. With Blogifier make a personal blog or a website.
https://blogifier.net
MIT License
1.28k stars 520 forks source link

Publish on IIS #214

Closed zoltanhalasz closed 3 years ago

zoltanhalasz commented 4 years ago

Following the instructions on https://github.com/blogifierdotnet/Blogifier/blob/master/docs/Build.md it's all ok, no errors, except when I publish it to local IIS or https://blog.zoltanhalasz.net/blog the admin page, when I log in with admin/admin, I am not able to see the content of the posts.

rxtur commented 4 years ago

With IIS, it is often related to file permissions, specially when you use default SQLite database which is file-based and needs write access. Start by examining log files in the /Logs directory - if there any, because if directory read only for a process that runs application it won't be able to create log file in the first place. If you running locally, easiest probably to add "Everyone" account write permissions on your blog directory and check if this fixes your issue.

Another common thing with IIS is WebDAV module messing up API calls, specially POST and PUT - then you would need to disable WebDAV for your site to fix this.

zoltanhalasz commented 4 years ago

Thanks for answering. There is no issue with access rights, users have full write access. However, I paste here some of the errors in the log file, can you please help debug them?

2020-10-12 12:00:34.312 +03:00 [Warning] Using an in-memory repository. Keys will not be persisted to storage. 2020-10-12 12:00:34.333 +03:00 [Warning] Neither user profile nor HKLM registry available. Using an ephemeral key repository. Protected data will be unavailable when application exits. 2020-10-12 12:00:34.353 +03:00 [Warning] No XML encryptor configured. Key {d114cc51-ba8e-4aa1-8b53-511a2272f9c4} may be persisted to storage in unencrypted form. 2020-10-12 12:00:44.065 +03:00 [Warning] Unhandled exception rendering component: "Object reference not set to an instance of an object." System.NullReferenceException: Object reference not set to an instance of an object. at Blogifier.Pages.Admin.Shared.NavMenu.OnInitializedAsync() in C:\Dotnet\Blogifier\src\Blogifier\Pages\Admin\Shared\NavMenu.razor:line 107 at Microsoft.AspNetCore.Components.ComponentBase.RunInitAndSetParametersAsync() 2020-10-12 12:00:44.071 +03:00 [Error] Unhandled exception in circuit '"ahNAYUFZ7OT1wcoT7nJ6tl8A-IDE5TIbBXqqEyBdbbE"'. System.NullReferenceException: Object reference not set to an instance of an object. at Blogifier.Pages.Admin.Shared.NavMenu.OnInitializedAsync() in C:\Dotnet\Blogifier\src\Blogifier\Pages\Admin\Shared\NavMenu.razor:line 107 at Microsoft.AspNetCore.Components.ComponentBase.RunInitAndSetParametersAsync() 2020-10-12 12:00:44.072 +03:00 [Warning] Unhandled exception rendering component: "Object reference not set to an instance of an object." System.NullReferenceException: Object reference not set to an instance of an object. at Blogifier.Components.Dashboard.PostListWidget.OnInitializedAsync() in C:\Dotnet\Blogifier\src\Blogifier\Components\Dashboard\PostListWidget.razor:line 153 at Microsoft.AspNetCore.Components.ComponentBase.RunInitAndSetParametersAsync() 2020-10-12 12:00:44.072 +03:00 [Error] Unhandled exception in circuit '"ahNAYUFZ7OT1wcoT7nJ6tl8A-IDE5TIbBXqqEyBdbbE"'. System.NullReferenceException: Object reference not set to an instance of an object.

rxtur commented 3 years ago

Tested with local IIS both in the root and sub-folder. If still error it is probably not fixable without a way to recreate it - related to specific setup or environment.