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?
-
My first suggestion would be to use less question marks ;-) Secondly: What software do you have at your disposal (more exactly what Visual Studio edition)? – Adrian Grigore Aug 26 '10 at 05:49
2 Answers
(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.

- 29,128
- 5
- 77
- 94
-
-
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 Aug 26 '10 at 05:52
-
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 Aug 26 '10 at 05:53
-
@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 Aug 26 '10 at 05:57
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.

- 33,034
- 36
- 130
- 210