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 isF:\Inetpub\wwwroot\subdom
, with the bin folder atF:\Inetpub\wwwroot\bin
, You'll want to create a virtual-directory in the company.mydomain.com site that points toF:\Inetpub\wwwroot\bin
.