Exception if two person access the same page at the same time


Author
Message
ChanKK
ChanKK
Advanced StrataFrame User (622 reputation)Advanced StrataFrame User (622 reputation)Advanced StrataFrame User (622 reputation)Advanced StrataFrame User (622 reputation)Advanced StrataFrame User (622 reputation)Advanced StrataFrame User (622 reputation)Advanced StrataFrame User (622 reputation)Advanced StrataFrame User (622 reputation)Advanced StrataFrame User (622 reputation)
Group: Forum Members
Posts: 190, Visits: 1.3K
Hi,

I hit the error below if two person access the same page at the same time. Even though I have replaced the latest Business.dll (this time confirmed is replaced) Please advice. Thank you



Server Error in '/FlexHR' Application.



--------------------------------------------------------------------------------



Object reference not set to an instance of an object.

Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.



Exception Details: System.NullReferenceException: Object reference not set to an instance of an object.



Source Error:





Line 184: protected override void OnPreRender(EventArgs e)

Line 185: {

Line 186: base.OnPreRender(e);

Line 187:

Line 188: this.ErrorIcon = "../images/ErrorIcon.png";







Source File: C:\FlexHR\Trunk\Mainline\Generic\UI\Web\Strataframe\Forms\BasePage.cs Line: 186



Stack Trace:





[NullReferenceException: Object reference not set to an instance of an object.]

System.Collections.Generic.Dictionary`2.Insert(TKey key, TValue value, Boolean add) +143

System.Collections.Generic.Dictionary`2.Add(TKey key, TValue value) +11

MicroFour.StrataFrame.Business.TypePropertyCache.GetPropertyInfo(Type OwnerType, String PropertyName) +259

MicroFour.StrataFrame.Business.TypePropertyCache.GetPropertyInfo(Object Owner, String PropertyName) +22

MicroFour.StrataFrame.Business.BusinessLayer.BindDataToWebControl(IWebBusinessBindable ControlToBind, IWebBinding Binding) +196

MicroFour.StrataFrame.Business.BusinessLayer.BindDataToWebControlPrimary(IWebBusinessBindable ControlToBind) +62

MicroFour.StrataFrame.UI.Web.BasePage.BindControls() +150



[UIException: An error occurred while binding data to the web control 'lblDocRef'.]

MicroFour.StrataFrame.UI.Web.BasePage.BindControls() +570

MicroFour.StrataFrame.UI.Web.BasePage.Page_PreRender(Object sender, EventArgs e) +7

System.Web.UI.Control.OnPreRender(EventArgs e) +8679510

Vfs.Generic.UI.Web.Strataframe.Forms.BasePage.OnPreRender(EventArgs e) in C:\FlexHR\Trunk\Mainline\Generic\UI\Web\Strataframe\Forms\BasePage.cs:186

System.Web.UI.Control.PreRenderRecursiveInternal() +80

System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +842





--------------------------------------------------------------------------------



Version Information: Microsoft .NET Framework Version:2.0.50727.3053; ASP.NET Version:2.0.50727.3053




Replies
ChanKK
ChanKK
Advanced StrataFrame User (622 reputation)Advanced StrataFrame User (622 reputation)Advanced StrataFrame User (622 reputation)Advanced StrataFrame User (622 reputation)Advanced StrataFrame User (622 reputation)Advanced StrataFrame User (622 reputation)Advanced StrataFrame User (622 reputation)Advanced StrataFrame User (622 reputation)Advanced StrataFrame User (622 reputation)
Group: Forum Members
Posts: 190, Visits: 1.3K
Hi,



Trent L. Taylor (03/30/2009)
Well, this doesn't really make any sense on the two user thing. In IIS each session is going to create new instances. The ONLY thing that I could see is if you have something that is shared that you are attempting to bind to which could cause an error like this. Also, based on your exception, I assume that you have your own base page and are inheriting the SF BasePage. If this is the case, the OnPreRender that you are overriding isn't that of our BasePage, but rather that of the .NET Page class (which is what the BasePage inherits from).



I only have this code in OnPreRender().



protected override void OnPreRender(EventArgs e)

{

base.OnPreRender(e);



this.ErrorIcon = "../images/ErrorIcon.png";

}






[quote]If you can provide a reproducable sample then that would make it MUCH easier. But based on the details that you have given and looking at the SF source, I cannot see where your point of failure is.




I tried to create small project, but unable to reproduce. Crazy



On a final thought here, it is extremely rare to have a "multi-user" type of issue when dealing with web applicaitons unless there is something specific within your application or a shared (static) method, property, or class that they are all referencing that is not taking this into account.




As you can see the code as above, and also the callstack during exception, we doesn't have any complex code. Also, we really can reproduce it by 2 person access same page at the same time using our application (Click at the same time). If we run it one after one, and just half second delay, the error will not occurred. I am preparing my application and db, but it is huge. It takes time. Hope you can find out something.



Thank you. Crying
Trent Taylor
Trent Taylor
StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)
Group: StrataFrame Developers
Posts: 6.6K, Visits: 7K
This is the first time that I have ever heard of anything like this.  And we have a number of SF users with large web applications....so I really feel confident that this is either in the configuration of IIS, permissions, or something within your code.  But without the ability to reproduce (small scale preferred) it is going to be impossible to give a straight answer.

Also, I don't think that sending me your entire application is the answer here.  This would require a lot of investigative work and trying to dissimenate your entire applicaiton which is not something that I am prepared to do at this point.  If it happens large scale then you should be able to make it happen small scale as well.  Also, if you can't reproduce until you get it into a production environment, that should be a clue as well.

GO

Merge Selected

Merge into selected topic...



Merge into merge target...



Merge into a specific topic ID...




Threaded View
Threaded View
ChanKK - 16 Years Ago
Trent L. Taylor - 16 Years Ago
ChanKK - 16 Years Ago
Trent L. Taylor - 16 Years Ago
ChanKK - 16 Years Ago
ChanKK - 16 Years Ago
Trent L. Taylor - 16 Years Ago
ChanKK - 16 Years Ago
ChanKK - 16 Years Ago
                         I've wrapped most of those that needed it in a SyncLock. Several of...
StrataFrame Team - 16 Years Ago
                             Hi,
May I know when would it available for download?
...
ChanKK - 16 Years Ago
                                 We will do another build tomorrow morning.
Trent L. Taylor - 16 Years Ago
                                     I will send you a link to a custom build to test this this afternoon....
Trent L. Taylor - 16 Years Ago

Similar Topics

Reading This Topic

Login

Explore
Messages
Mentions
Search