Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>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.</p> <p>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.</p> <p>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</p> <pre><code>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" &amp;&amp; !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); } } </code></pre> <p><strong>Form.browser</strong> file:</p> <pre><code>&lt;browsers&gt; &lt;browser refID="Default"&gt; &lt;controlAdapters&gt; &lt;adapter controlType="System.Web.UI.HtmlControls.HtmlForm" adapterType="FormRewriterControlAdapter" /&gt; &lt;/controlAdapters&gt; &lt;/browser&gt; &lt;/browsers&gt; </code></pre>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload