最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

asp.net core mvc - ABP customization for MVC page not working in production - Stack Overflow

programmeradmin3浏览0评论

in a web app developed with ABP v8.0.2 we are trying to customize the LeptonXLite theme for the login page and the app layout. We want to customize the login page and the page layout of the entire web app.

We applied the customizations, that work fine when the web app is running from VisualStudio, but when we build and deploy in production on IIS, the customizations disappear and the default login page and default layout is shown.

Below what we tried:

  1. We copied the source code of the LeptonXLite theme in the web project: folder structure

  2. We customized the layout in: Themes/LeptonXLite/Layouts/Application.cshtml

  3. In the web project we added Pages/Account/Login.cshtml, copied the source and customized it

  4. In WebModule.ConfigureServices we added:

Configure<AbpRazorTemplateCSharpCompilerOptions>(options =>
{
    options.References.Add(MetadataReference.CreateFromFile(typeof(OurWebModule).Assembly.Location));
});

Configure<AbpVirtualFileSystemOptions>(options =>
{
    options.FileSets.AddEmbedded<ProjectWebModule>("OurRootNamespace");
});
  1. In the web project config we added:
...
<PropertyGroup>
    <GenerateEmbeddedFilesManifest>true</GenerateEmbeddedFilesManifest>
</PropertyGroup>
...
<ItemGroup>
    <PackageReference Include="Volo.Abp.TextTemplating.Razor" Version="8.0.2" />
    <PackageReference Include="Microsoft.Extensions.FileProviders.Embedded" Version="8.0.0" />
</ItemGroup>
...

<ItemGroup>
    <EmbeddedResource Include="Themes\**\*.*" />
    <Content Remove="Themes\**\*.*" />
</ItemGroup>

<ItemGroup>
    <EmbeddedResource Include="Pages\Account\**\*.*" />
    <Content Remove="Pages\Account\**\*.*" />
</ItemGroup>

  1. We have cleared the cache on the browser and in IIS with application pool -> Recycle

What are we missing?

Thank you

发布评论

评论列表(0)

  1. 暂无评论