User-1616316942 posted
Hi everyone, I have an asp.net page that gets loaded inside a customer's website. It loads fine the first time, but when the customer clicks a button, it crashes with the "object reference not set to an instance of an object"
error. The log shows that the error occurred in the this.Master line (see below):
protected override void OnInit(EventArgs e)
{
_master = (CustomMasterPage)this.Master; //this is the line where exception occurs
//...some other code
}
What I know so far:
- I can't reproduce the error in neither DEV nor QA environments.
- I can't reproduce the problem when the inner page is executed on its own, outside of the client's page.
- Our prod servers are load-balanced, but it shouldn't be a session issue, right? Even if I was suddenly served a brand new instance of Session, "this" still would not be null as it gets created by Asp.Net as part of request/response. All the custom values
would disappear, yes, but "this" should still exist, right?
So, I'm looking for ideas explaining why 'this' would suddenly become null in the described scenario, thanks!