<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:content="http://purl.org/rss/1.0/modules/content/"><channel><title>Networking | The .NET Blog</title><link>https://thedotnetblog.com/tags/networking/</link><description>Articles, tutorials and insights from the .NET community.</description><generator>Hugo</generator><language>en</language><managingEditor>@thedotnetblog (The .NET Blog)</managingEditor><webMaster>@thedotnetblog</webMaster><lastBuildDate>Tue, 19 May 2026 00:00:00 +0000</lastBuildDate><atom:link href="https://thedotnetblog.com/tags/networking/index.xml" rel="self" type="application/rss+xml"/><item><title>Private Endpoints, VNets, NSGs — Aspire Handles the Networking Now</title><link>https://thedotnetblog.com/news/emiliano-montesdeoca/aspire-azure-enterprise-networking-private-endpoints/</link><pubDate>Tue, 19 May 2026 00:00:00 +0000</pubDate><author>Emiliano Montesdeoca</author><guid>https://thedotnetblog.com/news/emiliano-montesdeoca/aspire-azure-enterprise-networking-private-endpoints/</guid><description>Aspire's new Azure enterprise networking support lets you model VNets, private endpoints, NAT gateways, NSGs, and Network Security Perimeters directly in your AppHost — no infrastructure drift required.</description><content:encoded>&lt;p&gt;Here&amp;rsquo;s a scenario I&amp;rsquo;ve seen too many times. The app is done. The demo is great. Then the security checklist shows up: take storage off the public internet, run inside a VNet, provide outbound IPs for the partner allowlist, prove that only the right subnets talk to the right services.&lt;/p&gt;
&lt;p&gt;At that point the application model and the infrastructure model start drifting apart in ways that are painful to maintain.&lt;/p&gt;
&lt;p&gt;Aspire&amp;rsquo;s new Azure enterprise networking support addresses this directly. You describe the network shape next to the resources that use it, in your AppHost.&lt;/p&gt;
&lt;h2 id="the-building-blocks"&gt;The Building Blocks&lt;/h2&gt;
&lt;p&gt;Here&amp;rsquo;s what each Azure networking concept is for, distilled:&lt;/p&gt;
&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Feature&lt;/th&gt;
&lt;th&gt;Use it when&lt;/th&gt;
&lt;th&gt;Why it matters&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Virtual network&lt;/td&gt;
&lt;td&gt;You need a private address space&lt;/td&gt;
&lt;td&gt;The network boundary for subnets, private endpoints, and routing&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Subnet&lt;/td&gt;
&lt;td&gt;You need to separate workloads inside the VNet&lt;/td&gt;
&lt;td&gt;Each part of the system gets its own address range and policy surface&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Delegated subnet&lt;/td&gt;
&lt;td&gt;A platform service (like ACA) needs to manage a subnet&lt;/td&gt;
&lt;td&gt;Lets the service place managed infrastructure in your VNet safely&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;NAT gateway&lt;/td&gt;
&lt;td&gt;You need predictable outbound public IPs&lt;/td&gt;
&lt;td&gt;Stable address for allowlists and auditing&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Private endpoint&lt;/td&gt;
&lt;td&gt;You want a PaaS resource reachable privately&lt;/td&gt;
&lt;td&gt;Puts a private IP for that service inside your VNet, removes public exposure&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;NSG&lt;/td&gt;
&lt;td&gt;You need subnet-level traffic rules&lt;/td&gt;
&lt;td&gt;Explicit allow/deny for inbound and outbound traffic per subnet&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;h2 id="describing-it-in-your-apphost"&gt;Describing It in Your AppHost&lt;/h2&gt;
&lt;p&gt;The key shift here is that you&amp;rsquo;re modeling the network &lt;em&gt;alongside&lt;/em&gt; the resources that use it, not in a separate Bicep file that drifts away from the app model over time.&lt;/p&gt;
&lt;p&gt;From the AppHost, you can:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Create VNets and subnets with &lt;code&gt;AddVirtualNetwork()&lt;/code&gt; and &lt;code&gt;AddSubnet()&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;Attach a NAT gateway to subnets for stable outbound IPs&lt;/li&gt;
&lt;li&gt;Create private endpoints for storage, Key Vault, SQL, and other PaaS services&lt;/li&gt;
&lt;li&gt;Define NSGs with inbound and outbound security rules&lt;/li&gt;
&lt;li&gt;Configure Network Security Perimeters for cross-resource policies&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;The result is that when you run &lt;code&gt;azd up&lt;/code&gt;, the infrastructure matches what the app model says it needs. Not what a manually maintained template says.&lt;/p&gt;
&lt;h2 id="why-this-matters-for-real-applications"&gt;Why This Matters for Real Applications&lt;/h2&gt;
&lt;p&gt;A few things that become significantly easier once the network is modeled in Aspire:&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Private endpoints for Key Vault and storage&lt;/strong&gt; — you describe &lt;code&gt;WithPrivateEndpoint()&lt;/code&gt; on those resources, and Aspire handles the DNS zone configuration and endpoint attachment. The app never changes.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Consistent outbound IPs&lt;/strong&gt; — add a NAT gateway to the relevant subnet and every outbound request from your app goes through a known, stable IP. Partners can allowlist it. Auditors can trace it.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;NSG rules from code&lt;/strong&gt; — instead of clicking through the portal or maintaining a Bicep snippet, your security rules live in the AppHost alongside the resources they protect.&lt;/p&gt;
&lt;p&gt;This is the kind of integration that doesn&amp;rsquo;t make demos exciting but makes production systems maintainable.&lt;/p&gt;
&lt;h2 id="wrapping-up"&gt;Wrapping Up&lt;/h2&gt;
&lt;p&gt;Network security showing up late in the project lifecycle is a solved problem if you model it alongside the app from the start. Aspire&amp;rsquo;s enterprise networking support makes that possible without requiring a separate infrastructure track.&lt;/p&gt;
&lt;p&gt;Full details in the original post: &lt;a href="https://devblogs.microsoft.com/aspire/aspire-azure-enterprise-networking/"&gt;Securing Azure apps with Aspire enterprise networking&lt;/a&gt;&lt;/p&gt;</content:encoded></item></channel></rss>