Is there a way to access both a root App_Code folder and an App_Code folder in a sub directory in IIS 7.0?
Question
I would love to be able to have a common set of Classes in my root App_Code folder, which is how we are set up right now. However, it doesn't make sense to put specific code there for some application residing in a sub directory.
- Root Folder
- App_Code
- SubDirApp1
- App_Code
- SubDirApp2
- App_Code
- SubDirApp1
We currently have each production application in it's own "Root" folder with it's own application pool. Then we just mirror the main root App_Code folder there.
Solution
Personally if you have a common set of classes referenced by multiple assemblies/applications I would compiled those into a .dll file then add them as a reference rather than duplicating source code in an app_code folder.
This is in my opinion a prime case for building a class library, it is really what they were designed for!