Parser Error Message - Could not load type 'xxx.Default' using CodeBehind

The name of the pictureThe name of the pictureThe name of the pictureClash Royale CLAN TAG#URR8PPP

Parser Error Message - Could not load type 'xxx.Default' using CodeBehind



I've been searching all over for an answer to this problem. We have set up a new server (Windows Server 2016) and I'm trying to deploy a very simple authentication application that I built about 4 years ago. It is working fine on our old server (Windows SErver 2012R2) but when I deploy it to the new server, I'm getting the error message below.



Every answer I've found has told me to change CodeBehind to CodeFile but that's not something I want to do, it seems to require publishing the cs files to the web server too. There's been a few other answers too but none helpful.



I tried re-building the application from scratch - whole new solution, installed .NET framework 4.7.2 (the latest version I had previously was 4.5.2), and nothing!



I have verified that the dll is in the bin folder. The permissions seem to be set properly



Server Error in '/' Application.



Parser 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 'authenticate.Default'.



Source Error:


Line 1: <%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Default.aspx.cs" Inherits="authenticate.Default" %>
Line 2:
Line 3: <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">



Source File: /authenticate/Default.aspx Line: 1



Version Information: Microsoft .NET Framework Version:4.0.30319; ASP.NET Version:4.7.2623.0



Additional Information



My code behind from the Default.aspx.cs file:


namespace authenticate

public partial class Default : System.Web.UI.Page
...



From the Default.aspx file:


<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Default.aspx.cs" Inherits="authenticate.Default" %>





Possible duplicate of Inherit problem in asp.net
– Waayd
23 mins ago





Added additional information above. I don't believe this is a duplicate of that. The error is completely different, and as far as my files are set up correctly.
– Rick Root
5 mins ago










By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Comments

Popular posts from this blog

Executable numpy error

PySpark count values by condition

Mass disable jenkins jobs