Parser Error Message - Could not load type 'xxx.Default' using CodeBehind
![Creative The name of the picture](https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgKPz5qhCkKGdpPJ0wkSm5JqlliSJoZg92-H4DuCruovhkVFuXerCphZt9wys_Gr3uwQyXObMHDwattjG5BSeCEl_LdDq1GPLct8qYyRyX4fZ9C93oW-TX7IGZLYDwqRgfFCXA4aUxkBAcS/s1600/1.jpg)
![Creative The name of the picture](https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh6VebLk98DYwS3K2nWZSCatab-q4HrSuRk91M4fQA8SHrKU_-x-lq1n780pSU_bIVLqMRv6pc3dhhh-Y2PUwBS9mM0BxvY1eM6XsM-e7Diu4z-wAoeDG0vB3-2_1U9RE8sO0lg4PHiIXbI/s400/Clash+Royale+CLAN+TAG%2523URR8PPP.png)
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" %>
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.
Possible duplicate of Inherit problem in asp.net
– Waayd
23 mins ago