Skip to content
Back to skills

Dotnet Web Api

ASecurity

Design ASP.NET Core Web APIs with typed endpoints, ProblemDetails responses, validation, and integration tests

  • 5 stars
  • 0 votes
  • 0 copies
  • 0 views
  • Added November 30, 2026
developmentapi

Works with

  • api

Security analysis

A100/100

Scanned November 30, 2026

npx -y skills add AdityaaaTiwari/ANVIL --skill dotnet-web-api --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Dotnet Web Api?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Dotnet Web Api
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/adityaaatiwari-dotnet-web-api-anvil/badge)](https://www.skillsdirectory.com/skills/adityaaatiwari-dotnet-web-api-anvil)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: dotnet-web-api
description: Design ASP.NET Core Web APIs with typed endpoints, ProblemDetails responses, validation, and integration tests
---

<!-- Generated by `anvil plugin build` from catalog/. Edit the catalog, not this file. -->

# .NET Web API

Use when building minimal APIs or controllers in ASP.NET Core.

## Endpoints and contracts
- Return typed `Results<Ok<T>, NotFound, ValidationProblem>` unions from minimal APIs for accurate compile-time checks and OpenAPI specs.
- Configure `AddProblemDetails()` globally so unhandled exceptions and model validation emit RFC 9457 JSON payloads.
- Keep endpoint handlers thin; pass `CancellationToken` from HTTP requests through every async service and DB call.

## Middleware and hosting
- Keep middleware order explicit: exception handler -> forwarded headers (when behind a proxy) -> CORS -> authentication -> authorization -> endpoints.
- Bind settings with `IOptions<T>` and `ValidateDataAnnotations().ValidateOnStart()` so misconfiguration fails fast at boot.
- Avoid `Task.Result` or `.Wait()` inside request threads to prevent thread-pool starvation under concurrency.

## Verify
Run `dotnet test` with `WebApplicationFactory<Program>` covering serialization, status codes, and auth policies.

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

View all in development →

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.