CodeVerge.Net Beta


   Explore    Item Entry    Members      Register  Login  
NEWSGROUP
.NET
Algorithms-Data Structures
Asp.Net
C Plus Plus
CSharp
Database
HTML
Javascript
Linq
Other
Regular Expressions
VB.Net
XML





Zone: > NEWSGROUP > Asp.Net Forum > migration_to_asp.net.migrating_from_asp.net_1.x_to_asp.net_2.0 Tags:
Item Type: NewsGroup Date Entered: 9/14/2006 7:17:39 AM Date Modified: Subscribers: 0 Subscribe Alert
Rate It:
(NR, 0)
XPoints: N/A Replies: 3 Views: 15 Favorited: 0 Favorite
Can Reply:  No Members Can Edit: No Online: Yes
4 Items, 1 Pages 1 |< << Go >> >|
rtg2006
Asp.Net User
What is App_Code Folder for?9/14/2006 7:17:39 AM

0/0

Hello, I am trying to convert a ASP.NET 1.1 Application to ASP.NET 2.0 application.

When I tried to open the app in VS.NET 2005, it asked me for converting the project for which i confirmed to continue.

The Actual problem started from here.

The new application is having a folder named App_Code and some of the files are added here. When i tried to compile the converted app, it throwed many errors.

Here are the project details (ASP.NET 1.1 Project)

-> All the aspx pages uses a page B which inturn uses page A which is derived from System.Web.UI.Page

-> All the ascx  pages are in its ownFolder.

-> All the constants that I am using across the application are present in page A

Any new page that i create will be of the form

newPage : B

and Page B's namespace looks like

B : A


I am doing wrong anywhere?

I am stuck with my work.

It'd be nice of the administrators of this forum to create a new folder for converting the ASP.NET 2003 apps to ASP.NET 2005.

Hoping a reply from any of you at the earliest.

Thanks,

 

vivek_iit
Asp.Net User
Re: What is App_Code Folder for?9/14/2006 7:29:15 PM

0/0

Hello,

App_Code is a new addition to the Website model in ASP.NET 2.0. It contains all standalone/helper .cs/.vb files and they are compiled automatially whenever you change anything in the files within. All classes in this folder are referenced automatically in the rest of the application. Also in the Website model, there are no default namespaces created automatically.

You can put both A and B in the App_Code folder. Things should work fine, I cannot comment more unless you tell me what exactly are the errors thrown.

Alternatively, you can convert your project in 2003 to the Web Application Project model in 2005 (similar to the project model in 2003). See this link for details:

http://weblogs.asp.net/scottgu/archive/2006/04/05/442032.aspx

Hope this helps,

Vivek


MVP, ASP.NET || My Website || Blog || Articles

Please mark the most helpful reply/replies as "Answer".
rtg2006
Asp.Net User
Re: What is App_Code Folder for?9/15/2006 6:34:15 AM

0/0

Because there are pages referring to the page A, I am getting many errors. And if I try to place all the pages(X,Y,Z...) inheriting the page A into the App_Code folder I get th e following error - The File "X" is in the special directory 'App_Code', which is not allowed.


I tried the alternative method you had suggested - converting the web Application project in VS2003 into a Web Application Project in VS2005. Now I am able to build the project without any compilation errors... thankyou.
Fiorina81
Asp.Net User
Re: What is App_Code Folder for?11/26/2007 4:43:23 PM

0/0

Besides using the alternate method is there any other way to fix this error,  The File "X" is in the special directory 'App_Code', which is not allowed?

Thanks.

4 Items, 1 Pages 1 |< << Go >> >|



Search This Site:


Meet Our Sponsors:



Other Resources:

What is the best way to save data using a webservice? - asp.net_ajax ... Let's say I have a class called Car and it's declared in the app_code folder. ... And for example the following custom classes - you want to place in App_Code: ...
Error when adding classes to App_Code Folder RSS for Comments. JB King writes: 7/30/2008 # What is the definition for the class ParentMaster? ... adding classes to App_Code Folder "hey really good post ...
Introduction: ASP.NET 2.0 Folders - Syed Akbar Ali Introduction: What is DML, DDL, DCL and TCL in SQL Server ... App_code folder contains the code files for the classes, structures, enums etc. ...
ASP.NET Web Site Layout You can keep your Web site's files in any folder structure that is convenient for your application. To make it easier to ... the App_Code folder is referenced ...
Shared Code Folders in ASP.NET Web Sites ... want to share between pages, you can keep the code in one of two special folders underneath the root of your Web ... code for files in the App_Code folder. ...
Creating A DotNetNuke Module using ASP.NET AJAX - web services for use ... This article will cover what is needed to implement secure web services for use ... It will create files in a IWeb directory in the App_Code folder: ...
ASP.NET 2.0: Use VB.NET and C# within the App_Code folder An MVP From Wisconsin ... a sub-folder in the App_Code folder for each ... This is what I was looking for and it works! Thank you very much. Serna. PkingROch ...
VS2008 creates .cs files for linq in VB website - ASP.NET Forums What is the problem and how to fix this? ... my own class (which is VB) to the app_code folder, it throws out an exception ...
Page 2 - Creating a StudentDB Class for ASP.NET 2.0 ... Class for ASP.NET 2.0. Creating the Website and the App_Code Folder ... For example the App_Code folder is used to store your C# utility classes, data ...



 
All Times Are GMT