Stackoverflow exception in VS 2015 but not in VS2010 how?

北城以北 提交于 2020-01-01 09:14:26

问题


There is a webservice project written in VS2010 few years ago and the problem is all code exactly same (same PC , Tested with vs2010 and 2015 with the same code) but in vs2015 it gives error on debug mode. Options > "Projects & Solutions" settings are all same. I took this error and definition of it;

An unhandled exception of type 'System.StackOverflowException' occurred in System.Runtime.Serialization.dll

System.StackOverflowException was unhandled Message: An unhandled exception of type 'System.StackOverflowException' occurred in mscorlib.dll

Anyone have idea about it , I'm really glad to attention. I could't share code because it's nearly 30.000 lines.


回答1:


SOLVED

Add this to the appSettings in your web.config:

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

After VS 2013, by default VS automatically enables Browser Link. The StackOverflowException occurs, but doesn't include any details of what happened. You can check this link for more information about the browser link feature in VS 2013: https://blogs.msdn.microsoft.com/webdev/2013/06/28/browser-link-feature-in-visual-studio-preview-2013/




回答2:


You got this error, what you gonna do ....

Your project stops and not working, but that is usually not about your code.

Of course, that depends how you coding but if you didn’t write any infinite loop than its completely fine.

It’s about Visual Studio 2013, it tries to send long serialized data to browser because of “enable browser link” option.

You can fix this issue by two ways..

Add this in appSettings in your web.config

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

Or

You can disable following option in tool menu



来源:https://stackoverflow.com/questions/38742862/stackoverflow-exception-in-vs-2015-but-not-in-vs2010-how

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!