Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Ismail Mayat 4511 posts 10092 karma points MVP 2x admin c-trib
    Apr 21, 2010 @ 11:38
    Ismail Mayat
    0

    global asax can i get rid for v4

    Hello,

    More a question for the core team,  in umbraco 4.0.3 and 4.1 not concerned with v5 there is in global asax

          protected void Session_Start(Object sender, EventArgs e)
            {
                if(GlobalSettings.EnableStat)
                {
                    try
                    {
                        new Session();
                    }
                    catch(Exception state)
                    {
                        Log.Add(LogTypes.Error, BusinessLogic.User.GetUser(0), -1, "Error initializing stat: " + state);
                    }
                }
            }

     

    that is doing what likes look legacy code that is related to the old umbraco stats?  My question is i have client who is doing stuff with castle windsor and i want to remove the dll App_global.asax.dll.  I know v5 mvc is definately making use of global asax for all the yummy Nhibernate and castle windsor stuff but not concerned with that as v5 will be completely new beast.

    Regards

     

    Ismail

  • Aaron Powell 1708 posts 3046 karma points c-trib
    Apr 22, 2010 @ 00:42
    Aaron Powell
    0

    You can just inherit from umbraco.Global, but it should be safe to remove the assembly.

  • Ismail Mayat 4511 posts 10092 karma points MVP 2x admin c-trib
    Apr 22, 2010 @ 10:34
    Ismail Mayat
    0

    slace,

    Take it something like

    protected new void Session_Start(object sender, EventArgs e){
    base.Session_Start(sender,e)
    //do your thang here!!!
    }
    

    Regards

     

    Ismail

  • Ismail Mayat 4511 posts 10092 karma points MVP 2x admin c-trib
    Apr 22, 2010 @ 11:00
    Ismail Mayat
    0

    Slace,

    I tried the following:

        public class GlobalTest:umbraco.Global
        {
            protected new void Session_Start(object sender, EventArgs e)
            {
                base.Session_Start(sender,e);
                Log.Add(LogTypes.Error, new User(0), -1, "init from session my global");
    
            }
    
    
        }

    It did'nt work, tried setting break point it never gets to that method any ideas?

    Regards

     

    Ismail

  • Ismail Mayat 4511 posts 10092 karma points MVP 2x admin c-trib
    Apr 29, 2010 @ 16:52
    Ismail Mayat
    0

    this has been updated to core for 4.1 see ticket http://umbraco.codeplex.com/WorkItem/View.aspx?WorkItemId=26843

    Ismail

  • Alec Griffiths 129 posts 151 karma points
    Jul 15, 2010 @ 13:38
    Alec Griffiths
    0

    I just discovered the logging of stats was removed recently (after we did some upgrades, yes we missed it in testing) and find it quite annoying there this was not make clearer for the release. Whilst we did not use the stats package we did use the tables and the logs for some registered user tracking functionality (that no longer works!). Yes we can build/find another solution and we know it is not recommended to do things outside of the Umb API’s but it looks to me like a impacting change has been made on the whim of this post and who’s implications where not thought through or adequately communicated.

    If this was made clear somewhere then I apologies and accept any karma adjustment you feel necessary but please point me to where it was communicated so I may discipline a member of my team.

  • Aaron Powell 1708 posts 3046 karma points c-trib
    Jul 16, 2010 @ 00:49
    Aaron Powell
    0

    The stats never did anything, it was from the stats module that was canned at v3 as that code was just floating around and hadn't been deleted yet.

  • Alec Griffiths 129 posts 151 karma points
    Jul 16, 2010 @ 17:02
    Alec Griffiths
    0

    Well our upgrade was from v3 - 4. As mentioned we where not using the package only the tables doing the logging. No worries, for now will build something else..

Please Sign in or register to post replies

Write your reply to:

Draft