2

I created new Project, new Website, in Sitefinity Project Manager, opened it in Visual Studio, started debugging. As no pages were created before it offers to log in to the backend. But when I'm clicking login instead of login form it gave me InvalidOperationException: Stack empty exception

[InvalidOperationException: Stack empty.]
   System.ThrowHelper.ThrowInvalidOperationException(ExceptionResource resource) +52
   System.Collections.Generic.Stack`1.Pop() +6667365
   Microsoft.VisualStudio.Web.PageInspector.Runtime.WebForms.SelectionMappingRenderTraceListener.EndRendering(TextWriter writer, Object renderedObject) +152
   System.Web.UI.RenderTraceListenerList.EndRendering(TextWriter writer, Object renderedObject) +58
   System.Web.UI.Control.RenderControlInternal(HtmlTextWriter writer, ControlAdapter adapter) +142
   System.Web.UI.Control.RenderControl(HtmlTextWriter writer, ControlAdapter adapter) +100
   System.Web.UI.Control.RenderControl(HtmlTextWriter writer) +25
   System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +1386

If before I was able successfully login to the backend when ran project from Sitefinity Project Manager, after I opened the project in the Visual Studio it give me the error again and again even I'm trying to run it from the Project Manager. The only way to log in to the backend is to close the project in Visual Studio.

paramosh
  • 2,258
  • 1
  • 15
  • 23

1 Answers1

4

It seems the error is the same like described here: InvalidOperationException: Stack empty

And two options to fix it. Set in Web.config either

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

or

  <appSettings>
    <add key="vs:EnableBrowserLink" value="false"/>    
  </appSettings>

both worked for me.

Similar issue with the same solutions also was described here http://www.sitefinity.com/developer-network/knowledge-base/details/create-product-value-cannot-be-null-exception-when-the-project-is-included-into-an-empty-solution-in-visual-studio-2013 but error there was "Value cannot be null".

Community
  • 1
  • 1
paramosh
  • 2,258
  • 1
  • 15
  • 23
  • I found another solution trying to solve a very similar problem. It could be related: https://stackoverflow.com/questions/20406497/system-invalidoperationexception-stack-empty/45888866#45888866 – Rolo Aug 28 '17 at 21:10