views:

46

answers:

2

I have an asp.net website up and running in my production server. I want to get the possible ways of profiling an asp.net website in a production server because my application is really slow? As i say slow i don't mean the delivery of static content but the database operations and my c# code? So any suggestion?

+3  A: 

(Full disclosure: I'm on the VS Profiler team)

Visual Studio 2010 Ultimate (and VS2008 Dev/Suite, and VS2005 Dev/Suite) includes a managed CPU profiler that works on ASP.NET websites. If you're profiling on a production machine, you'll want to use the standalone profiler package (small portable installer) that's available on the VS installation media.

If you have VS2010 Ultimate, you can also use the VSPerfASPNetCmd command-line tool to do your profiling. Otherwise, the process is a bit more manual, but it's documented well here.

Chris Schmich
@chris i am on shared hosting. What to do?
Pandiya Chendur
Do you have any access to the machine at all? Are you allowed to install anything? If not, then I don't think the profiler in VS will help unless you deploy to your development machine and do your profiling there.
Chris Schmich
@Chris Schmich: Are there any shared hosting providers that would allow that kind of access to the machine? I thought that was only possible for dedicated hosting.
Adrian Grigore
@Adrian Grigore: I highly doubt it, which does kill the possibility of using the standalone profiler. Your suggestion of reproducing the issue on the development machine is probably the best route, followed by manual tracing or System.Diagnostics.Stopwatch profiling (ick!).
Chris Schmich
+2  A: 

You can't use VS's profiler in a shared hosting environment. My advice would be to replicate the scenario (load slow page) on your development system and identify and fix the performance problems there. The more expensive Visual Studio editions come with tools for load testing a web site.

Adrian Grigore