IIS profiling won't serve up pages

IIS profiling won't serve up pages

I'm trying to profile an asp.net application. I'm running NCover like:

ncover.console //iis //w "C:\path_to_bin"

The program outputs that it is stopping and then starting the service [World Wide Web Publishing], followed by saying that it is waiting for me to load an ASP.NET page.

Now I try to open my website in a web browser, but it never opens -- the status bar text just indefinitely says that it is waiting on the page to load.

If I end NCover with CTRL+C and start my WWW service manually, I can then load the page just fine. What might be keeping it from serving the page while NCover is running? This is my first attempt at using NCover, btw.


RE: IIS profiling won't serve up pages

NCover instruments IL as it is loaded by the IIS worker process, so large projects or projects with many references can take some time to load. How long have you waited?

Stephen Ward


RE: IIS profiling won't serve up pages

Thanks for the response -- I'm happy to report that I simply wasn't waiting long enough! Such an easy fix. It did cause me to experience some timeouts in the web application but I should be able to change that value on the server. It looks like I'm successfully getting coverage data, which I'm going to review now...

  • Joe


RE: IIS profiling won't serve up pages

glad to be of help


RE: IIS profiling won't serve up pages

HI,

I'm having the same problem. I downloaded the latest (2.1) NCover. Trying to do evaluation to see if it is a valid choice for our product (a ASP.NET web application) tesing profiling purpose.

I typed NCover //iis in the command prompt. The message says "The profiler will not connect until you load an asp page". I opened a IE browser, typed URL of our application start page. The page is trying to load but never really come back until I stop the NCover and restart WWW publish service. The first page is only a login page. But the whole application is huge with a lots of DLLs in the bin folder. I don't know if that matters. I tried several times, I think I waited long enough (>20 mins).

I also created a very simple web site with just one simple ASPX page in it. That page loaded without any problem. When I stopped NCover I can see a xml profile file is generated. So I think the procedure I did should be correct unless I missed something.

So my question is can NCover handle large ASP.NET applications well?


RE: IIS profiling won't serve up pages

Short answer: yes, but NCover increases the load on the system. Since NCover runs inside the process it is covering, it increases the memory use of that process and slows down load time because it instruments dlls as they are loaded. The load time increase isn't noticable unless many large dlls are loaded on startup, the usual culprit is memory. My hunch is that if you look at the process as it's running under NCover, you'll see a lot of page faults as Windows has to load memory pages from disk and save them back out.

We have done work in the next version to decrease the extra load NCover places on a process and to make the load-time instrumentation more performant.

Stephen Ward


RE: IIS profiling won't serve up pages

Hi, Stephen,

Thanks for the response.

I finally got my first page loaded after more than one and half hour wait. Then I can login to my application, went for a few pages, each page loading is still slow (could take a few mins). Then on some pages I get timeout error so I could not go further. I don't even want to wait for another hour to give it another try.

I don't know what we can do to reduce the loading time. Is it trying to load every dlls in the bin folder on initial load or just the dlls that page referenced? In our case, each page will reference a set of dlls, such as Web controls dll, Business level dll, and data level dlls. Each dll also has reference of some common dlls, or 3rd party dlls. So what options do we have to have this thing work. I don't think it's realistic to wait that long just for the first page to show up to do the test.

Are you saying with the current version, this is expected? When will you release the next version so we can test it out?

Thanks!


RE: IIS profiling won't serve up pages

Sally,

NCover only loads the dlls that the app asks for, it does not try to load every dll in the bin folder at startup unless the app does. To ease load time you can use the exclusion rules (http://www.ncover.com/documentation/console/profilingoptions) to tell NCover not to worry about certain dlls, or to worry only about certain dlls. That's a partial load-time improvement in 2.1, it's become much better in 3.0.

Other than that, the best advice I can give would be to bump the RAM on the test machine to 4 gigs (the max a 32-bit machine can handle), and extend the ASP.NET page timeout from the default (which I think is 60 secs) to something larger.

We are looking a full Beta release for the next version in the second full week of October.

Regards, Stephen Ward