Search code examples
c#asp.netapp-code

Can you have multiple APP_CODE folders in a project


I inherited this code from another developer (3rd party) but I am implementing it. Its a large website done in c#. For twitter integration they must have created a new website project because the code inside the sub folder has its own bin and app code folder. This is published on IIS but its a strange setup where it compiles at run time. (If I make a code change to a file on the webserver and save it, it updates instantly without having to publish).

This subdirectory is throwing a 500 error and I assume its because I dont believe you can have multiple bin and app_code in the same website project. Is that a correct assumption. Should I combinbe all the app_code directories to the one in the root? Here is a more visual example of the directory layout:

MyWebsite
App_Code
BIN
 ...other folders and files
MySubdirectory
  App_Code  (ALLOWED??)
  BIN (ALLOWED??)

Solution

  • App_Code and Bin are special folders only at the root of the application. You should make MySubdirectory a child application in IIS.