Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 246873
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 11, 20262026-05-11T21:12:32+00:00 2026-05-11T21:12:32+00:00

basic overview… i have a site setup in iis… – mysite (wwwroot\mysite) under that

  • 0

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…

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-11T21:12:32+00:00Added an answer on May 11, 2026 at 9:12 pm

    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

    public class FormRewriterControlAdapter : System.Web.UI.Adapters.ControlAdapter 
    {
        protected override void Render(HtmlTextWriter writer)
        {
            base.Render(new RewriteFormHtmlTextWriter(writer));
        }
    }
    
    public class RewriteFormHtmlTextWriter : HtmlTextWriter
    {
        private const string contextItemKey = "FormActionWritten";
    
        public RewriteFormHtmlTextWriter(HtmlTextWriter writer) : base(writer)
        {
            InnerWriter = writer.InnerWriter;
        }
    
        public RewriteFormHtmlTextWriter(System.IO.TextWriter writer) : base(writer)
        {
            base.InnerWriter = writer;
        }
    
        public override void WriteAttribute(string name, string value, bool fEncode)
        {
            // If the attribute we are writing is the "action" attribute, and we are not on a sub-control, 
            // then replace the value to write with the raw URL of the request - which ensures that we'll
            // preserve the PathInfo value on postback scenarios
    
            if (name == "action" && !HttpContext.Current.Items.Contains(contextItemKey))
            {
                // Use the Request.RawUrl property to retrieve the un-rewritten URL
                value = HttpContext.Current.Request.RawUrl;
                HttpContext.Current.Items[contextItemKey] = true;
            }
    
            base.WriteAttribute(name, value, fEncode);
        }
    }
    

    Form.browser file:

    <browsers>
        <browser refID="Default">
            <controlAdapters>
                <adapter controlType="System.Web.UI.HtmlControls.HtmlForm" adapterType="FormRewriterControlAdapter" />
            </controlAdapters>
        </browser>
    </browsers>
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Ask A Question

Stats

  • Questions 158k
  • Answers 158k
  • Best Answers 0
  • User 1
  • Popular
  • Answers
  • Editorial Team

    How to approach applying for a job at a company ...

    • 7 Answers
  • Editorial Team

    How to handle personal stress caused by utterly incompetent and ...

    • 5 Answers
  • Editorial Team

    What is a programmer’s life like?

    • 5 Answers
  • Editorial Team
    Editorial Team added an answer Have you tried repairing the Visual Studio installation? Pops-in the… May 12, 2026 at 11:17 am
  • Editorial Team
    Editorial Team added an answer int *foo; float *bar; // c++ style: foo = reinterpret_cast<… May 12, 2026 at 11:17 am
  • Editorial Team
    Editorial Team added an answer Presumably when the Ajax is done you are using: location.href… May 12, 2026 at 11:17 am

Related Questions

basic overview... i have a site setup in iis... - mysite (wwwroot\mysite) under that
I've got a simple Visual Basic 2008 Express Edition form which looks like this:
Can somebody point me to a resource that explains how to go about having
I am developing an application that can be extended using plug-ins. The plug-ins will
I'm looking for a good IDE for C++ that has most or all of

Trending Tags

analytics british company computer developers django employee employer english facebook french google interview javascript language life php programmer programs salary

Top Members

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.