All DirectEvents Is Error?

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #1

    All DirectEvents Is Error?

    I met a strange question.
    All of the Development environment is correct, after publishing to IIS and found that all the errors of all the Ajax way and All DirectEvents and return is: Status Code: 200

    But also through the firebug difference lies in that: the right to return is a Json request string, and returns the error turned out to be the whole page source code.

    Someone can help me,Thanks!


    <%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Default.aspx.cs" Inherits="Web._Default" %>
    
    <%@ Register Assembly="Ext.Net" Namespace="Ext.Net" TagPrefix="ext" %>
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml">
    <head runat="server">
        <title></title>
    </head>
    <body>
        <form id="form1" runat="server">
        <ext:ResourceManager ID="ResourceManager1" runat="server" CleanResourceUrl="false" />
        <ext:Window ID="Window1" runat="server" Width="300" Title="Login" Icon="ApplicationHome"
            AutoHeight="true" Closable="false" Padding="5" Layout="Form" LabelWidth="65"
            LabelAlign="Right">
            <Items>
                <ext:TextField ID="txtLoginName" runat="server" FieldLabel="UserName" Width="170" TabIndex="1">
                </ext:TextField>
                <ext:TextField ID="txtPassword" runat="server" FieldLabel="Password" InputType="Password"
                    Width="170" TabIndex="2">
                </ext:TextField>
            </Items>
            <Buttons>
                <ext:Button ID="btnLogin" runat="server" Text="Login">
                    <DirectEvents>
                        <Click OnEvent="btnLogin_Click"></Click>
                    </DirectEvents>
                </ext:Button>
            </Buttons>
        </ext:Window>
        </form>
    </body>
    </html>
    public partial class _Default : System.Web.UI.Page
        {
            protected void Page_Load(object sender, EventArgs e)
            {
                if (!Page.IsPostBack)
                {
                }
            }
    
            protected void btnLogin_Click(object sender, EventArgs e)
            {
                string strUrl = string.Empty;
                try
                {
                    TbUserEntity entity = new UserService().Login(txtLoginName.Text.Trim());
                    if (entity != null && entity.PassWord.Equals(StringHelper.PasswordMD5(txtPassword.Text.Trim())))
                    {
                        FormsAuthenticationTicket Ticket = null;
                        Ticket = new FormsAuthenticationTicket(1, entity.LoginName, DateTime.Now, DateTime.Now.AddHours(2), false, JSON.Serialize(entity), FormsAuthentication.FormsCookiePath);
                        string HashTicket = FormsAuthentication.Encrypt(Ticket);
                        HttpCookie UserCookie = new HttpCookie(FormsAuthentication.FormsCookieName, HashTicket);
                        UserCookie.HttpOnly = true;
                        UserCookie.Path = FormsAuthentication.FormsCookiePath;
                        UserCookie.Expires = Ticket.Expiration;
    
                        Response.Cookies.Add(UserCookie);
    
                        if (Request["ReturnUrl"] != null)
                        {
                            strUrl = Context.Request["ReturnUrl"];
                        }
                        else
                        {
                            strUrl = "Main.aspx";
                        }
                    }
                    else
                    {
                        X.Msg.Alert("Error", "Faile!").Show();
                    }
                }
                catch (Exception ex)
                {
                    LogHelper.ErrorLog.Error("Error", ex);
                }
                if (strUrl != string.Empty)
                {
                    Response.Redirect(strUrl);
                }
            }
        }
    Attached Thumbnails Click image for larger version. 

Name:	error.jpg 
Views:	239 
Size:	21.7 KB 
ID:	2826   Click image for larger version. 

Name:	error1.jpg 
Views:	271 
Size:	15.7 KB 
ID:	2827   Click image for larger version. 

Name:	return.jpg 
Views:	261 
Size:	72.5 KB 
ID:	2828  
    Last edited by nanlinfeixue; Jun 07, 2011 at 8:12 AM.

Similar Threads

  1. [CLOSED] GridPanel DirectEvents - FileUploadField error
    By Aurelio in forum 2.x Legacy Premium Help
    Replies: 5
    Last Post: Mar 16, 2012, 12:52 PM
  2. Replies: 4
    Last Post: Sep 26, 2011, 2:59 PM
  3. Concurrent DirectEvents
    By thedarklord in forum 1.x Help
    Replies: 1
    Last Post: Apr 15, 2011, 8:39 AM
  4. DirectEvents are not available at all for any control
    By lordofthexings in forum 1.x Help
    Replies: 3
    Last Post: May 19, 2010, 4:47 PM
  5. GRIDPANEL ROWEDITOR DIRECTEVENTS ERROR
    By PoloTheMonk in forum 1.x Help
    Replies: 1
    Last Post: Dec 16, 2009, 9:14 AM

Posting Permissions