Getting HTTP 302, Object moved error loading an aspx page in an iFrame

Answered Getting HTTP 302, Object moved error loading an aspx page in an iFrame

  • Saturday, September 01, 2012 11:48 AM
     
     

    In our web based app, we load an aspx page which in turn loads an html page in an iFrame, which in turn attempts to load an aspx page in an iFrame.  Don't ask why.  It's been a part of our product for 7 years and has always worked until we started development of our next version.  We haven't changed anything about this part of the product, but now when the html page attempts to load the aspx page in the iFrame we get a HTTP 302 and the following response:

    <html><head><title>Object moved</title></head><body>
    <h2>Object moved to <a href="/Client/Navigators/Default.aspx">here</a>.</h2>
    </body></html>

    The html in the initial aspx page is:

    <body bgcolor="#ffffff" onload="javascript:pageLoad();" topmargin="0" bottommargin="0"
     leftmargin="0" rightmargin="0">
     <form id="ReviewPage" method="post" runat="server">
      <iframe id="frameQuestion" src="ReviewFrame.htm" scrolling="no" runat="server" height="100%"
       width="100%" frameborder="no" marginheight="0" marginwidth="0"></iframe>
     </form>
    </body>

    The html in the html page is:

    <html>
     <head>
      <meta name="GENERATOR" content="Microsoft Visual Studio 7.0">
      <title></title>
      <script language="javascript">
       var bEnableContext = false;
       document.onkeydown = function(){ if ( event.keyCode == 89 ){ bEnableContext = true; } }
       document.onkeyup = function(){ bEnableContext = false; }
       document.oncontextmenu = function(){ if ( bEnableContext == false ){ return false } else { bEnableContext = false } };
      </script>
     </head>
     <table cellpadding="0" cellspacing="0" width="100%" height="100%" border="0">
      <tr>
       <td height="100%" id="tdQuestion" name="tdQuestion">
        <iframe title="Questions" frameborder="no" frameborder="0" height="100%" width="100%" scrolling="auto"
         marginheight="0" marginwidth="0" id="frameQuestion" name="frameQuestion" src="" class="styledscrollbar"></iframe>
       </td>
      </tr>
     </table>
     <iframe title="AnswerBuilder" frameborder="no" height="100%" width="100%" scrolling="auto"
      marginheight="0" marginwidth="0" id="answers" name="answers" target="answers" src="question.aspx"
      style="display:none"></iframe>
    </html>

    The loading of "question.aspx" in the iFrame "AnswerBuilder" is what's failing.

    We are developing using VS 2010, .Net 4.0 and running the web site on IIS 7, SSL.

    We've also tried adding the following to the Web.Config:

      <location path="Client/Navigators/Question.aspx">
        <system.web>
          <authorization>
            <allow users="*" />
          </authorization>
        </system.web>
      </location>

    We still get the error.

    I've searched the web for help on this and nothing I've seen appears to be a similar issue.

All Replies