System.InvalidOperationException: Stack empty System.InvalidOperationException: Stack empty asp.net asp.net

System.InvalidOperationException: Stack empty


I disabled browser link in VS 2013 and was able to see the actual cause of the error. It is usually something underlying when browser link is set. You can see how to disable it here: http://www.poconosystems.com/software-development/how-to-disable-browser-link-in-visual-studio-2013/


This can happen if the AssociatedControlID on a label is associated with a control which can't be found.


There are multiple reasons why the

System.Web.HttpUnhandledException (0x80004005): Exception of type 'System.Web.HttpUnhandledException' was thrown. -System.InvalidOperationException: Stack empty.Microsoft.VisualStudio.Web.PageInspector.Runtime.WebForms.SelectionMappingRenderTraceListener.EndRendering(TextWriter writer, Object renderedObject)...

After adding as proposed:

 <appSettings>   <add key="PageInspector:ServerCodeMappingSupport" value="Disabled"/>   ... </appSettings>

I noticed I had duplicate selected item on a dropdown list creating the issue.