Click to See Complete Forum and Search --> : App_Code not recognized


agro1986
05-29-2007, 11:39 AM
The problem is very simple, but I need a dire solution from those more knowledgeable...

I have installed IIS (Windows XP SP2) and then .NET 2.0. By default, IIS sets the root folder of the web server to:

C:\Inetpub\wwwroot

Now, I practice my ASP.NET programming on:

C:\Inetpub\wwwroot\aspx\test

And tried to create App_Code on:

C:\Inetpub\wwwroot\aspx\test\App_Code

However, the .cs files on the App_Code folder isn't recoginzed by the aspx files in the "test" folder. However, it DOES work when I move App_Code to:

C:\Inetpub\wwwroot\App_Code

(directly on the root folder of the web server)

That sucks, however, because it means I must have one "App_Code" to rule all aspx files... What must I do to make the App_Code folder usable when put on the same folder as the aspx files?

Thanks...

lmf232s
05-31-2007, 08:23 AM
You can do 1 of 2 things to fix this.

1. Go into IIS and change the Local Path to C:\Inetpub\wwwroot\aspx\test

2. Move your website down a level to C:\Inetpub\wwwroot

The problem your having is that IIS is pointing to C:\Inetpub\wwwroot which the root of your website. When you execute you page that page is trying to execute at C:\Inetpub\wwwroot\Default.aspx and not C:\Inetpub\wwwroot\aspx\test\Default.aspx.