More in this section

Forums / General Discussions / Could not load type 'SitefinityWebApp.Site1' (Site1 is masterpage)

Could not load type 'SitefinityWebApp.Site1' (Site1 is masterpage)

7 posts, 0 answered
  1. G S S
    G S S avatar
    71 posts
    Registered:
    16 Mar 2008
    12 Feb 2011
    Link to this post
    Hi,

    I made and uploaded a pretty standard .master page, but get this error:

    Description: An error occurred during the parsing of a resource required to service this request. Please review the following specific parse error details and modify your source file appropriately.

    Parser Error Message: Could not load type 'SitefinityWebApp.Site1'.

    Source Error:

    Line 1:  <%@ Master Language="C#" AutoEventWireup="true" CodeBehind="Site1.master.cs" Inherits="SitefinityWebApp.Site1" %>
    

    How can I fix this?

    Thanks
  2. Radoslav Georgiev
    Radoslav Georgiev avatar
    3370 posts
    Registered:
    01 Feb 2016
    16 Feb 2011
    Link to this post
    Hi G S S,

    Can you please make sure that you have built your website before using the master page? Also you can try changing the CodeBehind property to CodeFile, this will automatically compile the class at runtime.

    Regards,
    Radoslav Georgiev
    the Telerik team
  3. Thomas Derenthal
    Thomas Derenthal avatar
    4 posts
    Registered:
    07 Apr 2010
    12 Sep 2011
    Link to this post
    I changed CodeBehind to CodeFile and I get the error: "The file '/App_Master/MobileHome.master.cs' does not exist"
    I am using Sitefinity 3.7 and when prompted during upload that the master page has a codebehind page, I click ok.
  4. Radoslav Georgiev
    Radoslav Georgiev avatar
    3370 posts
    Registered:
    01 Feb 2016
    15 Sep 2011
    Link to this post
    Hello Thomas Derenthal,

    When you click OK you should see a second upload box which allows you to select the code file. Can you please let me know if you are uploading the master file.

    Kind regards,
    Radoslav Georgiev
    the Telerik team
    Do you want to have your say in the Sitefinity development roadmap? Do you want to know when a feature you requested is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
  5. Thomas Derenthal
    Thomas Derenthal avatar
    4 posts
    Registered:
    07 Apr 2010
    15 Sep 2011
    Link to this post
    It does not prompt me a second time for a codebehind page. I am using 3.7
  6. Radoslav Georgiev
    Radoslav Georgiev avatar
    3370 posts
    Registered:
    01 Feb 2016
    17 Sep 2011
    Link to this post
    Hello Thomas Derenthal,

    Can you please try FTPing the master page file and its code file to the ~/App_Master directory of your website?

    All the best,
    Radoslav Georgiev
    the Telerik team
    Do you want to have your say in the Sitefinity development roadmap? Do you want to know when a feature you requested is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
  7. Thomas Derenthal
    Thomas Derenthal avatar
    4 posts
    Registered:
    07 Apr 2010
    19 Sep 2011
    Link to this post
    I am so sorry to have troubled you with this. I now see where it is prompting me for the code behind. My bad.
7 posts, 0 answered