I've had this error a few times, and I think it occurs when I make changes to one of my templates. The error is :
Server Error in '/' Application.
Compilation Error
Description: An error occurred during the compilation of a resource required to service this request. Please review the following specific error details and modify your source code appropriately.
Compiler Error Message: CS0426: The type name 'Web' does not exist in the type 'System'
Source Error:
Line 34:
Line 35:
Line 36: public class _Page_Views__ViewStart_cshtml : System.Web.Mvc.ViewStartPage {
Line 37:
Line 38: #line hidden
Source File: C:\Windows\Microsoft.NET\Framework\v4.0.30319\Temporary ASP.NET Files\root\917f7852\1ffdd359\App_Web__viewstart.cshtml.65a2d1ee.pcvmumsc.0.cs Line: 36
I can clear it by clearing the files in the "Temporary ASP.NET Files" folder, but can anyone explain why it recurs.
In VS2017, on a brand new site that I was building, I created a sub-folder in \Views\Partials called SiteLayout.
I created two Partial Views there, but noticed that while I was busy doing that, VS2017 automatically created a folder called \Views\Shared and put a file in there called _Layout.cshtml.
VS also automatically created a file called _ViewStart.cshtml in the \Views folder.
The error is coming from _ViewStart.cshtml.
Can I just get rid of these new files?
Thanks
Muiris
EDIT
I'm not sure if it was the right thing to do, but I got rid of these extra files and I've got my site back. I had to clear caches in the TEMP folder and touch the web.config, but it's all good.
In addition to these files, VS also seems to have added a \Content folder with Bootstrap and Site css files, and a \fonts\ folder.
Right, I'm getting tired of shooting myself in the foot.
Never, ever call a doctype System.
System is a reserved word, and can crash your backoffice.
I wanted to add some System properties to a Document Type, which would have been part of the overall Page Properties using the Compositions feature.
If you get the error below, then you have called a doctype System.
Server Error in '/' Application.
________________________________________
Compilation Error
Description: An error occurred during the compilation of a resource required to service this request. Please review the following specific error details and modify your source code appropriately.
Compiler Error Message: CS0426: The type name 'Object' does not exist in the type 'System'
Source Error:
Line 31: <html lang="en">
Line 32: <head>
Line 33: <base href="@Model.GlobalSettings.Path.EnsureEndsWith('/')" />
Line 34: <meta charset="utf-8">
Line 35: <meta name="viewport" content="width=device-width, initial-scale=1.0">
I solved my own problem by going into the database and renaming System as System Properties in the umbracoNode and cmsContentType tables.
Template changes cause Server Error
I've had this error a few times, and I think it occurs when I make changes to one of my templates. The error is :
I can clear it by clearing the files in the "Temporary ASP.NET Files" folder, but can anyone explain why it recurs.
Thanks
Muiris
Sorry everyone, I've just granted permissions to the
Application Pool
and the problem hasn't recurred.Thanks again
Muiris
EDIT
To be clear, I made sure to include the app_data folder, as I noticed I had to clear the files here in order to get my site back.
I've just upgraded to 8.0.1 and this error is back.
I can't get rid of it...
Okay, here's how I recreated this problem.
In VS2017, on a brand new site that I was building, I created a sub-folder in
\Views\Partials
calledSiteLayout
.I created two Partial Views there, but noticed that while I was busy doing that, VS2017 automatically created a folder called
\Views\Shared
and put a file in there called_Layout.cshtml
.VS also automatically created a file called
_ViewStart.cshtml
in the\Views
folder.The error is coming from
_ViewStart.cshtml
.Can I just get rid of these new files?
Thanks
Muiris
EDIT
I'm not sure if it was the right thing to do, but I got rid of these extra files and I've got my site back. I had to clear caches in the TEMP folder and touch the web.config, but it's all good.
In addition to these files, VS also seems to have added a
\Content
folder with Bootstrap and Site css files, and a\fonts\
folder.Right, I'm getting tired of shooting myself in the foot.
Never, ever call a doctype
System
.System
is a reserved word, and can crash your backoffice.I wanted to add some
System
properties to a Document Type, which would have been part of the overall Page Properties using theCompositions
feature.If you get the error below, then you have called a doctype
System
.I solved my own problem by going into the database and renaming
System
asSystem Properties
in theumbracoNode
andcmsContentType
tables.Thanks
Muiris
is working on a reply...