I have an ASP.NET Web Application running at http://www.mydomain.com. We want to set up http://company.mydomain.com and point it to a subfolder of the ASP.NET application. When we do this, we get errors that it cannot find data types, presumably because it cannot locate the /bin folder one level higher.

Is there a setting I need to change to allow this? Thanks!


ASP.NET really doesn't like to work this way. Best bet would be to setup some url rewriting or a redirect to push traffic coming into subdomain.example.com to example.com/whereyouwantthemtogo .

If you have IIS7, you could also setup URL rewriting to let urls look the way you want and not fight ASP.NET, but I suspect the app will have alot of pathing problems with this approach -- it will have trouble figuring out if it is in a sub-uri or not and not map paths to static resource correctly.

One other option, if the code in the folder is not part of the ASP.NET application, would be to make the folders siblings (ie, /web/www and /web/subdomain) and then point both a virtual directory and virtual site there.


There used to be a setting to allow this, but Microsoft removed it as it was a gaping security hole. In your case, you'll want to consider creating a virtual-directory under the sub-folder that points to the higher-level /bin folder. That way accesses to company.mydomain.com/bin will actually hit the right code.

If www.mydomain.com is rooted in F:\Inetpub\wwwroot, the subfolder is F:\Inetpub\wwwroot\subdom, with the bin folder at F:\Inetpub\wwwroot\bin, You'll want to create a virtual-directory in the company.mydomain.com site that points to F:\Inetpub\wwwroot\bin.

  • Have you used this approach before/is it proven? We just tried it and it didn't seem to work, so I'd like to check the validity before digging into it too much. – Mike Cole Mar 2 '11 at 14:58
  • @MikeC It's used for uploading the actual files, but there is still some IIS-Manager work needed to make the files into an application that'll execute. – sysadmin1138 Mar 2 '11 at 15:20
  • Hmmm, and advice for getting it to work? F:\Inetpub\wwwroot\subdom is set as an application in IIS. We added the virtual bin to F:\Inetpub\wwwroot\subdom, but did not configure that as an application. What else is needed? – Mike Cole Mar 2 '11 at 15:25

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.