Developer forum

Forum » Development » Error on Razor Engine

Error on Razor Engine

Shiwanka Chathuranga Dynamicweb Employee
Shiwanka Chathuranga
Reply

Could not delete C:\Windows\TEMP\RazorEngine_twyaoezb.xx5: System.UnauthorizedAccessException: Access to the path 'CompiledRazorTemplates.Dynamic.RazorEngine_d0d203368fb64296945dbb5fad64359c.dll' is denied. at System.IO.Directory.DeleteHelper(String fullPath, String userPath, Boolean recursive, Boolean throwOnTopLevelDirectoryNotFound, WIN32_FIND_DATA& data) at System.IO.Directory.Delete(String fullPath, String userPath, Boolean recursive, Boolean checkHost) at RazorEngine.Compilation.CrossAppDomainCleanUp.CleanupHelper.DoCleanUp()

when i search on the error  its issue on RazorEngine but older version

https://stackoverflow.com/questions/28878516/razor-fails-to-delete-dynamic-template-dll-files-and-trashes-filesystem

https://github.com/Antaris/RazorEngine/issues/244

 

any idea to fix this?


Replies

 
Nicolai Pedersen
Reply

No - it can happen if the folder gets locked by a process or something like that. We have no good solution for this - iisreset would work. But if it happens often, something else is probably wrong causing this. Could be a simple thing as missing permissions on the windows box. You can try to change the iis app pool user to localsystem or networkservice,

 
Shiwanka Chathuranga Dynamicweb Employee
Shiwanka Chathuranga
Reply

Let me try and its not happening always actually.

Thanks Nicolai 

 

You must be logged in to post in the forum