Login

Username

Password





Register   Reset password

This is a read-only archive of the forum.

# Muttok 5/25/2007 2:30 AM
Hi all,

I got some issues with some of my custom modules.
All my modules use a common singelton class that communicate with a win service (.net remoting) that acually perform the actions. (like user registration, account details, balance etc)

The problem is that sometimes my modules get loaded 2x times, and causing extra load on our win service. This is not a performance issue now, but it isn't really good to load everything double up.

My modules are just plain modules based on the developer doc and display some data from the common class.

Any ideas?
# swilliam 5/25/2007 3:22 AM
Hi

I can't offer any advice about a cause, but a workaround for this occurrence in ASP.NET applications I set a flag somewhere that checks whether a method/event handler/whatever has already been called and only runs it if hasn't been run before. It doesn't find the cause, necessarily, but it does fix the symptoms until you can find the real cause. The module could be a good place to put the flag.

Many thanks

Simon
# Muttok 5/25/2007 7:16 AM
Found the bug and problem is gone :)
    #region Web Form Designer generated code
    override protected void OnInit(EventArgs e)
    {
        InitializeCompoent();
        base.OnInit(e);
    }
    private void InitializeCompoent()
    {
        this.Load += new System.EventHandler(this.Page_Load);
    }

    #endregion

Not sure why I had that code, but I think it was generated some place atleast :P