System.InvalidOperationException: Stack empty

前端 未结 11 1924
情深已故
情深已故 2020-12-09 03:09

Once running ASP.NET 4.x application built in Visual Studio 2013 I am getting the below exception.

I have tried to disable the PageInspector by removing page inspect

相关标签:
11条回答
  • 2020-12-09 03:36

    That Happend to me when I added a new <asp:Panel> to my page and set the DefaultButton to a button outside the panel (By mistake). Error fixed when I changed the DefaultButton to another one inside the panel.

    0 讨论(0)
  • 2020-12-09 03:40

    We started VisualStudio 2015 (vs2015) from VisualStudio 2012 solution file and while building all the projects didnot build. This was due to the Enable Browser Link option enabled by default. I disabled the Enable Browser Link option and Re-built the solution which built all the projects successfully. After this I fired up the url in a browser and Boom it worked! For those who have similar scenario like mine. give it a whirl !

    0 讨论(0)
  • 2020-12-09 03:41

    I've also seen this problem in some web apps running on dev machines using Visual Studio 2013 with "Browser Link" enabled.

    In multiple cases that I have seen, leaving Browser Link enabled causes all sorts of issues, both client script and security warnings, and server exceptions like this one (annoying thing is that it appears to be enabled by default, thanks Msft!)

    0 讨论(0)
  • 2020-12-09 03:43

    I have found the problem. There was changed way how to generate IDs of controls in GridView from default to

    ClientIDMode="Predictable" ClientIDRowSuffix="ID"
    

    Which resulted in the exception. Not sure why the real exception was hidden by PageInspector stack empty. Just reverting the change to original resolved the issue.

    Now the exception is different (but once GridView settings is back to original this disapper too)

    System.ArgumentException: An entry with the same key already exists.
    
    0 讨论(0)
  • 2020-12-09 03:45

    Hope this help somebody.

    I was getting this error when my asp:panel has a default button say XYZ and I modified the name XYZ and forgot to change default button name in panel.

    0 讨论(0)
提交回复
热议问题