Skip to content

Latest commit

 

History

History
 
 

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 

README.md

Want to know more?

See docs/README.md for detailed architecture, feature documentation, and screenshots. License: MIT

Scenario: Deploying .NET Aspire Apps to Azure App Service

This scenario demonstrates how to deploy a .NET Aspire-based eShopLite application to Azure App Service, leveraging the latest platform features announced at Microsoft Build 2025. It is a practical demo for modernizing and running .NET Aspire multi-service applications on Azure's fully managed web hosting platform.

What's New: .NET Aspire on Azure App Service

  • .NET Aspire support is now available in public preview for App Service on Linux!
  • Developers can deploy multi-app/multi-service .NET Aspire applications directly to Azure App Service using the new Aspire App Service deployment provider.
  • The App Service provider translates your .NET Aspire application's topology into Azure App Service resources, supporting secure deployments and observability (with Aspire dashboard integration coming soon).
  • Take advantage of the new Premium v4 plan for enhanced performance, cost savings, and Availability Zone support.

For more details, see the official announcement and Getting Started with .NET Aspire on Azure App Service.


eShopLite - Semantic Search deploy to Azure App Service is a reference .NET Aspire application implementing an eCommerce site with advanced search features, now ready for deployment to Azure App Service.

Features

GitHub CodeSpaces: This project is designed to be opened in GitHub Codespaces as an easy way for anyone to deploy the solution entirely in the browser.

The Azure Resources provisioned by this scenario includes the Products and the Store services, which are deployed to Azure App Service:

 Products and the Store services, which are deployed to Azure App Service

This is the eShopLite Application running, performing a Keyword Search:

eShopLite Application running doing search using keyword search

This is the eShopLite Application running, performing a Semantic Search:

eShopLite Application running doing search using keyword search

Architecture diagram

flowchart TD
  subgraph "Azure App Service"
    store[Store Service]
    products[Products Service SQLite DB internal]
  end
  ContainerRegistry[Container Registry]
  StorageAccount[Storage Account]
  ManagedIdentity[Managed Identity]
  AzureOpenAI[Azure OpenAI Chat + Embeddings]
  InMemoryVectorDB[InMemory Vector DB]

  store --> products
  store --> ManagedIdentity

  ManagedIdentity --> ContainerRegistry
  ManagedIdentity --> StorageAccount
  ManagedIdentity --> AzureOpenAI
  AzureOpenAI --> InMemoryVectorDB

  products --> ManagedIdentity
  products -->|semantic search| InMemoryVectorDB
  products -->|generate embeddings + chat| AzureOpenAI
Loading

Getting Started

Main Concepts in this Scenario

This scenario demonstrates how to use a .NET Aspire application to Azure to AppServices. The main concepts and implementation details are:

The solution is in the ./src folder, the main solution is eShopLite-Aspire-AppService.slnx.

Deploying

Note: The deployment process for this scenario is the same as in scenario 01 - Semantic Search. Please refer to the Deploying section in that README for detailed steps and requirements. All Azure resource provisioning, local development, and Codespaces instructions are identical for this scenario.

Guidance

Costs

For Azure OpenAI Services, pricing varies per region and usage, so it isn't possible to predict exact costs for your usage. The majority of the Azure resources used in this infrastructure are on usage-based pricing tiers. However, Azure Container Registry has a fixed cost per registry per day.

You can try the Azure pricing calculator for the resources:

  • Azure OpenAI Service: S0 tier, gpt-4.1-mini and text-embedding-3-small models. Pricing is based on token count. Pricing
  • Azure Container App: Consumption tier with 0.5 CPU, 1GiB memory/storage. Pricing is based on resource allocation, and each month allows for a certain amount of free usage. Pricing
  • Azure Container Registry: Basic tier. Pricing
  • Log analytics: Pay-as-you-go tier. Costs based on data ingested. Pricing
  • Azure Application Insights pricing is based on a Pay-As-You-Go model. Pricing.

⚠️ To avoid unnecessary costs, remember to take down your app if it's no longer in use, either by deleting the resource group in the Portal or running azd down.

Security Guidelines

Samples in this templates uses Azure OpenAI Services with ApiKey and Managed Identity for authenticating to the Azure OpenAI service.

The Main Sample uses Managed Identity](https://learn.microsoft.com/entra/identity/managed-identities-azure-resources/overview) for authenticating to the Azure OpenAI service.

Additionally, we have added a GitHub Action that scans the infrastructure-as-code files and generates a report containing any detected issues. To ensure continued best practices in your own repository, we recommend that anyone creating solutions based on our templates ensure that the Github secret scanning setting is enabled.

You may want to consider additional security measures, such as:

Resources

Video Recordings

Run eShopLite Semantic Search in Minutes with .NET Aspire & GitHub Codespaces 🚀