8

We are working on a Web Application.We are using ASP.net with c# (3.5 framework). We are Continue 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 build the solution & upload the file,it will work and then suddenly after 2 to 3 days same problem again.Please help me resolve the issue.Thanks in Advance.

5
  • On what method on that page this error occurs? Commented Dec 19, 2011 at 5:36
  • Actually its showing on aspx page on code file.Its not loading the page. Commented Dec 19, 2011 at 5:40
  • How do you resolve the problem after it occurs? Do you rebuild and reupload the file? Commented Dec 19, 2011 at 6:28
  • The error indicates that the page is attempting to inherit a class that does not exist. You need to fix your page directives and save the project. The problem shouldn't resurface unless you're constantly pulling outdated source code from a repository. Commented Dec 19, 2011 at 6:35
  • Thanks to all,We just fixed that issue. Commented Dec 19, 2011 at 7:53

5 Answers 5

4

We found 2 things,may be that will help in future who will face an issue.

a)The file in which we have changed it was not updated properly,so that's why It was causing an error,so project .dll has updated but that page was not updated properly.

b)That page Excluded from the project.

so Please keep these thing in your mind.Most of the cases files was not updated.

Thanks.

Sign up to request clarification or add additional context in comments.

Comments

1

This happened to me after creating a new page. It turns out I was running under x86 CPU instead of Any CPU mode under the Configuration Manager. When testing in debug mode the application was running against the local bin, but the file was actually being placed in the bin/x86 directory until I reconfigured it.

Comments

0

It sounds to me like there is some other software on the machine (anti-virus, backup, indexing software, ???) that is modifying the page source.

You could try making the directory or file readonly after uploading it to see if that resolves the problem.

Comments

0

Check the Inherits property of your page directive. It may have a number of attributes, but I suspect it will contain at least the following:

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

Change the value of Inherits to the fully qualified name of the class outlined in the page's code behind file, i.e. something like: MyProject.MyFaultyPage. If you don't have a code behind file for that page, you can inherit System.Web.UI.Page.

Comments

0

Close Visual Studio and select the solution folder and uncheck Readonly that will solve your issue!

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.