Help with Global.asax

Last post 06-15-2006, 5:34 AM by Plasteam. 4 replies.
Sort Posts: Previous Next
  •  06-12-2006, 7:36 AM 20020

    Help with Global.asax

    Hello, I want to intergrate cutechat with IbuySpy portal (http://www.expertteammaker.com), however within the integration document it says that I have to replace the Global.asax file, the problem is, my original portal has already used the global.asax file, so I can't replace it, and the instruction didn't say anything about how to change that file. I have upload my Global.asax files here Global.asax and Global.asax.cs. anyone could help me with that, cheers!
  •  06-12-2006, 11:25 AM 20025 in reply to 20020

    Re: Help with Global.asax

    Plasteam,
     
    Please download this global.asax from:
     
     
    All you need to do is copying this Global.asax to your project and overwrite the exisitng file.
     
     

    asp.net Chat http://cutesoft.net/ASP.NET+Chat/default.aspx
    Web Messenger: http://cutesoft.net/Web-Messenger/default.aspx
    asp.net wysiwyg editor: http://cutesoft.net/ASP.NET+WYSIWYG+Editor/default.aspx
    asp wysiwyg html editor: http://cutesoft.net/ASP
    asp.net Image Gallery: http://cutesoft.net/ASP.NET+Image+Gallery/default.aspx
    Live Support: http://cutesoft.net/live-support/default.aspx

  •  06-13-2006, 10:29 AM 20067 in reply to 20025

    Re: Help with Global.asax

    Cheers Adam, I have overide the global.asax using the file you gave me and I have followed the instruction to integrate cute chat with IBuySpy portal(C#), however I got an error page linked here error page, so how should I do with it? Thank you!
  •  06-13-2006, 1:11 PM 20073 in reply to 20067

    Re: Help with Global.asax

  •  06-15-2006, 5:34 AM 20179 in reply to 20073

    Re: Help with Global.asax

    Hi Adam:
     
    Thank you for your help!
     
    This is my signin.ascx.cs file:
     
    using System;
    using System.Collections;
    using System.Configuration;
    using System.ComponentModel;
    using System.Data;
    using System.Drawing;
    using System.Web;
    using System.Web.UI;
    using System.Web.UI.WebControls;
    using System.Web.UI.HtmlControls;
    using System.Web.Security;
    using ASPNetPortal;
    using System.Web.Mail;
     
    namespace Syntegra.Manufacturing.WMCCM.Web.UI.DesktopModules {
        public abstract class Signin : ASPNetPortal.PortalModuleControl {
            protected System.Web.UI.WebControls.TextBox email;
            protected System.Web.UI.WebControls.TextBox password;

            protected System.Web.UI.WebControls.ImageButton SigninBtn;
            protected System.Web.UI.WebControls.ImageButton RegisterBtn;
            protected System.Web.UI.WebControls.Literal responseLiteral;
            protected System.Web.UI.WebControls.LinkButton EmailPassword;
            protected System.Web.UI.WebControls.CheckBox RememberCheckbox;
            protected Syntegra.Manufacturing.Wmccm.Web.UI.CustomControls.Label EmailLabel;
            protected Syntegra.Manufacturing.Wmccm.Web.UI.CustomControls.Label PasswordLabel;
            protected System.Web.UI.WebControls.Label Message;
     
     private void LoginBtn_Click(Object sender, ImageClickEventArgs e)  
      {
       // extract the details

       string strEmail = email.Text.Trim().ToLower();
       string strPassword = password.Text.Trim();

       // Attempt to Validate User Credentials using UsersDB
       UsersDB accountSystem = new UsersDB();
       String userId = accountSystem.Login(strEmail, strPassword);
       if ((userId != null) && (userId != ""))
       {
        // initialize the authentication
        FormsAuthentication.Initialize();
        // Log User Off from Cookie Authentication System
        FormsAuthentication.SignOut();
         
        // Invalidate roles token
        Response.Cookies["portalroles"].Value = null;
        Response.Cookies["portalroles"].Expires = new System.DateTime(1999, 10, 12);
        Response.Cookies["portalroles"].Path = "/";
        // destroy the session thing!!
        Session["UserAccessControl"] = null;
        // Use security system to set the UserID within a client-side Cookie
        FormsAuthentication.SetAuthCookie(strEmail, false);
        // Redirect browser back to originating page
        string url = Request.ApplicationPath;
        if (Session["LogonReturnToPage"] != null)
        {
         url = (string) Session["LogonReturnToPage"];
         Session["LogonReturnToPage"] = null;
        }
        Response.Redirect(url);
       }
       else
       {
        Message.Text = "<" + "br" + ">Login Failed!" + "<" + "br" + ">";
        responseLiteral.Text = "<script language=javascript>alert('Login Failed!');</script>";
       }
      }
     
     
     
     
     
     
     
     
     
     
     
     
     
     
     
     
     
     
     
     
     
     
     
     
     
     
     
     
     
     
     
     
     
     
     
     
     
     
     
     
     
     
     
     
     
     
     
     
     
     
     
     
     
     
     
     
     
     
     
     
     
     
     
     
     
     
     
     
     
     
    So to process two lines highlighted in yellow, I have to use the three lines highlighted by blue, and how should I do with these?
     
    I have uploaded the signin.ascx.cs file here, could you give me some ideas? cheers!
     
View as RSS news feed in XML