0

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
    { ... }
}
Rick Root
  • 31
  • 3
  • Possible duplicate of [Inherit problem in asp.net](https://stackoverflow.com/questions/1671747/inherit-problem-in-asp-net) – Waayd Jul 29 '18 at 15:09
  • 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 Jul 29 '18 at 15:27
  • @RickRoot are you deploying your application with source code(.cs files) on the server? You mentioned `I have verified that the dll is in the bin folder` so which dll have you verified? – Mohsin Mehmood Jul 29 '18 at 16:04
  • I am not deploying the .cs files. The only DLL being deployed is authenticate.dll. The project is configured to only deploy files necessary to run the application, we never deploy the CS files to the server. – Rick Root Jul 29 '18 at 16:15
  • @RickRoot check your application pool settings. Try setting `Enable 32 bit Applications` to true and also ensure that `Managed Pipeline Mode` is set to Integrated. – Mohsin Mehmood Jul 29 '18 at 16:46
  • Thanks. I had some hope for that, as Enable 32 bit applications was disabled, but enabling it did not help. – Rick Root Jul 29 '18 at 17:02
  • @MohsinMehmood, you led me down the right path but I'm still not 100% sure what the right ANSWER is. I had not converted my sobfolder to an application in IIS. I did that and I tried using the application pool identity credentials on the main application and then left the physical path credentials on the new application (using the same app pool) to pass thrugh the application user and I get a "Invalid Credentials" error but if I put my local administrator account, it basically works. – Rick Root Jul 29 '18 at 17:12
  • @RickRoot Your application is configured as a root level website in IIS or as a sub-application under website? A screenshot can be helpful – Mohsin Mehmood Jul 29 '18 at 17:16
  • AH, fixed that! https://stackoverflow.com/questions/13279593/401-unauthorized-access-is-denied-due-to-invalid-credentials – Rick Root Jul 29 '18 at 17:17
  • It is deployed to a subdirectory under the root web site. Part of my problem seemed to be that the anonymous user was configured to use IUSR instead of the application pool identity, which is the way we're supposed to be setting things up. – Rick Root Jul 29 '18 at 17:18

0 Answers0