Covering an ASP.NET 2.0 Web App with NCover 1.5.8
Covering an ASP.NET 2.0 Web App with NCover 1.5.8
Hello,
I am currently trying to get coverage stats on an ASP.NET 2.0 application and am having quite a bit of trouble. Essentially my problem is that NCover does not seem to fully respond to the Ctrl-C event.
I got past the existing issue with profiling a web site using 1.5.8 by adding the "NCover_Process_Module" registry key, and NCover starts profiling the app just fine. I believe that it is collecting data while I poke around in my app because task manager shows that NCover.Console.exe is using some of my clock cycles.
The problem comes when I want to stop collecting data. I press Ctrl-C in NCover but the process then appears to freeze. I have attempted this in the UI and on the console. In the UI, I get no indication that the Ctrl-C event was received. When I move my mouse over the area of the UI that contains buttons, etc. I get the hourglass mouse icon indicating that NCover is still thinking. From the console I at least get confirmation that Ctrl-C was pressed. I get the following response: "Received Control Event: Ctrl_C", followed by a message saying "Stopping IIS". After those messages are displayed, however, NCover appears to lock up.
It might be worth noting that the registry key mentioned above disappears after every run of NCover. This may be a side-effect of security policies on my machine, but might also be helpful to help someone figure out what is going on. Also, it is worth mentioning that I have manually restarted IIS and still get no response from NCover.
Any help that you can offer is greatly appreciated!
Jake
RE: Covering an ASP.NET 2.0 Web App with NCover 1.5.8
Jake,
As best I remember, NCoverExplorer 1.3/1.4 doesn't capture CTRL-C events and pass them to NCover, so IIS/Service profiling is broken from within NCoverExplorer.
The registry key issue is a bug in 1.5.8. After you see the "Stopping IIS" message, does the w3svc service ever shutdown? Are you running as administrator?
Regards, Stephen Ward
RE: Covering an ASP.NET 2.0 Web App with NCover 1.5.8
Thanks for your response.
To answer your question. I do see the IIS service shut down after Ctrl-C is pressed. Not sure if it is worth noting, but the service name is IIS Admin. Is that the service you are wondering about? I do also have "World Wide Web Publishing" listed as a service. This service is not running normally on my machine, but if I start it, then press Ctrl-C in the NCover console this service shuts down as well. Please let me know if you need any other info.
Thanks, Jake
RE: Covering an ASP.NET 2.0 Web App with NCover 1.5.8
jake,
It looks like NCover is choking b/c it expects the "World Wide Web Publishing" service to be running when it tries to shut it down. If you look at the services list after you start profiling but before you press CTRL-C, is the WWWP service running?
Stephen
RE: Covering an ASP.NET 2.0 Web App with NCover 1.5.8
Stephen,
Yes, it is running. I believe I misinformed you with my last post, typically the WWWP service isn't running but when NCover restarts IIS, WWWP starts up with it.
I have been trying to run different scenarios to see what I can get to work and I have some information that may be of value to you. Currently, it seems as though NCover works and responds to the Ctrl-C event in the console if and only if the coverage file specified in the arguments exists but doesn't contain any data. Does this ring a bell at all? I have heard that there are some weird behaviors that are related to the existence (or lack thereof) of the coverage XML file, so maybe you can shed some light on that for me.
Again, your help is geatly appreciated. I feel like I am getting much closer to resolving this because of your input.
Thanks, Jake
RE: Covering an ASP.NET 2.0 Web App with NCover 1.5.8
Jake,
When you said that NCover responds if and only if the coverage.xml exists but is empty, did you mean that the coverage.xml exists before NCover runs, or afterwords?
Either way, the data doesn't ring a bell; this is a problem that we haven't seen in 2.x and weren't aware of in 1.5.8.
Stephen