Posted on: 5/25/2014 10:14:38 AM | Views : 386

Hello,
We noticing stackoverflowexceptions occuring on one of our sites and I was asked to try and find out what was causing it. This is a legacy web app and the dev who wrote no longer works for the company.
Reading a little of stackoverflowexceptions they seem to be at method level and caused by recursion. 
I reworked some code i Googled that uses mono.cecil which thankfully detected any instances of recursion in the assemblies of the site. In total it found 4 instances.
One of which was this in an ascx control
public String LinkId { get { if (ViewState["LinkId"] != null) { return ViewState["LinkId"].ToString(); } this.LinkId = System.Guid.NewGuid().ToString(); return this.LinkId; } set { ViewState["LinkId"] = ...

Go to the complete details ...