Developer forum

Forum » CMS - Standard features » Page template locked by process

Page template locked by process

Arnór Halldórsson
Arnór Halldórsson
Reply

Hi nerds,

One of our live websites got this error today and it blocked the website from being viewed:

System.ApplicationException: The process cannot access the file 'D:\Dynamicweb\Files\Templates\Designs\ProjectName\_parsed\DefaultPage_Vite.parsed.cshtml' because it is being used by another process. at Dynamicweb.Core.Helpers.TextFileHelper.ReadTextFile(String path, Encoding encoding) at Dynamicweb.Rendering.Reader.Read(String path, Int32 counter, Encoding encoding, Boolean replaceTags, Boolean& isCached, List`1 includes)

The page template in question looks like this:

@inherits Dynamicweb.Rendering.ViewModelTemplate<Dynamicweb.Frontend.PageViewModel>
@using Dynamicweb.Environment;
@using Advania.Custom.Extensions;
@MasterPageFile("Master/Master_Vite.cshtml")
@{
    ExecutingContext context = new ExecutingContext();
    bool isVisualEditor = context.IsVisualEditor();
}
@if (isVisualEditor)
{
    <grid>
        @Model.Grid("grid", "Grid", "", "VueGrid")
    </grid>
} else
{
    <app></app>
}

Best regards,
Arnór


Replies

 
Nicolai Pedersen Dynamicweb Employee
Nicolai Pedersen
Reply

Hi Arnor

Can be many things locking the file - antivirus, back jobs etc.. Did you see the error again?

It is not a known issue at least.

BR Nicolai

 
Andrew Rushworth
Reply

Hi,

We are experiencing this a lot on Azure hosting - tends to be when users are editing content.

Thanks,
Andrew

 
Kevin Steffer
Kevin Steffer
Reply

We also have a couple of cases lately on DW 9.15.x, 9.16.x and 9.17.x

Where the frontend just dies because the <Page>.parsed.cshtml is already in use. And file is locked - the only way out of it is to recycle App Pool.

 
Imar Spaanjaars Dynamicweb Employee
Imar Spaanjaars
Reply

We had a similar issue where this was caused by the deletion of the _parsed folder based on a specific query string variable. I believe that code has now gone and the changes should be available in 9.17.15 and 9.18.1.

 

 

You must be logged in to post in the forum