tags:

views:

19

answers:

2

My web.config file is on the root of the application space. My source code must be in another folder off the root. I also have namespaces defined in the web.config.

When I run the application it cannot find any of the namespaces that were defined, which is then causing all my @Register tag to crash.

How can I have the web.config in one location and my code in another?

+1  A: 

You can only do this if the /bin folder contains your files, or for WSP (WebSite Project) setups you can use the app_code folder to contain items.

Edit

From the sounds of things it looks as if you don't have the root marked as the application, but an actual sub folder. I would ensure that in IIS you have the root setup as the application and not your sub-folder, that would cause some major confusion.

Mitchel Sellers
I have all the assemblies needed in the bin folder. The bin folder is in the same directory as all the code. The only item that is one level up is the web.config. So I need to change/set something to say the bin folder is here?
Arnej65
I updated my answer with a thought.....
Mitchel Sellers
No the root is the application, and not the sub folder. See below for my solution
Arnej65
A: 

The bin and app_glolbalresource folders were moved to the root folder. then all the code was moved to the subfolder.

Now everything works. Some minor changes were made to the view code to import the namespaces that were needed.

Arnej65