Open lehoangphan opened 1 month ago
It's not one i've seen before. Can you access any pages or static content? The exception seems to occur dynamically loading an assembly during view compilation using the .NET RuntimeViewCompiler
, which is used to load your Cofoundry template views from file.
What are you delpoying to? Perhaps it's IIS and it's a config issue? Also ensure you have view pre-compilation set up correctly in your csproj file by disabling MvcRazorExcludeViewFilesFromPublish
and MvcRazorExcludeRefAssembliesFromPublish
.
It's not one i've seen before. Can you access any pages or static content? The exception seems to occur dynamically loading an assembly during view compilation using the .NET
RuntimeViewCompiler
, which is used to load your Cofoundry template views from file.What are you delpoying to? Perhaps it's IIS and it's a config issue? Also ensure you have view pre-compilation set up correctly in your csproj file by disabling
MvcRazorExcludeViewFilesFromPublish
andMvcRazorExcludeRefAssembliesFromPublish
.
I can not access any pages or static content. I deploy to IIS (Plesk panel) and I dont think any wrong config on server, because I try deploying fresh boilerpate net6.0 project of microsoft on and it work very well.
I disabled 2 options of pre-complilation too:
<Project Sdk="Microsoft.NET.Sdk.Web">
<PropertyGroup>
<TargetFramework>net6.0</TargetFramework>
<ImplicitUsings>enable</ImplicitUsings>
<MvcRazorExcludeViewFilesFromPublish>false</MvcRazorExcludeViewFilesFromPublish>
<MvcRazorExcludeRefAssembliesFromPublish>false</MvcRazorExcludeRefAssembliesFromPublish>
</PropertyGroup>
<ItemGroup>
<Folder Include="App_Data\" />
<Folder Include="wwwroot\" />
</ItemGroup>
<ItemGroup>
<PackageReference Include="Cofoundry.Plugins.ErrorLogging.Admin" Version="0.11.0" />
<PackageReference Include="Cofoundry.Plugins.Imaging.SkiaSharp" Version="0.5.0" />
<PackageReference Include="Cofoundry.Web.Admin" Version="0.11.4" />
</ItemGroup>
</Project>
The project run on local worked well both debug and release build. :( I code directly to project SimpleSite
One thing to try is to deploy a bare bones Cofoundry sample like the SimpleSite and see if you can get it working. That would rule out anything in your implementation being an issue. You could also try uploading your MS boilerplate MVC sample with Razor View Compilation enabled to see if that is triggering the issue.
I have had Cofoundry on .NET 6 running on IIS serves and previous versions running on servers hosted behind Plesk, but I know these types of hosts can run restricted environments with limited memory which is something I was trying to dig into but I'm yet to find anything concrete.
Hi team, I'm using cofoundry on net6 (simple.project net6). I run debug on local or release build on local run very well. But when deploy on server, it corrupt and can not access site. I test my hosting server by try deploying an fresh project of razor page net6 of microsoft boilerplate, it work very well.
Please help me determine something wrong? thank team.
this is my log start at Fatal exception:
program.cs