Open Closed

Error with ABP Text Template #220


User avatar
0
Repunjay created

Hi,

I'm trying to use ABP text templates in my code by referring the TextTemplateDemo sample solution. I have followed steps in documentation and sample code, but I get below error when try to render a template from my code solution -

Please suggest?

Note sure what is causing this issue. 2020-06-05 09:49:37.476 +05:30 [ERR] ---------- RemoteServiceErrorInfo ---------- 2020-06-05 09:49:37.479 +05:30 [ERR] { "code": null, "message": "An internal error occurred during your request!", "details": null, "validationErrors": null } 2020-06-05 09:49:37.480 +05:30 [ERR] The upgradeable lock is being released without being held. System.Threading.SynchronizationLockException: The upgradeable lock is being released without being held. at System.Threading.ReaderWriterLockSlim.ExitUpgradeableReadLock() at Volo.Abp.TextTemplating.VirtualFiles.LocalizedTemplateContentReaderFactory.CreateAsync(TemplateDefinition templateDefinition) at Volo.Abp.TextTemplating.VirtualFiles.VirtualFileTemplateContentContributor.GetOrNullAsync(TemplateContentContributorContext context) at Volo.Abp.TextTemplating.TemplateContentProvider.GetContentOrNullAsync(ITemplateContentContributor[] contributors, TemplateContentContributorContext context) at Volo.Abp.TextTemplating.TemplateContentProvider.GetContentOrNullAsync(TemplateDefinition templateDefinition, String cultureName, Boolean tryDefaults, Boolean useCurrentCultureIfCultureNameIsNull) at Volo.Abp.TextTemplating.TemplateRenderer.RenderSingleTemplateAsync(TemplateDefinition templateDefinition, Dictionary2 globalContext, Object model) at Volo.Abp.TextTemplating.TemplateRenderer.RenderInternalAsync(String templateName, Dictionary2 globalContext, Object model) at Volo.Abp.TextTemplating.TemplateRenderer.RenderAsync(String templateName, Object model, String cultureName, Dictionary`2 globalContext)


6 Answer(s)
  • User Avatar
    0
    liangshiwei created
    Support Team Fullstack Developer

    Hi

    I can't reproduce your problem, can you provide steps to reproduce?

  • User Avatar
    0
    Repunjay created

    Thanks for the response. Is it possible for an online connect so that I can explain the issue from code?

  • User Avatar
    0
    liangshiwei created
    Support Team Fullstack Developer

    OK, Sure.

  • User Avatar
    0
    Repunjay created

    Thanks, could you please let me know how do you want me connect with you? Are you available on teams or Google meet?

  • User Avatar
    0
    liangshiwei created
    Support Team Fullstack Developer

    Do you have Teamviewer? You can send connection id to my email: liangshiw@outlook.com, Thanks.

  • User Avatar
    0
    Repunjay created

    Hi,

    Never mind. I was able to resolve it, actually below line was added to both module classes (MyProjectApplicationModule, MyProjectHttpApiHostModule) which was causing the issue -

    Configure<AbpVirtualFileSystemOptions>(options => { options.FileSets.AddEmbedded<MyProjectApplicationModule>("MyProject"); });

    Thanks for the prompt response and help.

Made with ❤️ on ABP v9.1.0-preview. Updated on December 12, 2024, 07:15