Parser Error Message: Could not load type 'webmarketing'

Mohammed Hanafy picture Mohammed Hanafy · Apr 22, 2014 · Viewed 98.1k times · Source

After finishing the web application and publishing it online no matter I try I keep getting the following error, keep in mind that it runs locally as it should...

Parser Error Message: Could not load type 'webmarketing'.

enter image description here

I ran through that solution though supposedly I'm doing the same as the solution, yet I'm still facing the same issue...

ASP.NET Parser Error Cannot load code behind


Here is the code behind:

using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

namespace webmarketing
{
    public partial class Masterpage : System.Web.UI.MasterPage
    {
        protected void Page_Load(object sender, EventArgs e)
        {
            string admin = (string)Session["Admin"];
            if (string.IsNullOrEmpty(admin))
            {
                logout.Visible = false;
            }
            else
            {

            }
        }
    }
}

Answer

user3527150 picture user3527150 · Apr 22, 2014

I had same problem before i just change CodeBehind to CodeFile and it worked.I remember it works in local but i had this problem after uploading.