IIS - add subapplication in root application - Asked By prateek on 03-Feb-12 08:41 AM

hi

i create a application and use vb as code behind and add virtual directory in IIS . after this now i require to add a folder in my application.there are some aspx files and code behind file is in c#.

i want to execute both of my vb file and c# file in one application.

for example

www.mydomain.com

in root folder there are some aspx file with vb code behind file

and

www.mydomain.com/admin/

in this folder some c# files exist


i want to execute both of my vb and c# files in one application

should i attach web.config in both folder or not

i have not permission on IIS on server..i have only control panel permission .because i have not dedicated server .i have only small web space and control panel permission....


what's the right method to configure my application in this situation
[)ia6l0 iii replied to prateek on 03-Feb-12 12:38 PM
I hope you meant vb.net and not vb. Or did you mean vb script?

If you meant vb.net and c#, which I did about a good number of years ago, then you can do this via the app_code folder.
Create subfolders - one for c# and another for vb.net. Place respective classes in the folders. 

And then ensure that you configure these folders in the web.config's codesubdirectories node.

<configuration>
   <system.web>
      <compilation>
         <codeSubDirectories>
           <add directoryName="dirThatContainsVB"/>
           <add directoryName="dirThatContainsCsharp"/>
         </codeSubDirectories>
      </compilation>
   </system.web>
</configuration>


Web.config rules apply as before.