I've just started getting this error when trying to edit .cshtml files through Umbraco on 4.9.1
Server Error in '/' Application. The extension for the current file 'macroScripts\test.c' is not of an allowed type for this editor. This is typically controlled from either the installed MacroEngines or based on configuration in /config/umbracoSettings.config
Is the file extension saved correctly? Seems it's missing an s so it says test.cs - or is that a part of the issue? that test.cs is being seen as test.c when editing from the backoffice?
The files are saved fine as .cshtml. They can be edited via VS and work on the front end fine. So yes the issue appears to be that backoffice is seeing them as .c files.
They have all worked up until recently which is what is so odd.
Found the source. I had a URL rewrite to so that Umbraco would handle .html files but it was also picking up .cshtml files. Fix is to add in \ before .html
Error when editing razor files
I've just started getting this error when trying to edit .cshtml files through Umbraco on 4.9.1
Hi Dan
Is the file extension saved correctly? Seems it's missing an s so it says test.cs - or is that a part of the issue? that test.cs is being seen as test.c when editing from the backoffice?
/Jan
The files are saved fine as .cshtml. They can be edited via VS and work on the front end fine. So yes the issue appears to be that backoffice is seeing them as .c files.
They have all worked up until recently which is what is so odd.
I've just upgraded to 4.10 and am still getting this error.
Found the source. I had a URL rewrite to so that Umbraco would handle .html files but it was also picking up .cshtml files. Fix is to add in \ before .html
<add name="html_net2"
redirect="Domain"
ignoreCase="true" rewriteUrlParameter="IncludeQueryStringForRewrite"
virtualUrl="http://domain.co.uk/(.*)\.html"
redirectMode="Permanent"
destinationUrl="http://www.aperfectcv.co.uk/$1" />
is working on a reply...