my application was worked fine but suddenly it is stop working and give this error [InvalidOperationException: Stack empty.] System.ThrowHelper.ThrowInvalidOperationExcep
I had the same problem, but its fixed now. Firstly I disabled PageInspector.
After that I got another error which was related to ResolveUrl method, I removed method and fixed the problem and voila! its working perfectly. Finally, I enabled PageInspector by removing previous settings and still it works.