Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • MuirisOG 382 posts 1284 karma points
    Mar 19, 2019 @ 11:45
    MuirisOG
    0

    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 :

    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.

    Thanks

    Muiris

  • MuirisOG 382 posts 1284 karma points
    Mar 19, 2019 @ 11:48
    MuirisOG
    0

    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.

  • MuirisOG 382 posts 1284 karma points
    Mar 19, 2019 @ 18:39
    MuirisOG
    0

    I've just upgraded to 8.0.1 and this error is back.

    I can't get rid of it...

  • MuirisOG 382 posts 1284 karma points
    Mar 21, 2019 @ 18:26
    MuirisOG
    0

    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 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.

  • MuirisOG 382 posts 1284 karma points
    Mar 22, 2019 @ 11:25
    MuirisOG
    100

    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.

    Thanks

    Muiris

Please Sign in or register to post replies

Write your reply to:

Draft