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
Likely not an inheretance problem... as you can above, the @Page declaration lists the inherts as "authenticate.Default" and that matches the class declaration below....
My code behind from the Default.aspx.cs file:
namespace authenticate
{
public partial class Default : System.Web.UI.Page
{ ... }
}