5
votes

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 'WebApplication1.SiteMaster'.

Source Error:

Line 1: <%@ Master Language="C#" AutoEventWireup="true" CodeBehind="Site.master.cs" Inherits="WebApplication1.SiteMaster" %>
Line 2:
Line 3:

Source File: /eco/Site.Master Line: 1

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

I can't find the error, when I publish to my localhost IIS server it works fine but when I'm publishing to my web server it gives me this error?? Can anyone help with this?

2
try to clean build and publish againNeelam
How does your publish process look like? Do you use the publish dialog?citronas
I'm publishing right from Visual Studio, just right click on the Project and click publish and follow the steps. Before that I was publishing directly on the server (copy/paste).Slobodan Jovanovski
I don't know if I understand you correctly. I hope you are talking about copy/paste the published files and not the source code. Check if your remote IIS server has all the required ASP.Net and .Net framework versions installed. Also check the app pool version numberscitronas
the Framework version on my IIS web server is 4.0 and the ASP.Net is 4.0 but I can't find the app pool version. And Yes by Copy/Paste I mean copying the published files not the source code. Could it be that my IIS web server is supporting ASP.Net web sites but not ASP.Net web applications?? Because on my localhost I had to convert my website to web application.Slobodan Jovanovski

2 Answers

0
votes

I received this error directly after moving from VS 2015 to VS 2019. The Project was fully functional before.

My issue was related to bad qualification of the namespace in the master page file (which appeared to work fine in VS 2015).

Original markup in the non-functional MASTER tag was ...

Inherits="WebApplication1.Site" 

working code (now has my namespace in place) ...

Inherits="CP.Web.Site" 

Still not sure why this was needed but clearly something was not loading correctly before.

1
votes

built and clean solution then republish it again. and also check the version of application pool of IIS on web server.