Problems with Visual Studio 2008 Performance Profilers with ASP.NET

I tried and could not get VS.NET 2008 to profile the ASP.NET MVC application. When I try to start a profiling session, I get a general 500 server error from VS.NET:

The website cannot be configured correctly; Information about the ASP.NET process failed. The request http: // localhost: 4750 / foo / VSEnterpriseHelper.axd 'returned an error: the remote server responded with an error: (500) Internal server error.

I have tried several things, including:

The new ASP.NET MVC application (ie File | New | Project) will work without problems, so I know that my machine is able to profile such an application.

So my question here is, what are the other common and unusual things that can prevent VS.NET from starting a profiling session in an ASP.NET application?

+4
source share
5 answers

If you cannot profile VS.Net for work, there are several third-party tools that can help. Obviously, you have to pay for them, though.

ANTS has a free demo here: http://www.red-gate.com/products/ants_memory_profiler/index_v2.htm

JetBrains also has a tracing tool that offers profiling (I have not used this, but I like their Resharper tool, so I suspect it will be fine): http://www.jetbrains.com/profiler/index.html

+4
source

Between struggling with profilers, you can easily get a pretty good picture of what your program does in terms of time with this method . What he shows is usually a surprise.

Added: I make quite a few settings, and I have a different perspective regarding these things, such as: wall clock time is all that matters, individual instructions are more important than functions / methods, call trees and schedules Interesting, but no one knows what they really mean in terms of performance, demonstrations are all smart toys like Mandelbrot, and individual samples are that kind of money, not a resume.

For example, setting up a .NET application takes a lot of time. Therefore, during this period I tried it several times and asked: "What is he doing and why?" It searches for strings by identifier in resources (so strings can be internationalized). It's necessary? If I look at specific lines, these are those that should never be internationalized. No profiler can tell me this, but samples find it immediately.

+4
source

This is how I processed it for my ASP.NET site under VS2010

  • Make sure your web.config is writable

  • Create a new performance session and do not add any project to it

Instead, add the URL of your site “Goal → right-click → add existing website”. Be sure to run the website once so that the IIS process or ASP.NET server process is up and running

  • Right-click on your performance session and select “Attach” and select the web server process.

Now go to your site and follow all the scripts, then go back to your VS and click "Stop".

+4
source

Not sure if you saw this: http://social.msdn.microsoft.com/Forums/en-US/tfsbuild/thread/8366799f-7bfd-4c80-a5f1-11a57ecfd966/

but it seems to be reporting the same issue as the MSFT developer who wrote the Profiler tool :)

+2
source

If you have a shared configuration setting with external AppSettings, this may result in an error like this.

The Visual Studio profiler seems to have problems identifying that you enable AppConfig settings through

<appSettings configSource="App_Config\AppSettings.config" /> 

and that he needs to insert any AppSettings necessary for profiling there, and not directly for web.config.

In my case, moving AppSettings back to the web.config file fixes the problem.

+2
source

All Articles