xpoprofiler-400001-profile-aspnet-core-applications.md
This topic describes how to use the XPO Profiler to profile ASP.NET Core applications.
Create the following controller:
Add the following code to the Startup.ConfigureServices method:
Make sure that the Configure method has the code that adds endpoints for controller actions:
Run the XPO Profiler. Click File | New. In the New Host dialog, supply the following parameters:
Click Test to test the connection.
XPO Profiler supports the following authentication types when using WebAPI binding:
| Authentication Type | Description | Authentication Dialog |
|---|---|---|
| Anonymous | Your web application should provide anonymous access to the controller demonstrated in the Connection Setup section. | None |
| Basic | XPO profiler displays the Authentication dialog where you can specify the login and password. | |
| Token-Based | XPO profiler displays the Authentication dialog where you can specify the authentication token. Your web application should implement a custom authentication handler (see the section below for details). |
Implement the following XpoProfilerTokenHandler authentication handler:
Register your custom authentication handler in the Startup.ConfigureServices method declared in the Startup.cs file.
Apply the Authorize attribute to your XpoLoggerController class (demonstrated in the Connection Setup section).
See Also