Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
Question
Wednesday, October 30, 2013 5:48 PM
In Visual Studio, if I go Debug > start debugging or Debug > Start without debugging, the browser appears after a few seconds, but then is sits there with the connecting message for about 30 secs before the page loads (i.e. to http://localhost:51350/).
I have created a brand new empty MVC4 internet application to check it is not breakpoints or something.
It is the same on Firefox and Internet Explorer.
Subsequent clicks on the links on the browser page (or pressing F5 in the browser) are very fast - it is just the initial load after compliation that is slow.
The only uncomented line in my hosts file is: 127.0.0.1 localhost
If I load webpages with Apache it is very quick (of course I have apache switched off when I'm running the VS tests).
I have applied all updates to Visual Studio.
I'm on Visual Studio 2012, Windows 7 64-bit, 8GB RAM
All replies (16)
Wednesday, October 30, 2013 7:48 PM
It looks like IIS Express is being slow to start up. Have you tried using IIS as the web server instead of IIS Express? There are pros and cons listed at Web Servers in Visual Studio for ASP.NET Web Projects.
HTH,
Andrew
Wednesday, October 30, 2013 9:19 PM
Hi, thanks for the reply.
I dont think I can run IIS as I'm on Windows 7 Home Premium. Accordning to your link...
"You are developing ASP.NET web pages while working with a Home Edition of Windows, which does not support IIS."
Any ideas why IIS Express would run so slow? And ways I can debug it?
Wednesday, October 30, 2013 9:35 PM
Any ideas why IIS Express would run so slow? And ways I can debug it?
You could do a search for "iis express slow startup", e.g. http://stackoverflow.com/questions/12567984/visual-studio-debugging-loading-very-slow.
Windows 7 Home Premium... if you're doing commercial web sites, you might want to upgrade to Professional so that you can use IIS.
Do you shut down IIS Express between runs? Is the slow startup associated with a lot of disk drive activity - you could use it as an excuse to upgrade to an SSD ;) (if you don't have one already).
--
Andrew
Wednesday, October 30, 2013 9:45 PM
Andrew, I have done many many searches. And found many answers - none of which have worked. In my question you can see the list of things I have tried. The link you provide is for debugging but as you can see from my question it is slow even when not debugging. Or have I missed something? Thanks for the suggestion of upgrading but I would need to be certain that this really would solve the issue.
Wednesday, October 30, 2013 10:05 PM
Thanks for the suggestion of upgrading but I would need to be certain that this really would solve the issue.
But but... new! shiny! No, seriously, I realise that the cost of upgrading, especially when there is no certainty of an improvement, is not necessarily a viable option.
Have you found out what is taking the time up? In Task Manager (ctrl+shift+esc) you can get to Resource Monitor under the performance tab and see if anything stands out.
--
Andrew
Wednesday, October 30, 2013 10:56 PM
Thanks for the suggestion. AVG seemed to be the only thing that was doing much apart from IIS. I disabled AVG and it now justt takes 15 secs rather than 30 secs. Still far too slow but a big improvement.
Any ideas what I can try now?
Thursday, October 31, 2013 4:37 AM
I dont think I can run IIS as I'm on Windows 7 Home Premium. Accordning to your link...
"You are developing ASP.NET web pages while working with a Home Edition of Windows, which does not support IIS."
That is referring to Windows XP, look at the table just above that line and you'll see that Windows 7 Home Premium includes IIS 7.5. Follow the instructions on this link to install IIS: http://technet.microsoft.com/en-us/library/cc731911.aspx
Thursday, October 31, 2013 2:54 PM
Thanks, I got IIS running. Runs at much the same speed though. I also tried the Visual Studio development server - same speed again. Disabling AVG, I am down to 15 secs for my actual project and 10 secs for a blank MVC4 internet project. I take it is not to be this slow? I have a quad processor with 8GB RAM and the CPU and memory get a windows performance score of 7.1.
Thursday, October 31, 2013 4:48 PM
That's the ASP.NET startup time, it ain't that bad. Mine takes about 5 to 7 secs. on a dual core Pentium with 4GB. The RAM shouldn't make a difference unless you're using most of it as your app can only use 2GB and doesn't really use nearly as much. Also I believe ASP.NET will only use one core during startup so you need to look at the speed of each core and the load of other processes.
Thursday, October 31, 2013 6:58 PM | 1 vote
Thanks for the suggestion. AVG seemed to be the only thing that was doing much apart from IIS. I disabled AVG and it now justt takes 15 secs rather than 30 secs. Still far too slow but a big improvement.
Now you've got IIS working (I didn't know that W7 Home Premium has it too), rather than disabling AVG completely, you could exclude the directory "C:\Windows\Microsoft.NET\Framework" from its scanning. That directory contains the IIS temporary files directories, or you might want to be a bit more precise about which directories you exclude - just drill down and you'll find ones named "Temporary ASP.NET Files" for each version of the framework.
--
Andrew
Thursday, October 31, 2013 7:46 PM
Thanks Fernan82.Net, I take it the 5 - 7secs is for your project and not just an empty template?
If you have a slower machine than me I dont see how it runs slower for me. On my work mate's machine in launches in the blink of an eye (though that is on as iCore 7 right enough). What is your windows performance score?
Thursday, October 31, 2013 7:50 PM | 1 vote
Thanks Andrew, I think I just replace it with somethign else (the avg component that was the culprit, kept going event though I shut down avg - I had to uninstall the whole thing).
Monday, November 4, 2013 7:21 AM
Hi,
You can use Process Monitor: http://technet.microsoft.com/en-us/sysinternals/bb896645.aspx to check whether something other affects ASP.NET application running. If some other processes such as any third-party process are running when you run the MVC app, please close them to check the result.
I agree with Fernan82.Net, the time may be the ASP.NET startup time. In addition, I think that the time may be also related to the machine performance such as the disk space. On my side, the C disk’s space is full, when I run an empty MVC Internet app, it will take much time such as 15 to load the page.
You can try to restart your machine, close some busy processes in Task Manager, repair your VS and then run the app to check the result.
If no help, maybe you can post your issue on Visual Studio and Visual Web Developer Express to check whether other facts will affect the page load during MVC application running.
Best regards,
We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
Click HERE to participate the survey.
Monday, April 28, 2014 10:47 PM
VS 2013 debugging with IE11 was painfully slow for me also. Deleted the .suo file and this fixed the issue. Good luck.
Friday, May 9, 2014 8:29 PM
VS 2013 debugging with IE11 was painfully slow for me also. Deleted the .suo file and this fixed the issue. Good luck.
Perfect!!!!
Friday, August 8, 2014 1:38 PM | 1 vote
hey guys - i HAVE finnaly found the solution.
after months of testing i found the the secret for the fast iis express solution.
project proerties => Web (on the left pane) => under the "debuggers" check only the "asp.net" and "native" leave other check box unmarked and hit CRTL+S.
restart your project - the first time it will work abit for about 5 seconds but afterwords every thing will run fast and smooth.
i know it disables the ability to edit while in debug but hey ... it worth it.
have fun
amit