basic overview…
i have a site setup in iis…
– “mysite” (wwwroot\mysite) under that there are 2 virtual directory applications
– “uploads” (\uploadfiles)
– “app” (wwwroot\myapp)
I also have a subdomain that is set up as a different site in iis…
– “beta.mysite” (wwwroot\mysitebeta) under that there are 2 virtual directory
– “uploads” (\uploadfiles)
– “app” (wwwroot\myappbeta)
the sub domain is working fine…. i can type in https://beta.mysite.com/app … and it brings up the beta site log in perfectly fine…. the problem is, when i click on any of the buttons that create a post back… it reverts to https://www.mysite.com/app…
all of the links display the correct relative path to their files…. and if i type in https://beta.mysite.com/app/dir/page.aspx… it will actually go to that page on the beta site, all the links are going to the right spots… its just the postbacks that are killing me…
Have you tried setting a different application pool for these two websites? Looks like it’s trying to be “smart” and concludes that the two virtual directories are actually the same website.
If all else fails, you could rewrite the postback URL in the FORM-tag that ASP.NET generates manually. Using an App_Browsers file and a ControlAdapter are probably the cleanest way of doing that.
I have an example of such a ControlAdapter implementation, though it is intended to work with URL rewriting to prevent reverting to the actual behind-the-scenes URL on postback. However, I think it would work for your problem out-of-the-box
Form.browser file: