Skip to content

Using Inspectr with .NET

Inspectr is a powerful tool when working with .NET web APIs. You can use it to debug incoming requests, inspect headers and payloads, and expose your local .NET services for webhook testing or external integrations.

This guide shows how to use Inspectr as a proxy in front of your .NET application.



You can use the .NET CLI to scaffold a new API:

Terminal window
dotnet new webapi -n MyApiApp
cd MyApiApp
dotnet run

By default, this runs on http://localhost:5000.


Run Inspectr and forward traffic to your running .NET backend:

Terminal window
inspectr --listen=:8080 --backend=http://localhost:5000

Now, any requests made to http://localhost:8080 will be:

  • Logged in the terminal
  • Captured in the Inspectr App UI (http://localhost:4004)
  • Forwarded to your .NET API
Terminal window
curl http://localhost:8080/weatherforecast

You can expose your .NET API to the internet via Inspectr’s Ingress relay:

Terminal window
inspectr \
--listen=:8080 \
--backend=http://localhost:5000 \
--expose \
--channel=dotnet-app \
--channel-code=dotnet123

Your API will now be available at:

https://dotnet-app.in-spectr.dev

Use the Inspectr App to:

  • View request/response bodies, status codes, and headers
  • Replay requests to test your endpoints
  • Catch malformed or unauthorized requests
  • Log activity during development or integration testing

Using Inspectr with .NET APIs allows you to:

  • Debug traffic in real time
  • Replay incoming requests for testing
  • Expose services for external integrations or webhook development