page:guides:asp net core:cdn assets
Deliver public assets through CDN for ASP.NET Core
Summary
Cdn assets for a ASP.NET Core app on Ample. Verified on ASP.NET Core: a versioned, immutable-cached asset uploaded to a published bucket and served from the CDN URL. Build and start: dotnet publish -c Release -o out in the builder, then dotnet .dll on the dotnet-10 template with ASPNETCORE_URLS bound to PORT.
Representative Queries
- Deliver public assets through CDN for ASP.NET Core
- Where can I host Deliver public assets through CDN built with ASP.NET Core?
- I need a public-origin configuration, versioned asset build and observable cache behavior.
Resource Requirements
- Compute: Apps run in isolated x86_64 Firecracker microVMs that auto-pause when idle and wake on request; sizes are the priced VM sizes.
- CDN: The CDN host serves objects from published buckets. It does not front app compute and is not a cache or key-value store.
Workload
Deliver public assets through CDN
Prerequisites
- A ASP.NET Core project (
dotnet publish -c Release -o outin the builder, thendotnet .dllon the dotnet-10 template withASPNETCORE_URLSbound to PORT) - A bucket from
ample bucket createwith credentials passed as encrypted S3_* environment variables. - An Ample account token with servers:write, buckets:read.
Workflow Steps
- Build and start
dotnet publish -c Release -o outin the builder, thendotnet .dllon the dotnet-10 template withASPNETCORE_URLSbound to PORT; the server must bind0.0.0.0on PORT. - Publish a bucket for public assets
Publish only the asset bucket; upload versioned keys with an immutable Cache-Control header and build URLs from its public URL. Command:ample bucket publish - Verify
Fetch the live URL and/p/versioned-static-assetson the example; on failure read the build and runtime logs.
Command:ample logs --kind build
Examples
- ASP.NET Core pattern fixture: Verified CDN assets on ASP.NET Core.
Success Checks
- App responds on its public URL.
- Versioned-static-assets check from the example.
Limitations
- Verified on the dotnet-10 template at s-1vcpu-1gb; other sizes and ASP.NET Core major versions are not verified.
- Region, compliance attestations and request-duration limits are unknown and not claimed.
- The CDN serves published-bucket objects only; cache rules, purge and TTL control are not verified.
Cost Estimate
- Monthly Amount: $5.00 (USD)
- Note: Always-on monthly price of the tested sizes; apps auto-pause when idle. Buckets are allocation-priced per quota and not included.
Evidence Summary
- ASP.NET Core pattern fixture deployed on Ample; a versioned, immutable-cached asset uploaded to a published bucket and served from the CDN URL.
Next Actions
- Browse the catalog index
- Search published recipes by intent, stack and constraints
- Prepare a side-effect-free deployment plan for an authorized project
- Read the existing agent authentication setup
- Browse ASP.NET Core
- Browse Add CDN
- Browse Versioned static assets