Parser error message: Failed to load type

We are working on a web application. We are using ASP.net with C # (3.5 framework). We keep getting this error on a specific page.

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 'Page Name'. 

Each time we create a solution and upload a file, it will work, and then suddenly after 2-3 days of the same problem again. Please help me solve the problem. Thanks at Advance.

+8
source share
5 answers

We found 2 things, maybe this will help in the future, who will encounter a problem.

a) The file we changed it to was not updated properly, therefore why it caused an error, therefore project.dll updated, but this page was not updated properly.

b) This page is excluded from the project.

So please keep this in your mind. Most case files have not been updated.

Thanks.

+4
source share

This happened to me after creating a new page. Turns out I was working under an x86 processor instead of any processor mode in Configuration Manager. When testing in debug mode, the application ran against the local bin, but the file was actually placed in the bin / x86 directory until I reconfigured it.

+1
source share

It seems to me that there is other software on the computer (antivirus, backup, indexing software, ???) that modifies the page source.

You can try making the directory or file read-only after downloading it to see if this fixes the problem.

0
source share

Check the Inherits property in your page directive. It may have several attributes, but I suspect that it will contain at least the following:

 <%@ Page Language="C#" Inherits="Page Name" %> 

Change the Inherits value to the fully qualified name of the class specified in the page code behind the file, for example: MyProject.MyFaultyPage . If you do not have the code behind the file for this page, you can inherit System.Web.UI.Page .

0
source share

Close Visual Studio and select the solution folder and uncheck Readonly to solve your problem!

0
source share

All Articles