View Single Post
  #2 (permalink)  
Old January 23rd, 2006, 12:14 PM
planoie's Avatar
planoie planoie is offline
Friend of Wrox
Points: 16,481, Level: 55
Points: 16,481, Level: 55 Points: 16,481, Level: 55 Points: 16,481, Level: 55
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Aug 2003
Location: Clifton Park, New York, USA.
Posts: 5,407
Thanks: 0
Thanked 16 Times in 16 Posts
Default

The execution of a ASP.NET page happens within the context of 1 virtual directory application. Any page that lives within that directory will be in that context (this includes root pages and pages in any sub directory). When you page executes .NET looks for an assembly that contains the page class that the page inherits. The normal location for that assembly is the virtual ddirectory's bin\ folder.

You create another virtual directory and place a new .ASPX file in it. When that page executes it does so in a different application context. Therefore, ASP.NET tells you it can't find the class because it is looking for assemblies in the bin\ folder for the current application context which doesn't exist. So you'd need to copy all the binaries from the bin\ folder into a new bin\ folder that falls at the root of your new virtual directory.

-Peter