I have an intermittent problem where whatever view I set as my starting view, for my MVC3 project, in VS 2010, I get extremely long long load times. I'm now looking at over 2 minutes without anything happening except the browser waiting. I am working with a local DB on my dev machine, and the build time for the project is quick. If I stop to debug in VS, none of my code is running.
When I stop debugging in VS, which takes very long as well, then I finally get a 404 in the browser. What could be causing this, and what measures can I take to diagnose and resolve this issue?
I am using the VS built-in web server, not IIS, and VS 2010 Pro, so no IntelliTrace options.
NEW: When I tried a machine restart, my machine seemed to hang up on the 'logging off' message. I tried the restart because I experienced problems even accessing my C:\Development folder, also unexplained hanging. After the restart, on trying to run the project again, I immediately got a compilation error. That error was there from before the restart, and I suspect it had something to do with the total meltdown, but it's a simple misspelled property name in a view.
After fixing the compilation error, things are back to normal.
Try turning off IntelliTrace
Related
I'm building a .net core react app. When starting the application in debug mode, I have no problems the first time I run, but if I stop debugging and attempt to run again, visual studio will stop debugging on its own as the web page is loading.
If I restart my computer, I can debug again, but if I stop and start, I experience the same issue. Restarting Visual Studio works occasionally, but it seems like I need to close out all instances of it, wait a few seconds, relaunch, wait for a few seconds after everything finishes loading, and then it will work (again, only once).
I'm assuming there's a process that isn't shutting down properly and is blocking the debugger from fully starting but I can't seem to find it. I am also running visual studio as Admin. Any help would be appreciated.
Ok so it's not a complete answer but I found what seems to be causing the issue. When the debug would fail, the URL briefly changed, showing that chrome was attempting to use the legacy browser support extension. After a bit of googling I learned that this could be caused by enabling "Javascript Debugging for ASP.NET" under Tools>Options>Debugging>General. Disabling this checkbox allows me to run debug without any issues.
Since I don't really care about the javascript debugging, this is a suitable enough answer for me, but if anyone else sees this and knows the answer that would keep javascript debugging enabled, please provide the details in case anyone needs it in the future.
I have a very strange problem I'm fighting with since VS 2015 (maybe even 2013).
Now I'm working with VS 2017 and it still occurs.
Here is the situation.
I have a legacy web application (Webforms, later enhanced by integrating webapi REST with javascript/html client code, some WCF endpoints, etc).
I build and start debug session from within VS (I do debug/testing mostly with Chrome and FF, rarely with IE/Edge/etc.), and I use IIS Express.
Most of the time the application debug session starts just fine - the page loads in browser and I can either debug server side in VS / client side in browser's debug tools.
But sometimes, the page actually never completes loading, and no matter how long I wait, it just stays locked on "loading..." message.
The only solutions I found are:
- either restart PC
- or (in Chrome), start browser in new identity.
- switch to a different browser (e.g. after starting with Chrome, open page in FF - or vice-versa).
When the page loads normally, the VS's Output Debug window displays various tracing / debug messages or progress of loading various dlls.
However, as soon as the problem described above starts to happen, the VS Output Debug starts to log msgs like
The thread <#nnnn> has exited with code 0 (0x0).
When this starts to happen, no matter what I do (except starting browser in new identity / change browser / restarting PC) I can no longer debug.
No matter if I totally close and restart the browser, clear cache, close and restart VS / IIS. Nothing helps.
The situation mentioned above occurs at very random intervals.
Sometimes I can work and debug for days (I suspend / hibernate the PC at the end of the day, resume next days, end everything works ok).
However other times the issue occur after just starting few debug sessions, and on occasions, even after a full shutdown / restart, at very first debug session, this happens.
I have lived with it for long time, but sometimes is very annoying.
Anyone have experienced a similar issue?
Any idea what is causing it, and is there is any fix / workaround?
Thank you
The messages in your output log reporting:
The thread <#nnnn> has exited with code 0 (0x0)
Just indicates that the thread has exited safely and is very normal to see this in correctly working code. In fact it would be abnormal to not see this as you will end up using all available threads.
From what you have explained I would suggest that you need to look at the extensions you have installed in your browsers. I typically will use a vanilla profile (blank profile with no modifications / extensions) so that my debugging is not affected by any modifications the extensions can make.
I would also monitor your system's CPU and memory usage. Are either of these being maxed out?
It stops responding after a few seconds of being idle. I have to restart it every time this happens.
I have tried putting startMode="AlwaysRunning" into my applicationHost config, but nothing changed.
The output of the console is just a bunch of
The thread X has exited with code 0 (0x0).
I don't think this is related to idleTimeOut either, because the website completely stops responding; it just hangs.
applicationHost if anyone is interested (too large to post here):
http://pastebin.com/quVMXPHP
Let me know if you need further information.
Are you sure it's from being idle? By default, every time you stop debugging, IIS Express unloads the website, and quits entirely if there's no other websites running. You can disable this by unchecking Enable Edit and Continue in the project properties under the "Web" tab.
If it happens more randomly, then IIS Express may actually be crashing. Check in the notification area of the taskbar for IIS Express, make sure it's there, and (by right-clicking) ensure your web project is still loaded (in the list). If it's actually crashing, you most likely have a memory leak, infinite loop, or something similar going on somewhere in your application that's overloading the process. There's no much we can do to help you with that, without being able to examine your entire codebase. You'll just have to trace and profile until you find it.
I have an application that runs perfectly fine locally using the VS 2010 application server, however, when I deploy to our web app machine startup just spins and spins and never loads. We have other apps on this same machine that load just fine (this is a debug deployment of same app in product).
I have been spinning my wheels on this for days and I am at a loss as the problem could be.
Here is what I did
Create a new directory (same level as other apps)
Copied over our existing test (www.domain/test/) and it works fine
Build and publish new debug app (www.domain/test/) and it just spins trying to load first form.
I know the diretory is "working" as the 'test' application I put there works fine.
If it's killing the App pool, you might get something in the event log. Fiddler (www.fiddlertool.com) is great http debug tool which let you see if you're in a redirect loop. Also Firefox shows a more meaningful error, something about exceeding the max redirect count.
It does sound like something is looping, but not quick enough to cause a stack overflow, which is odd, because you'd expect it to fail every time.
Simon
Do you have the ability to remote desktop into the machine? If so try running process explorer and look at the process details for the worker process that is giving you issues. Definitely look at the TCP connections being created. If your processor is pegged at 100%, and memory usage is rising then you probably have an endless loop running.
It sounds like it's more related to IIS than ASP.NET. What about the identity that the website is running under? Is it possible that the user the site's running under a bad user, or maybe the password needs to be re-entered?
I did a quick Bing search
There are a lot of postings regarding the error message you described above. Most if not all point to code in your app that is crashing. I know I had a similar problem when I used an automated/threaded daemon utility in my web application. Make sure your code is not bringing down the server, sometimes the VS2010 web server is a little more foregiving than an actual IIS deployment.
If that doesn't work try running a Remote Debugging Session to try and catch any errors being thrown but not handled.
Lastly you could try to setup a new local IIS server to see if you have the same problems. Scott Gu has a nice article about using IIS Express to do this.
I have an puzzling problem. I have a new ASP.NET web application in VS2005 that runs fairly well, but I am having a problem and would like to set a break point to see what is going on. I have compiled the project in Debug mode. I have debug=true set in the web.config. But it appears that the IDE is not attaching to the process at all. Have I overlooked something? I am using the development server and not IIS. This has never been a problem in the past, but is this time.
Have I overlooked anything? Thanks for any help.
Rob
I had this issue a while back with VS2005. I don't remember where I got the following instructions from (copied them to a file which I'm now copying to you) but doing the following steps worked for me. It has something to do with IE8 attaching itself to multiple processes and messing up the debugger. Word of warning, this has you editing the registry, so use at your own risk / take all your normal precautions, etc.
Open RegEdit
Go to HKEY_LOCALMACHINE -> SOFTWARE -> Microsoft -> Internet
Explorer -> Main
Add a dword under this key called TabProcGrowth
Set TabProcGrowth to 0
If you run into the same problem on
Vista or newer, you will also need to
turn off protected mode.
Please note also that I was/am running XP at the time, so I did not have to use the "Vista or newer" clause there. No idea if that has any adverse effects either.
Sorry if I am stating the obvious, but you need to Start Debugging <F5> rather than just running the executable after compiling. Are you doing this?
If you don't hit the breakpoint, you are either not debugging (F5) or your code isn't reached at all. If you want to know which of the two is happening you can throw an exception right at the code where your breakpoint is. If your application is failing at the exception, you know you are not running it with the debugger. If it doesn't fail at the exception you are simply not reaching that piece of code and you will have to look harder for which code you are actually running.
throw new Exception("if I see this exception, I am not running the debugger");
Or maybe you are running two instances of the development server. I've had that sometimes. Look in the Windows system tray for the icon. If you see two (or more) you can right click to stop them and restart debugging.