Visual Studio unable to start debugging - visual-studio-2010

Every time I build my solution and try to start debugging, I get this message:
Unable to start debugging on the web server. The web server did not respond on a timely manner. This maybe another debugger is attached to the web server.
If I restart my IIS, I can start debugging but If I build again I have to restart my IIS again. I saw several people having same issue but no one same as mine exactly.

Open your cmd in administrator mode and run cmd
iisreset

The below link contain some useful answers:
Unable to start debugging on the web server. Could not start ASP.NET debugging VS 2010, II7, Win 7 x64
Like this answer:
1)
Try going to IIS and checking to make sure the App Pool you are using
is started. A lot of times, you will produce an error that shuts down
the app pool. You just need to right click and Start and you should be
good to go.
2) And this answer
Turns out that the culprit was the IIS Url Rewrite module. I had
defined a rule that redirected calls to Default.aspx (which was set as
the start page of the web site) to the root of the site so that I
could have a canonical home URL. However, apparently VS had a problem
with this and got confused. This problem did not happen when I was
using Helicon ISAPI_Rewrite so it didn't even occur to me to check.
I ended up creating a whole new web site from scratch and porting
projects/files over little by little into my solution and rebuilding
my web.config until I found this out! Well, at least now I have a
slightly cleaner site using .NET 4.0 (so far, hopefully I won't run
into any walls)--but what a pain!

Related

Basic regarding W3wP.exe - IIS 8

Sorry if it looks so simple.
Am trying to find when W3wp.exe will show up in the process list. Am using Windows 2012 beta with IIS 8. I have web and wcf applications deployed in it. And i tried to browse the pages locally. But am not seeing process.
Please let me know if am missing something.
Thanks
Finally it worked. But i dono the exact root cause earlier
restarted the machine
Opened VS With Admin Previlages
i was able to see the process listed
Adding up -- For W3wp.exe to appear in the process list instance shuold be running already !
make sure to check
Show all processes in all sessions

Visual Studio 2010 Debug Server Not Recognizing My Changes

Using Visual Studio 2010 on Window 7 64bit. I'm trying to test a website project (not a web application project) using the built in dev server (cassini). The problem I'm having is that when I make a change, I now have to actually stop debugging, kill cassini, and restart before I can actually see my changes in the browser. I used to be able to edit and refresh. One of my fellow developers here is able to do this just fine with an identical setup (same project/vs version/os - and settings near as I can tell). I'm beginning to suspect some sort of permissions issue. I've been all over google trying to find an answer to no avail. Any ideas?
As it turns out, this was my fault... I had experienced the dreaded "network BIOS command limit has been reached" issue. I found a post that recommended doing a regedit hack "HKLM\Software\Microsoft\ASP.NET\FCNMode = 1", well this basically turns off File Change Notifications. Changing this value to 2, and applying the changes recommended in knowledge base 810886 fixed both problems.

ASP.NET websites under IIS 7.5 (Windows 7) running extremely slow

