Visual Studio 2008 Service Pack 1, while fixing many profiling bugs, has also unfortunately introduced an issue with website profiling. If you have a website project created with a pre-SP1 version of Visual Studio and then try to profile it using instrumentation with VS2008 SP1, you might run into a rather vague error: “Value does not fall within the expected range.”
Thankfully, there is a simple workaround: open the Configuration Manager from the Build menu, and for each of your website projects listed there, change its Platform to “Any CPU”. Be sure to make these changes for each configuration type defined for your solution (e.g. Debug, Release). You should now be able to successfully profile your website using instrumentation.
I received this same error message but only I got it in Visual Studio 2005 Team Edition (I think I updated it to latest SP1 including the .Net Framework to 2.0).
I got this error when I go to Solution Explorer -> Right Click, Solution (SolutionName) -> Choose Existing Item -> Add the .sdf database -> then this error came out.
However, this error won't appear when I do a Right Click on the namespace name -> Choose Existing Item -> Add the .sdf database.
There must be a reason why this happens as it doesn't seem like a bug to me?
This is a very generic error message that could occur in just about any component in Visual Studio. It sounds like your issue is unrelated to the profiler, but it is almost certainly a bug. I recommend posting this issue in the MSDN Forums* where you might find a solution.