I have a WCF Service project. It has several .svc files in a Visual Studio 2010, .NET 4.0 project. I am having trouble figuring out how to actually profile it in the Ants Profiler.

I bring up the Ants Profiler, choose ASP.NET web application (hosted in web development server), then try to pick the path. I've tried picking the base directory, the bin directory, the individual files, etc...nothing worked. Each approach produces an error.

I don't think ANTS Performance Profiler has changed much. Based on the information you have provided, I'd say that you are profiling WCF hosted in IIS. The instructions for that are here and they should be pretty much the same in v5.

Looks okay to me - just try running ANTS Performance Profiler as administrator and disabling Internet Explorer's Protected Mode. From the video it looks like profiling started and stopped again - it'll do that if IE has a security wobbly because IE will exit and cause the web server to stop.

The type 'CC.AP.Services.Services.CalculationService', provided as the Service attribute value in the ServiceHost directive, or provided in the configuration element system.serviceModel/serviceHostingEnvironment/serviceActivations could not be found.
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

Exception Details: System.InvalidOperationException: The type 'CC.AP.Services.Services.CalculationService', provided as the Service attribute value in the ServiceHost directive, or provided in the configuration element system.serviceModel/serviceHostingEnvironment/serviceActivations could not be found.

Source Error:

An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.

Stack Trace:

[InvalidOperationException: The type 'CC.AP.Services.Services.CalculationService', provided as the Service attribute value in the ServiceHost directive, or provided in the configuration element system.serviceModel/serviceHostingEnvironment/serviceActivations could not be found.]
System.ServiceModel.Activation.ServiceHostFactory.CreateServiceHost(String constructorString, Uri[] baseAddresses) +677
System.ServiceModel.HostingManager.CreateService(String normalizedVirtualPath) +1473
System.ServiceModel.HostingManager.ActivateService(String normalizedVirtualPath) +55
System.ServiceModel.HostingManager.EnsureServiceAvailable(String normalizedVirtualPath) +655

I didn't include any of the public methods since they are immaterial to this.

The interface ICalculationService simply contains public methods that need to be implemented.

Here is the web.config:

<?xml version=\"1.0\"?>
<!--
Note: As an alternative to hand editing this file you can use the
web admin tool to configure settings for your application. Use
the Website->Asp.Net Configuration option in Visual Studio.
A full list of settings and comments can be found in
machine.config.comments usually located in
\\Windows\\Microsoft.Net\\Framework\\v2.x\\Config
-->
<configuration>
<configSections>
<!-- For log4net. -->
<section name=\"log4net\" type=\"log4net.Config.Log4NetConfigurationSectionHandler, log4net\" requirePermission=\"false\"/>

<add key=\"WhatToLoadAtInterval\" value=\"LastXMonths\"/> <!-- Choices are LastXMonths or LastXBooksForMarket-->
<add key=\"HowManyToLoadAtInterval\" value=\"18\"/> <!-- Indicates either how many months of
books to load or how many books to load for each market-->

<!-- The names of these variables/keys should be in the form of 'Monitor'<ServiceName>'Ops' for the OperationReportInspector to find them. -->
<add key=\"MonitorCalculationServiceOps\" value=\"true\"/>
<add key=\"MonitorMetadataServiceOps\" value=\"true\"/>

</appSettings>
<connectionStrings/>
<log4net>
<!-- Each service has its own system log file, and the corresponding operations logs which are controled by
the above monitoring flags, 'MonitorCalculationServiceOps' and 'MonitorMetadataServiceOps'.
The operations logs must be in the form of <ServiceName><OpsLog> for it to be picked up by the service. -->

<!-- Utilized by the Cache Manager, since it is a Singleton it will write to its own file. -->
<appender name=\"TallyCacheManagerSystemLog\" type=\"log4net.Appender.RollingFileAppender\">
<file value=\"Logs\\\\TallyCacheManagerSystemLog.log\"/>
<appendToFile value=\"true\"/>
<rollingStyle value=\"Composite\"/>
<datePattern value=\"yyyyMMdd\"/>
<maxSizeRollBackups value=\"10\"/>
<maximumFileSize value=\"20MB\"/>
<layout type=\"log4net.Layout.PatternLayout\">
<conversionPattern value=\"%date [%thread] %-5level - %message%newline\"/>
</layout>
</appender>
<logger name=\"TallyCacheManagerSystemLog\">
<level value=\"ALL\"/>
<appender-ref ref=\"TallyCacheManagerSystemLog\"/>
</logger>
</log4net>
<system.web>
<!--
Set compilation debug=\"true\" to insert debugging
symbols into the compiled page. Because this
affects performance, set this value to true only
during development.
-->
<compilation debug=\"true\" targetFramework=\"4.0\"/>
<!--
The <authentication> section enables configuration
of the security authentication mode used by
ASP.NET to identify an incoming user.
-->
<authentication mode=\"Windows\"/>
<!--
The <customErrors> section enables configuration
of what to do if/when an unhandled error occurs
during the execution of a request. Specifically,
it enables developers to configure html error pages
to be displayed in place of a error stack trace.

Without more data, this is impossible for me to answer. I guess you could compare the command-line generated by Visual Studio to the one generated by Profiler using Process Explorer. There are only three settings that you can pass to WebDev (excluding dotnet version, which actually has the effect of launching a different version of WebDev).

More than likely, it's the virtual directory name. Visual Studio has an inside track on knowing what that should be.

Beautiful site.RedGate offers several free eBooks on SqlServer and other topics on their bookstore. I had a look at "SQL Server Execution Plans" by Grant Fritchey, which seems to be pretty good.Thanks.