PDA

View Full Version : ASP.Net File Locations


coastie
11-20-2006, 08:57 AM
Hi!

I am new to using ASP.Net. I have created an ASP web page and have loaded it into my domain. The .aspx page uses a code behind module in another file (.aspx.cs). For some reason, the server can't seem to recognize or find the code behind module file.

Could someone please tell me if the code behind modules have to be in a special folder of my domain? Or maybe I need to compile something differently in visual studio?

P.S. Here is the error message I receive - these are lines that are in the .aspx web page file. The server can't find the webmailapp.WebForm1 class that the page uses. The webmailapp.WebForm1 class is in the code behind module which is a .aspx.cs file.

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 'webmailapp.WebForm1'.

Source Error:

'<' and '>' removed for readability.
Line 1: %@ Page language="c#" Codebehind="WebForm1.aspx.cs" AutoEventWireup="false" Inherits="webmailapp.WebForm1" %
Line 2: DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"

Source File: /crafts/WebForm1.aspx Line: 1


--------------------------------------------------------------------------------
Version Information: Microsoft .NET Framework Version:2.0.50727.42; ASP.NET Version:2.0.50727.210

Any help would be appreciated - thank you!

Tom

coastie
11-20-2006, 10:25 PM
Hi,

FYI for future people. I had installed the aspx web pages in a folder. But I created that folder before the ASP service was started on my account. In order to get the ASP features to work, ASP must already be installed and then you create the folder - explicitly choosing to incorporate ASP support into the folder.

There may be a way to change the services on a folder but I didn't check into that. I just created a new folder, reinstalled my web project, and everything worked.

coastie.