Open Closed

Azure hosted MVC error: Could not find a file/folder at the location (Quick fix solution) #6201

User avatar
0 created
  • ABP Framework version: v7.4
  • UI Type: MVC
  • Database System: EF Core
  • Exception message and full stack trace:
  • Steps to reproduce the issue:

I've spent the evening trying to get an email template sending when a new user has been created. After looking around for a few examples I had the same issue as others where it works locally but not when hosted in Azure. Looking at the log.txt I found this error which meant the virtual files weren't being found.

2023-11-20 20:50:12.456 +00:00 [ERR] Could not find a file/folder at the location: /Emailing/Templates/NewUserWelcome.tpl Volo.Abp.AbpException: Could not find a file/folder at the location: /Emailing/Templates/NewUserWelcome.tpl

Short version, I found the answer / workaround on stackoverflow. Copy your email template folder + .tpl file and put it in the Domain.Shared rather than the Application project and it'll work. If you have got everything else in place but its not working, this might be the last step required:

1 Answer(s)
  • User Avatar
    maliming created
    Support Team


    This is because the DomainShared has builtin AbpVirtualFileSystem configure.

    Configure<AbpVirtualFileSystemOptions>(options =>
        <EmbeddedResource Include="*.tpl" />
        <Content Remove="*.tpl" />
        <PackageReference Include="Microsoft.Extensions.FileProviders.Embedded" Version="8.0.0" />
Made with ❤️ on ABP v8.0.0 Updated on November 17, 2023, 08:43