Why is VsPerfAspNetCmd throwing the error “Value does not fall within the expected range”?

Locked Why is VsPerfAspNetCmd throwing the error “Value does not fall within the expected range”?

  • Friday, September 10, 2010 5:50 PM
     
      Has Code

    I am trying to profile an ASP.NET application the Visual Studio 2010 ASP.NET profiler and I get the following output:

    C:\MyWebApp>VSPerfAspNetCmd /i /Output:MyWebAppSampling.vsp http://localhost/MyWebApp
    Microsoft (R) VSPerf ASP.NET Command, Version 10.0.0.0
    Copyright (C) Microsoft Corporation. All rights reserved.

    Configuring and attaching to ASP.NET process. Please wait.
    Setting up profiling environment.
    Starting monitor.

    Error
    VSP
    1001: Unhandled exception: "Value does not fall within the expected range."

    I cannot find any documentation on MSDN or results on the web that indicate why this error may be occurring. Here are any parameters that may also be relevant:

    • My workstation hosting the web application is Windows XP
    • The web application is using .NET Framework 3.5
    • The web application (and referenced projects) are compiled in Release|Any CPU mode

    Any help that you can provide would be greatly appreciated.

    (this question also appears on Stack Overflow)

    UPDATE: I finally got around to testing ASP.NET Profiling in a server environment (Windows Server 2003 Standard SP2) and profiling does function. The website runs on the server at http://localhost:9001, whereas the website runs on my workstation at http://localhost/MyWebApp, if that makes a difference.

    • Edited by John Bledsoe Tuesday, September 21, 2010 1:37 PM additional information
    •  

All Replies

  • Monday, September 13, 2010 7:58 AM
    Moderator
     
     
     

    Hi John,

     

    I failed to reproduce this issue, I'm using Win7 (32bit) + VS2010 + ASP.NET web application (3.5).

     

    Could you please repair or reinstall VS2010 and retry?


    Sincerely,
    Eric
    MSDN Subscriber Support in Forum
    If you have any feedback of our support, please contact msdnmg@microsoft.com.
    Please remember to mark the replies as answers if they help and unmark them if they provide no help.
    Welcome to the All-In-One Code Framework! If you have any feedback, please tell us.
  • Monday, September 13, 2010 12:51 PM
     
     

    Reinstalling Visual Studio will be an 8-hour process and I have work to do, so I'd like to avoid that if possible. Plus I'm working on a brand new machine on which I installed visual studio only 2 weeks ago, and I haven't had any other issues with it, including profiling with VsPerfCmd.

    1. Are there any command-line options/registry options/etc. that will provide more diagnostic logging for AspNetPerfCmd?
    2. I'm using AspNetPerfCmd because I won't be able to reboot the web server boxes where I'll be doing profiling. Is there a way that I can use VsPerfCmd to profile a web application without needing to reboot the machine?
    I'll be trying to run profiling from the command line on the web server shortly, which will include installing the stand-alone profiling tools out there. I'll post back if I experience the same error, but if you know answers to these other questions in the meantime they would be appreciated.

    Thanks,

    - John Bledsoe

  • Tuesday, September 28, 2010 2:00 PM
     
     Proposed Answer

    Looks like error is  while using asp.net profiler (VSPerfAspNetCmd)

     

    C:\MyWebApp>VSPerfAspNetCmd /i /Output:MyWebAppSampling.vsp http://localhost/MyWebAppMicrosoft (R) VSPerf ASP.NET Command, Version 10.0.0.0Copyright (C) Microsoft Corporation. All rights reserved.

    Configuring and attaching to ASP.NET process. Please wait.Setting up profiling environment.Starting monitor.ErrorVSP 1001: Unhandled exception: "Value does not fall within the expected range."

     

    - if this exception is the issue, Can we get the entire exception(stack trace etc) to get more details,

    may be event logs would have it.

     

    - the forum link latest update shows that you tried ASP.NET Profiling in a server environment (Windows Server 2003 Standard SP2) and profiling does function.  The website runs on the server at http://localhost:9001, whereas the website runs on his workstation at http://localhost/MyWebApp

    - Couldn't make out if this is same site which runs on his workstation. So we should

    1. Check if the same site is running on server machine

    2. If you can provide the complete exception

    • Proposed As Answer by billb08 - MSFT Saturday, October 02, 2010 2:00 PM
    •  
  • Wednesday, October 06, 2010 7:43 PM
    Moderator
     
     

    Hi John,

    In addition to the points laid out by billb08, please look in the event viewer for any related messages and please ensure that you have certain IIS features enabled as described here (the steps might be different since you're on Win2K3).

    It is possible to profile a website with vsperfcmd without needing to reboot.  Let me know if you still want to go this route and I will explain.

    Regards,
    Chris