I have been constantly bugged by this, sometimes this causes my entire PC to freeze up and lag, I don't really know what its doing in the background. I normally don't close Visual Studio as it takes a good bit of time to compile and load the solution. So I leave it running until I have to work in code. see the screenshots below.
I don't have any window open for Visual Studio other than the main screen and it is connected to our TFS/ Azure DevOps server yet every few minutes I would see the process spike up to 30% and it will cause a lag to everything I am doing e.g. working in a Word document or sending an email.
Task Manager
I am not using any extensions other than SQL Server Integration Services, Reporting services and Wix Toolset rest of them I've disabled
I am debugging an ASP.NET MVC app from Visual Studio 2013. When I start the debug process from Visual Studio, IIS Express where app is hosted gets stuck (my app is not started). It often happens to me. In this situation, I manually stop IIS Express from the tray icon. Even stopping IIS Express from the tray icon I often need to stop manually the debugging from Visual Studio through the stop button. Once debugging is stopped, If I try to debug again it does not work, well, sometimes works and sometimes not, it is random. I have verified that if I clear all browser history and cookies, it works in most cases except for some time. Also I have observed that Visual Studio 2013 takes a long time to boot IIS Express where my ASP.NET MVC app is hosted. Finally, I have observed that my ASP.NET MVC app hosted in IIS Express sometimes is not being displayed correctly when debugging from Visual Studio, I mean, it is displayed without css styles being applied, it seems like css styles are missed. In this case, if I stop debugging and start it again it works.
So How can I improve or solve these kind of weird issues?
IIS Express gets stuck and css styles sometimes not being applied when
debugging an ASP.NET MVC application from Visual Studio 2013
This is a quite strange issue and l suggest you could try these suggestions
Suggestion
1) delete all caches under C:\Users\Administrator\AppData\Local\Microsoft\VisualStudio\12.0\ComponentModelCache, C:\Users\Administrator\AppData\Local\Temp and C:\Users\Administrator\AppData\Local\Microsoft\WebsiteCache.
2) close VS Instance, delete .vs hidden folder,bin,obj folder under the physcial path of the solution and then reopen your project
3) If you have IntelliTrace, please disable Enable IntelliTrace under Tools-->Options-->IntelliTrace-->General.
4) try another port like 56000 by right-clicking on the project-->Properties-->Web--> project url.
5) disable any third party extensions by Tools-->Extensions and Updates or just use devenv /safemode in developer command prompt for vs2013.
6) try to reinstall IIS on the control panel and if your IIS is not 10.0, I suggest you could download and use it.
In addition, VS2013 is too old and Microsoft does not continue to maintain it. So l suggest you could download and use the latest VS2019. It has more optimization and stronger performance than the previous VS and fixes some remaining issues from previous releases.
Currently I'm playing a little bit with MVC application. But there is one thing that is very annoying. When I change something in my code (controller, view or whatever) the changes sometimes does not refresh. I see the old content. And there is more. Sometimes browser says "Waiting for localhost..." and it's waiting forever. When this happens the only thing that helps is to stop IIS and restart Visual Studio. What seems to be the problem? How can I make this work and see my changes every time I build and refresh the page? (Ctrl+F5 does not work)
I'm using Visual Studio 2015, IIS Express and Firefox (but this also happens on IE).
Updating visual studio 2015 helped.
I'm working with an ASP.NET solution in Visual Studio 2013 that fails to hit breakpoints. Visual Studio will successfully hit breakpoints on other solutions, and the breakpoints in this solution previously worked. But at this time they fail to work.
I'm using Visual Studio 2013 Ultimate, Update 4. This is installed on Windows 8.1, 64-bit.
This is an MVC solution that contains 3 projects: BusinessEntities, DataAccessLayer (DAL), and a Web project. Breakpoints in all of these projects fail to work. I even tried a breakpoint inside the Index ActionResult for the home controller, and that still failed to stop at the breakpoint.
In the Visual Studio ribbon, solution configuration is set to Debug. Additionally, Configuration Manager shows that all 3 of my projects have a configuration set to Debug. Restarting IIS, restarting Visual Studio, and rebooting did not fix this problem. Selecting Build > Clean Solution, Build > Rebuild, and then Debug > Start Debugging did not fix it either.
In web.config, debug is set to true in this node:
<system.web>
<compilation debug="true" targetFramework="4.0" />
There are .pdb files in the bin directories of my projects. I verified that they are getting deleted when the solution is cleaned, and recreated when it's rebuilt.
What else do I need to check? I really need to get the breakpoints working in this solution. Thanks.
========
Updates on 12/30/2014 - Below are several things that I tried, following comments from #paul.abbott.wa.us. Several comments I made are deleted and just appended here for clarity.
========
I'm starting the app via VS, and running it under IIS. The version of IIS is 8.5. When exposing the process name (via System.Diagnostics.Process.GetCurrentProcess().ProcessName), it's w3wp.
In IIS, the web application has a site name like "local.mysite", and there is a matching entry in my hosts file. The site uses the DefaultAppPool, which employs the .NET CLR version 4.0 and the Integrated Managed Pipeline Mode. The 3 applications in my solution target .NET Framework 4.
If I switch this back to IIS Express, the debugger starts working. The version of IIS changes to 8.0, and the process name is of course iisexpress. Technically I don't have to run this under IIS on my workstation, but I would prefer to do so. What have I misconfigured or overlooked in IIS that could account for the debugger failing?
Reviewing the project server settings on the Web tab of the properties page, I noticed the dropdown was set to "IIS Express". Upon toggling that to "Local IIS", I was prompted to run VS as Administrator. After doing that, I was able to alter the server to Local IIS, and hit the debugger. I checked in the change, closed VS, launched VS not running as Admin, and loaded the solution. The web project failed to load with the following message: The Web Application Project [MySiteName] is configured to use IIS. Unable to access the IIS metabase. You do not have sufficient privilege to access IIS web sites on your machine.
Eventually some sections of this site will employ Active Directory authentication. So, is the solution that I need to either run the site under IIS Express, or always run VS as Administrator if I wish to run the site under IIS? Thanks.
I found a solution to get past the error message of “The Web Application Project [MyApp] is configured to use IIS. Unable to access the IIS Metabase. You do not have sufficient privilege to access IIS web sites on your machine.” Follow the steps at this post. Error - Unable to access the IIS metabase
After granting my account access to the intetsrv\config folder, the web project properly loaded in Visual Studio without running VS as an administrator.
But now when I launch the site another alert appears: “Unable to start debugging on the web server. IIS does not list a web site that matches the launched URL. Click Help for more information.” Initially I just clicked “Create Virtual Directory” and launched again, but that same alert reappeared.
So I selected the Help button from the alert. That leads to this MSDN page, which proposes about 2 dozen things to check, with about half as many links to other articles. I'm feeling a bit like Alice in Wonderland right now, heading further down the rabbit hole.
2/3/2015 Update: My workaround while running this on the local IIS instance was to run Visual Studio as an Admin. Ultimately, we changed the app to use IIS Express, then later abandoned the app for another solution that a coworker built. That decision had nothing to do with this problem. Thanks everyone for your feedback and ideas.
3/7/2016 Update: At this time I'm unable to replicate this issue, as we no longer have the solution in the state where it was when I worked on it last year. I would be grateful if a moderator could close this question. The options for closing this don't align with my current scenario, but perhaps someone else will find the suggestions below useful if they encounter this scenario. Thank you to everyone who contributed a suggestion.
Make sure that:
Tools -> Options Debugger "Enable Just My Code" is unchecked
You are running the application in the Debug mode, not Release mode
Solution build is up to date.
I met this problem before and solved it after I rebuild the solution package.(right click solution package and run rebuild)
Here is a list of ideas I keep for such an occasion.
Check where your dll is being referenced from and ensure that is the code you're trying to debug.
Check you are in the correct mode when building: Debug/Release as they may put the dlls in different places.
Are you attached to the correct process?
For a website on IIS, is the code you're working on the same as the code running in IIS?
Go to Debug > Windows > Modules and if the relevant dll is there, right click it and load symbols.
If it's not in the list, try running the code anyway. Sometimes even though it says the breakpoint will not be hit, it's only because the dll is not loaded until you enter a scenario that needs it. Try the scenario that depends on the dll, and it may just hit the breakpoint anyway.
Restart your browser. You might have something cached from an older dll.
From my previous experience please consider these :
Check you have put the break point in a right place and you are running the appropriate page or controller
Right-Click on the break point => Location => Check "Allow Source Code to be different from the original version". If you have installed resharper , It's probably help.
If you are calling through Ajax call , Make sure you have not java-script error on the page ( for this IE catch js errors by default)
Some times it's because of not building thoroughly , So cleaning the
solution ( right-click on the solution and choose "clean solution"
item ) then "Rebuild Solution" .
Some times it's because you may have disabled the build option for
some class libraries , So in this situation you need to rebuild those
class-libraries exclusively . (you can find it out by check choosing
"Configuration Manager" item from the "Build" menu)
Hope these help
ASP.NET MVC, Visual Studio 2010, C#/.NET4. I'm using IIS Express as the web server of choice, as it more accurately mirrors our production configurations in IIS7. However, when I go through following process, the libraries used by IIS Express don't seem to be updating.
Run app, find bug
Stop VS2010, fix bug
Build/Run
Testing reveals the new code is not being used
IIS Express continues to run even after stopping the debugger in VS2010, so I'm assuming it's just holding onto the binaries that were used when it was initially launched. Is there a way to get it to use the updated binaries? Or is this the expected behavior? Right now, the only way I can get the new binaries used is to completely exit VS2010 and then reload the project/solution. Even selecting "stop" from the IISExpress systray icon doesn't seem to actually help (it doesn't appear to actually stop the process).
Obviously closing VS2010 and reloading the solution each time is a less-than-ideal workflow.
EDIT: The project is configured to run IIS Express from right click project -> Web. The project URL does not use any virtual directories, it is at root of the local host on port 60830. I thought I remembered seeing IIS Express in the F4 properties listing before, it's not listed there at all right now.