Reputation: 14946
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.
Upvotes: 8
Views: 11237
Reputation: 363
Close Visual Studio and select the solution folder and uncheck Readonly that will solve your issue!
Upvotes: 0
Reputation: 1236
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.
Upvotes: 1
Reputation: 14946
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.
Upvotes: 4
Reputation: 4992
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
.
Upvotes: 0
Reputation: 44971
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.
Upvotes: 0