I've just installed Windows 7 x64 Ultimate on my desktop PC. I installed IIS, Visual Studio 2008, registered ASP.NET, etc.
I have this ASP.NET 3.5 website I'm working on running EXTREMELY slow on this new IIS. On STA and PROD servers (Windows 2003 Server) and on my old XP/IIS 5.1 everything runs smoothly.
A page which usually takes 1-2 seconds to load is taking 8 seconds!!!
I saw this post on IIS forum. It says something about Vista/7 not pooling connections (just to let you know, the website is running locally but it's connecting to a SQL Server 2005 hosted on a remote server).
It seems that it takes a while to "start loading" the page... I mean, I click refresh and it stays for several seconds "Waiting for localhost"... Then when it gets response it loads the whole page normally...
I don't have a clue how to force Win7/IIS7.5 to pool database connections.
EDIT: I've created a new empty ASP.NET web application to see if the problems happens too. The answer is no, it responds fast as it should with an empty default page. Maybe is something related to the DB connection. I will do a further test. It should be a way to fix it...
EDIT 2: Debugging the app I noticed that the delay occurs AFTER the execution of .NET code (Page_Load, etc)... so the delay seems to be somewhere when IIS serves the page to the browser.
For those having the same problem, here's two possible solution.
1) Disabling IPv6 support in Firefox (only for Firefox)
Most of the authors that I found out about suggest this approach as quickest and cleanest solution. What you need to do is basically to open configuration settings in Firefox (about:config) and to change network.dns.disableIPv6 setting to true.
2) Change localhost settings in your hosts file (all browsers)
This came to me as an idea to check where and how can I interfere in IPv6 settings on my machine. I saw one of the comments on above mentioned sources saying that one can get rid of the problem by simply replacing localhost with machine name in the url.
It didn’t take me long to check and see that disabling my IPv6 localhost lookup does the same thing as disabling IPv6 directly in Firefox.
What you need to do is basically to comment / delete this particular line in your hosts file:
#::1 localhost
Note: ::1 notation is IPv6 equivalent of the IPv4 127.0.0.1 lookup address.
I believe the second solution might be more suitable for users who do not want to disable IPv6 in general, and the first one for all others that still do not use IPv6 in their regular work.
I was having the same issue: extremely dead slow site performance using IIS 7.5 on Windows 7 64-bit with a Core 2 Duo with 4GB RAM and 3 Application Pool Processes running only 1 website. Here's what I did to get the speed back to IIS, problem solved...
The trick for me was to run IIS using 32-bit workers, as instructed by Microsoft on IIS.net, which you can read here:
http://learn.iis.net/page.aspx/201/32-bit-mode-worker-processes/
Simple solution provided (I don't want to rewrite it here)... Either you can run a 1-line command from the Windows Command Prompt or a 1-line command from Windows PowerShell. I just ran it from the command line (make sure you open Command Line or PowerShell as Administrator -- right-click > Run as Administrator).
Thanks,
Marty McGee
You can try running multiple processes as application pools:
Open IIS
Click Application Pools
Right click the app pool for your app
and click Advanced Settings
Find the
"Maximum Worker Processes" and update
it to 3 (or the number of processes
you want to allow to run).
I know the op was running IIS 7.5 and this may not apply to him, but I'm posting this as it might help others running IIS Express 8.0. I had the same problem and none of the IPv6 or hosts file changes worked for me. My asp.net MVC4 project was really slow after hitting F5 to refresh js changes on localhost. It was happening across all browsers - Chrome, FF, and IE. Eventually I discovered that IIS Express 8.0 is extremely slow when serving up js files and seems to be a bug. If I ran iisexpress on the command line and hit F5 I could see each js file took 4 or 5 seconds to load.
I ended up uninstalling IIS 8.0 and installing IIS express 7.5 and straight away the problem was fixed. Here are the steps I followed:
Uninstall IIS express 8.0
Delete the IISExpress folder (on Win 7 it's in My Documents\IISExpress)
Install IIS express 7.5 (Link to IIS Express 7.5 download)
IIS Express 8.0 seems to be installed with VS 2012 so if you had a new install or possibly a service pack update this might upgrade the previous IIS Express version.

ASP.NET Webapplication unavailable on Live Environment - How to troubleshoot

I have a asp.net 3.5 web application which is deployed on server 2003 and IIS 6. After running fine for a few weeks it goes "Down" and by down I mean that when I try and access it the browser looks like it's loading but never actually serves the page. After an IIS reset it loads quickly again.
My question is what are the steps and tools I should use in tracking the root cause?
First point of interest would be the event viewer, second the iis logs. If you still do not find the error then performance counters could help you out there.

Classic ASP super newbie question

OK, So I have recently moved into the world of Web development after spending quite a few years coding in a pretty simple proprietary language, and one of my first jobs is to tweak an old classic ASP page for one of our clients.
I'm using Visual Studio 2008 to try debug some problems I am having, but the page won't load at all. If I browse the site locally using IIS, then everything works without any trouble at all, so I am not sure what I am doing wrong.
Here's the error message I get;
Compiler Error Message: BC30451: Name 'VariableName' is not declared.
The way this is setup, is that file1.asp has an include for file2.asp
<!-- #include file=./includes/file2.asp -->
Then file2.asp has a form post for file3.asp
<FORM METHOD="POST" ACTION="/includes/file3.asp">
Inside file3.asp is where the variable is created.
So, when running this site via IIS, everything works, the variables look to be passed between files without any trouble, but when I try to debug the site using VS2008, I get the BC30451 error code.
Can anyone right my ship? I've been doing a lot of googling and reading of other websites that seem to deal with this issue, but a lot of it is going over my head.
If anyone could please take the time to explain what & why this is happening, as well as providing some kind of solution, or pointing me in the direction of somewhere that may be able to help, it would be more than greatly appreciated.
Cheers,
Pat.
You can debug classic ASP in Visual Studio 2008. The way to do it involves attaching the debugger to the process that is running your ASP pages. Keeping in mind that Classic ASP debugging only works with IIS; it does not work with the VS Development Web Server (Cassini). Also, make sure that you have enabled ASP debugging in IIS:
IIS Home Directory Properties http://img4.imageshack.us/img4/6431/capturert.png
IIS Application Configuration http://img26.imageshack.us/img26/4802/capture2qr.png
Once you have the configuration in IIS as noted above, here is how to attach the debugger:
Open the Classic ASP files in Visual Studio
Set a breakpoint anywhere you want to break in the server-side code
View the page in a web browser (ensures that the host process is running)
In Visual Studio: Debug Menu -> Attach to Process
Locate the IIS ASP worker process (w3wp.exe on IIS6, dllhost.exe on IIS5.1)
Attach to the script code for the host process (see below for example)
Attach Debugger Dialog http://img43.imageshack.us/img43/2218/capturegb.png
At this point, the breakpoint should bind and you should be able to debug the Classic ASP pages. (you may have to refresh the page in the web browser to get the code to execute again once the debugger has been attached)
I've never tried to run classic ASP in VS2008. But it is not a compiled language, and I don't think you can run a debugger on it. When I did ASP, I just did a bunch of Response.Write to debug.

Resources