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, Dictionary
2 globalContext, Object model)
at Volo.Abp.TextTemplating.TemplateRenderer.RenderAsync(String templateName, Object model, String cultureName, Dictionary`2 globalContext)
6 Answer(s)
-
0
Hi
I can't reproduce your problem, can you provide steps to reproduce?
-
0
Thanks for the response. Is it possible for an online connect so that I can explain the issue from code?
-
0
OK, Sure.
-
0
Thanks, could you please let me know how do you want me connect with you? Are you available on teams or Google meet?
-
0
Do you have Teamviewer? You can send connection id to my email: liangshiw@outlook.com, Thanks.
-
0
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.