Profiling web services in IIS Express
Published 14 May 2018
When profiling web services deployed in IIS Express, clicking Start profiling launches Internet Explorer with a 404 page displayed. The 404 page is shown because ANTS Performance Profiler launches the containing path for your web service, not the .svc file itself, and services in IIS are usually hosted without a default display page.
Although a 404 page is displayed, the service will still be launched and profiled if you leave the Internet Explorer window open. You can collect profiling results for the service by interacting with it via your usual client. Closing the browser window will end your profiling session.
To avoid displaying the 404 page, and to direct the browser to your service's page, do one of the following:
Edit your service's web.config file to add a default page for the service, by including the following lines:
<system.webServer> <modules runAllManagedModulesForAllRequests="true" /> <defaultDocument> <files> <add value="RedGateService.svc" /> </files> </defaultDocument> </system.webServer>
- Use Microsoft WebMatrix to create a default page for your service. For instructions on using WebMatrix, see Creating a WebService with WebMatrix (MSDN).