简体   繁体   中英

browser errors (firefox) Asp.net webforms

Firefox gives me error

     XML Parsing Error: no root element found

Location: http://localhost:1126/5cebf834d54b41f1b944492c2bf2c852/arterySignalR/send?transport=longPolling&connectionToken=AQAAANCMnd8BFdERjHoAwE%2FCl%2BsBAAAASoOM%2FXZ%2B1UWqyQ%2FYXO2FqQAAAAACAAAAAAAQZgAAAAEAACAAAAAUFu%2Fjd8uVno2WCgoC%2BqL%2FTyk4%2F9G0tGOhVKr4EpHnIwAAAAAOgAAAAAIAACAAAACfousertSIl6j8HdDRfemeNPHDjgXABbFasP4BpsaBRjAAAADqZuISuyN4C6Z1BUb4BSojyAs0sj5vyMKuBZrkMzPz6r4vFC13EdNhT0%2BqeNlqyfpAAAAAs2SeXXAfiPKVMcCDkZ%2B3%2Fnii%2BKaLZxyKMLgriAsGDqANLiRjEVgu6ErSX%2F1ZCiiuOW02QGy5aZWT5E4Vm8IMqQ%3D%3D&requestUrl=http%3A%2F%2Flocalhost%3A4055%2FPages%2FSignIn.aspx&browserName=Firefox Line Number 1, Column 1:

I double checked all tags starts and ends with no help :( any suggestions??

edit: Here is my sample code

<%@ Page Title="" Language="C#" MasterPageFile="~/Pages/gateMasterPage.Master" AutoEventWireup="true" CodeBehind="SignIn.aspx.cs" Inherits="Gate.SignIn" %>

<div class="login" id="loginDiv">
    <style scoped="scoped" >
        @import "../css/custom.min.css";
    </style>

  <a class="hiddenanchor" id="signup"></a>
  <a class="hiddenanchor" id="signin"></a>

  <div class="login_wrapper">
    <div class="animate form login_form">
      <section class="login_content">
          <form runat="server" id="signinForm">
              <asp:ScriptManager ID="ScriptManager1" runat="server"
                  EnablePageMethods="True">
              </asp:ScriptManager>
              <h1>تسجيل الدخول</h1>
              <div>
                  <input type="text" class="form-control" placeholder="إسم المستخدم" name="nameTXTBOX" id="usernameTXT" required="required" dir="rtl" />
              </div>
              <div>
                  <input type="password" class="form-control" placeholder="كلمة المرور" name="passTXTBOX" id="passTXT" required="required" dir="rtl" />
              </div>
              <div>
                  <%--<asp:Button  class="btn btn-default submit" text="دخول" runat="server"></asp:Button>--%>
                  <a class="btn btn-default submit" id="signIn">دخول</a>
                  <a class="reset_pass" href="#">فقدت كلمة المرور؟</a>
              </div>

              <div class="clearfix"></div>

              <div class="separator">
                  <p class="change_link">
                      جديد بالموقع؟
              <a href="#signup" class="to_register">إنشاء حساب جديد </a>
                  </p></div>
          </form>
      </section>
    </div>

    <div id="register" class="animate form registration_form">
      <section class="login_content">
        <form id="signupForm" class="col-md-offset-4 form-group ">
          <h1>إنشاء حساب</h1>
          <div>
            <input type="text" class="form-control" placeholder="اسم المستخدم" required="" dir="rtl" />
          </div>
          <div>
            <input type="email" class="form-control" placeholder="البريد الالكتروني" required="" dir="rtl" />
          </div>
          <div>
            <input type="password" class="form-control" placeholder="كلمة المرور" required="" dir="rtl"/>
          </div>
          <div>
            <a class="btn btn-default submit" href="index.html">انشاء الحساب</a>
          </div>

          <div class="clearfix"></div>

          <div class="separator">
            <p class="change_link">مسجل بالفعل
              <a href="#signin" class="to_register"> تسجيل الدخول </a>
            </p>
              </div>

        </form>
      </section>
    </div>
  </div>
</div>

$(function () {

      $("#signIn").click(function () {

          var name = $("#usernameTXT").val();
          var pass = $("#passTXT").val();
          console.log(name + ":" + pass);
          PageMethods.login_btn_click(name, pass, onSucceed, onError);


      });

      function onSucceed(res) {

          console.log(res);
          //$("#loginDiv").load("Profile.aspx?id=" + res);
          console.log('success');
          window.location.href = "Profile.aspx?id=" + res;
          alert(res);
      }
      function onError(err) {
          alert('fail');
          console.log("login_btn_click PageMethod Throw Error" + err);
      }
  });//End of OnLoad

Is There is any way to regenerate page, if there is any missing tag end that i couldn't notice?

your XMl need to well form, all xml document must have one root element for example

<persons>
   <person Id=1>
      <name>Smith</name>
   </person>
   <person Id=2>
      <name>Jack</name>
   </person>
</persons>

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM