473,402 Members | 2,046 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,402 software developers and data experts.

Server error in '/' Application

I am using Visual Studio 2008; in that am working on a project which is of type Website of ASP.net.My project is working fine till three webpages, but for 4th one it is showing Server error in '/' application. Description of the error is as follows:
Parser Error
Description: An error occured 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.Webform4'
Source Error:
Expand|Select|Wrap|Line Numbers
  1. Line 1:<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="WebForm4.aspx.cs" Inherits="Webapplication.WebForm4"%>
Version information Microsoft .NET version:2.0.50727.3603; ASP.NET Version:2.0.50727.3082
Jan 22 '12 #1
6 2749
Joseph Martell
198 Expert 128KB
It sounds like you renamed the class WebForm4 in the code behind file.

This line:
Expand|Select|Wrap|Line Numbers
  1.     Line 1:<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="WebForm4.aspx.cs" Inherits="Webapplication.WebForm4"%>
tells the compiler where the code lives to handle the events of this page. If you rename a class without updating this line then you break the link and errors like this one result.
Jan 23 '12 #2
But i have renamed all the classes in the earlier three webforms and the same line is there in respective webforms and none of the webforms are showing any error. Further more this line is self generated, i think user is not supposed to make changes into it.
Jan 24 '12 #3
Joseph Martell
198 Expert 128KB
If your other three forms are functioning correctly then I guarantee that the class specified by the Inherits attribute is valid and exists in the file specified in the CodeBehind attribute for those respective pages.

You are correct, the VS IDE is supposed to take care of all of the wiring back and forth but it can mess up. Your page is expecting a class named WebForm4 in a file named WebForm4.aspx.cs. If that class is not found in that file then the parse error you saw is the result.

I think there are only 3 options to fix your error:
  1. Modify the <%@ Page element in your aspx source - this is probably the fastest way to fix your problem.
  2. Change your class name in WebForm4.aspx.cs to WebForm4 - if this is a partial class (like it was in my test solution in VS 2008) then you have to make sure to change the name on the rest of the class definition as well.
  3. Delete WebForm4 and start a new page so that you start with a working link between the aspx file and the CodeBehind file. This option isn't bad if you haven't done much on the form yet. If you have done a lot of work then it can be quite a pain to reproduce this way.
Jan 24 '12 #4
I have tried the third option many times; but i still get the same error. About first 2 options i don't know what to change.
Jan 25 '12 #5
Joseph Martell
198 Expert 128KB
What did you rename the WebForm4 class to?
Jan 25 '12 #6
I havn't renamed the Webform4 class
Jan 27 '12 #7

Sign in to post your reply or Sign up for a free account.

Similar topics

0
by: Krishnamoorthy | last post by:
have a website which is running under asp. I have created a folder and declared as Virtual directory from webspace provider. Now i placed files which are generated at a time of creating new...
6
by: Javier Cortés Cortés | last post by:
i am getting this error when i am trying to access any file(with the ext. aspx) from my remote server. the error is : Server Error in '/' Application....
4
by: tommy | last post by:
hello everbody, i write a little asp-application with forms-authentication. i copy my aspx-files with web.config to my webspace and i get the error above... i tried to set the...
6
by: AlanS | last post by:
I have used Visual Studio for about 8 months. I have developed some ASP solutions. I had to get on with some other things and have not worked with ASP.NET for a couple months. In the meantime, I...
0
by: Darren | last post by:
Hi, I get the above error message when I try to run my page on the remote server. As I am a newbie with .net, I chose Project | Copy to copy the files needed to a seperate local directory then...
8
by: Rod | last post by:
I have been working with ASP.NET 1.1 for quite a while now. For some reason, opening some ASP.NET applications we wrote is producing the following error message: "The Web server reported...
12
by: Kevin Farless | last post by:
Hi all, I'm having trouble viewing any .aspx pages on my hosting company's server. The server is a new box running Windows Server 2003 default installation. I'm the first client to try using...
2
by: news.microsoft.com | last post by:
hi, I am new in ASP.NET i make a page using Visual Studio.net compile and successfully run on local system but when i upload it on my internet live server it always gives me the same error if...
0
by: Joergen Bech | last post by:
Fairly new to ASP.NET 1.1. Getting the error below when running application on a web server outside of my control, but only the first time I run it: 1. After a long period of inactivity (or...
0
by: Drushti Avarani via .NET 247 | last post by:
(Type your message here) Hi All, Probably I am posting the message under wrong heading i.einstead of ...languages.vb ,it should be ...languages.C#. I havemade a project in C# language using VS.NET...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.