<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Syed Mohamed</title>
    <description>The latest articles on DEV Community by Syed Mohamed (@syed_mohamed).</description>
    <link>https://dev.to/syed_mohamed</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F3817814%2F6df9688c-5359-4b96-89f5-e111332aaa9f.jpg</url>
      <title>DEV Community: Syed Mohamed</title>
      <link>https://dev.to/syed_mohamed</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/syed_mohamed"/>
    <language>en</language>
    <item>
      <title>Rate Limiting in ASP.NET Core Web API</title>
      <dc:creator>Syed Mohamed</dc:creator>
      <pubDate>Wed, 23 Sep 2026 03:45:06 +0000</pubDate>
      <link>https://dev.to/syed_mohamed/rate-limiting-in-aspnet-core-web-api-1g5c</link>
      <guid>https://dev.to/syed_mohamed/rate-limiting-in-aspnet-core-web-api-1g5c</guid>
      <description>&lt;h1&gt;
  
  
  Rate Limiting in ASP.NET Core Web API
&lt;/h1&gt;

&lt;h2&gt;
  
  
  What is rate limiting?
&lt;/h2&gt;

&lt;p&gt;Rate limiting controls how many requests a client can send to an API during a specified period.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;&lt;em&gt;More Articles Visit&lt;/em&gt;&lt;/strong&gt;: &lt;a href="https://jntech.in/Articles" rel="noopener noreferrer"&gt;https://jntech.in/Articles&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Example:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Allow a maximum of &lt;strong&gt;5 requests every 10 seconds&lt;/strong&gt;.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;If the client sends more than five requests within ten seconds, the API rejects the additional requests with:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight http"&gt;&lt;code&gt;&lt;span class="err"&gt;HTTP 429 Too Many Requests
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Why do we need rate limiting?
&lt;/h2&gt;

&lt;p&gt;Rate limiting helps to:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Protect the API from excessive traffic&lt;/li&gt;
&lt;li&gt;Prevent API abuse&lt;/li&gt;
&lt;li&gt;Reduce server and database load&lt;/li&gt;
&lt;li&gt;Ensure fair usage among clients&lt;/li&gt;
&lt;li&gt;Control costly operations&lt;/li&gt;
&lt;li&gt;Improve application stability&lt;/li&gt;
&lt;li&gt;Partially reduce denial-of-service attacks&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Rate limiting helps with abusive traffic, but it is &lt;strong&gt;not complete DDoS protection&lt;/strong&gt;. Production systems should also use services such as a WAF, CDN, Azure Front Door or Cloudflare.&lt;/p&gt;




&lt;h1&gt;
  
  
  Simple fixed-window example
&lt;/h1&gt;

&lt;p&gt;This example allows:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;5 requests every 10 seconds
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Step 1: Configure rate limiting in &lt;code&gt;Program.cs&lt;/code&gt;
&lt;/h2&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight csharp"&gt;&lt;code&gt;&lt;span class="k"&gt;using&lt;/span&gt; &lt;span class="nn"&gt;Microsoft.AspNetCore.RateLimiting&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="k"&gt;using&lt;/span&gt; &lt;span class="nn"&gt;System.Threading.RateLimiting&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

&lt;span class="kt"&gt;var&lt;/span&gt; &lt;span class="n"&gt;builder&lt;/span&gt; &lt;span class="p"&gt;=&lt;/span&gt; &lt;span class="n"&gt;WebApplication&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;CreateBuilder&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;args&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;

&lt;span class="n"&gt;builder&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;Services&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;AddControllers&lt;/span&gt;&lt;span class="p"&gt;();&lt;/span&gt;

&lt;span class="n"&gt;builder&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;Services&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;AddRateLimiter&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;options&lt;/span&gt; &lt;span class="p"&gt;=&amp;gt;&lt;/span&gt;
&lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="c1"&gt;// Response status when the limit is exceeded&lt;/span&gt;
    &lt;span class="n"&gt;options&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;RejectionStatusCode&lt;/span&gt; &lt;span class="p"&gt;=&lt;/span&gt;
        &lt;span class="n"&gt;StatusCodes&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;Status429TooManyRequests&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

    &lt;span class="c1"&gt;// Create a named rate-limiting policy&lt;/span&gt;
    &lt;span class="n"&gt;options&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;AddFixedWindowLimiter&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;
        &lt;span class="n"&gt;policyName&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s"&gt;"FixedPolicy"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
        &lt;span class="n"&gt;configureOptions&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;limiterOptions&lt;/span&gt; &lt;span class="p"&gt;=&amp;gt;&lt;/span&gt;
        &lt;span class="p"&gt;{&lt;/span&gt;
            &lt;span class="c1"&gt;// Maximum requests allowed in one window&lt;/span&gt;
            &lt;span class="n"&gt;limiterOptions&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;PermitLimit&lt;/span&gt; &lt;span class="p"&gt;=&lt;/span&gt; &lt;span class="m"&gt;5&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

            &lt;span class="c1"&gt;// Duration of one window&lt;/span&gt;
            &lt;span class="n"&gt;limiterOptions&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;Window&lt;/span&gt; &lt;span class="p"&gt;=&lt;/span&gt;
                &lt;span class="n"&gt;TimeSpan&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;FromSeconds&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="m"&gt;10&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;

            &lt;span class="c1"&gt;// Do not wait when the limit is exceeded&lt;/span&gt;
            &lt;span class="n"&gt;limiterOptions&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;QueueLimit&lt;/span&gt; &lt;span class="p"&gt;=&lt;/span&gt; &lt;span class="m"&gt;0&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

            &lt;span class="n"&gt;limiterOptions&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;QueueProcessingOrder&lt;/span&gt; &lt;span class="p"&gt;=&lt;/span&gt;
                &lt;span class="n"&gt;QueueProcessingOrder&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;OldestFirst&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

            &lt;span class="c1"&gt;// Automatically start a new window&lt;/span&gt;
            &lt;span class="n"&gt;limiterOptions&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;AutoReplenishment&lt;/span&gt; &lt;span class="p"&gt;=&lt;/span&gt; &lt;span class="k"&gt;true&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
        &lt;span class="p"&gt;});&lt;/span&gt;
&lt;span class="p"&gt;});&lt;/span&gt;

&lt;span class="kt"&gt;var&lt;/span&gt; &lt;span class="n"&gt;app&lt;/span&gt; &lt;span class="p"&gt;=&lt;/span&gt; &lt;span class="n"&gt;builder&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;Build&lt;/span&gt;&lt;span class="p"&gt;();&lt;/span&gt;

&lt;span class="n"&gt;app&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;UseHttpsRedirection&lt;/span&gt;&lt;span class="p"&gt;();&lt;/span&gt;

&lt;span class="n"&gt;app&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;UseRateLimiter&lt;/span&gt;&lt;span class="p"&gt;();&lt;/span&gt;

&lt;span class="n"&gt;app&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;MapControllers&lt;/span&gt;&lt;span class="p"&gt;();&lt;/span&gt;

&lt;span class="n"&gt;app&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;Run&lt;/span&gt;&lt;span class="p"&gt;();&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Step 2: Apply the policy to a controller
&lt;/h2&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight csharp"&gt;&lt;code&gt;&lt;span class="k"&gt;using&lt;/span&gt; &lt;span class="nn"&gt;Microsoft.AspNetCore.Mvc&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="k"&gt;using&lt;/span&gt; &lt;span class="nn"&gt;Microsoft.AspNetCore.RateLimiting&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

&lt;span class="k"&gt;namespace&lt;/span&gt; &lt;span class="nn"&gt;RateLimitDemo.Controllers&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="n"&gt;ApiController&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;
&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="nf"&gt;Route&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s"&gt;"api/[controller]"&lt;/span&gt;&lt;span class="p"&gt;)]&lt;/span&gt;
&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="nf"&gt;EnableRateLimiting&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s"&gt;"FixedPolicy"&lt;/span&gt;&lt;span class="p"&gt;)]&lt;/span&gt;
&lt;span class="k"&gt;public&lt;/span&gt; &lt;span class="k"&gt;class&lt;/span&gt; &lt;span class="nc"&gt;ProductsController&lt;/span&gt; &lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;ControllerBase&lt;/span&gt;
&lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="n"&gt;HttpGet&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;
    &lt;span class="k"&gt;public&lt;/span&gt; &lt;span class="n"&gt;IActionResult&lt;/span&gt; &lt;span class="nf"&gt;GetProducts&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt;
    &lt;span class="p"&gt;{&lt;/span&gt;
        &lt;span class="kt"&gt;var&lt;/span&gt; &lt;span class="n"&gt;products&lt;/span&gt; &lt;span class="p"&gt;=&lt;/span&gt; &lt;span class="k"&gt;new&lt;/span&gt;&lt;span class="p"&gt;[]&lt;/span&gt;
        &lt;span class="p"&gt;{&lt;/span&gt;
            &lt;span class="s"&gt;"Laptop"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
            &lt;span class="s"&gt;"Mobile"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
            &lt;span class="s"&gt;"Keyboard"&lt;/span&gt;
        &lt;span class="p"&gt;};&lt;/span&gt;

        &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="nf"&gt;Ok&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;products&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
    &lt;span class="p"&gt;}&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The rate-limiting policy now applies to every endpoint inside &lt;code&gt;ProductsController&lt;/code&gt;.&lt;/p&gt;




&lt;h1&gt;
  
  
  How the example works
&lt;/h1&gt;

&lt;p&gt;Call this endpoint repeatedly:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight http"&gt;&lt;code&gt;&lt;span class="err"&gt;GET /api/products
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Within the same 10-second window:&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Request&lt;/th&gt;
&lt;th&gt;Result&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;1&lt;/td&gt;
&lt;td&gt;&lt;code&gt;200 OK&lt;/code&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;2&lt;/td&gt;
&lt;td&gt;&lt;code&gt;200 OK&lt;/code&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;3&lt;/td&gt;
&lt;td&gt;&lt;code&gt;200 OK&lt;/code&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;4&lt;/td&gt;
&lt;td&gt;&lt;code&gt;200 OK&lt;/code&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;5&lt;/td&gt;
&lt;td&gt;&lt;code&gt;200 OK&lt;/code&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;6&lt;/td&gt;
&lt;td&gt;&lt;code&gt;429 Too Many Requests&lt;/code&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;7&lt;/td&gt;
&lt;td&gt;&lt;code&gt;429 Too Many Requests&lt;/code&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;After the 10-second window ends, the counter resets, and another five requests are allowed.&lt;/p&gt;




&lt;h1&gt;
  
  
  Code explanation
&lt;/h1&gt;

&lt;h2&gt;
  
  
  &lt;code&gt;AddRateLimiter()&lt;/code&gt;
&lt;/h2&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight csharp"&gt;&lt;code&gt;&lt;span class="n"&gt;builder&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;Services&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;AddRateLimiter&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;options&lt;/span&gt; &lt;span class="p"&gt;=&amp;gt;&lt;/span&gt;
&lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="c1"&gt;// Policies&lt;/span&gt;
&lt;span class="p"&gt;});&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Registers ASP.NET Core’s built-in rate-limiting services.&lt;/p&gt;

&lt;h2&gt;
  
  
  &lt;code&gt;AddFixedWindowLimiter()&lt;/code&gt;
&lt;/h2&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight csharp"&gt;&lt;code&gt;&lt;span class="n"&gt;options&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;AddFixedWindowLimiter&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;
    &lt;span class="n"&gt;policyName&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s"&gt;"FixedPolicy"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="n"&gt;configureOptions&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;limiterOptions&lt;/span&gt; &lt;span class="p"&gt;=&amp;gt;&lt;/span&gt;
    &lt;span class="p"&gt;{&lt;/span&gt;
        &lt;span class="c1"&gt;// Settings&lt;/span&gt;
    &lt;span class="p"&gt;});&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Creates a named policy using the &lt;strong&gt;fixed-window algorithm&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;The name &lt;code&gt;"FixedPolicy"&lt;/code&gt; is later used to apply the policy to controllers or endpoints.&lt;/p&gt;

&lt;h2&gt;
  
  
  &lt;code&gt;PermitLimit&lt;/code&gt;
&lt;/h2&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight csharp"&gt;&lt;code&gt;&lt;span class="n"&gt;limiterOptions&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;PermitLimit&lt;/span&gt; &lt;span class="p"&gt;=&lt;/span&gt; &lt;span class="m"&gt;5&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Specifies the maximum number of requests allowed in one window.&lt;/p&gt;

&lt;p&gt;Here, only five requests are permitted.&lt;/p&gt;

&lt;h2&gt;
  
  
  &lt;code&gt;Window&lt;/code&gt;
&lt;/h2&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight csharp"&gt;&lt;code&gt;&lt;span class="n"&gt;limiterOptions&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;Window&lt;/span&gt; &lt;span class="p"&gt;=&lt;/span&gt; &lt;span class="n"&gt;TimeSpan&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;FromSeconds&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="m"&gt;10&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Defines the duration of one window.&lt;/p&gt;

&lt;p&gt;Therefore:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;5 requests / 10 seconds
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  &lt;code&gt;QueueLimit&lt;/code&gt;
&lt;/h2&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight csharp"&gt;&lt;code&gt;&lt;span class="n"&gt;limiterOptions&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;QueueLimit&lt;/span&gt; &lt;span class="p"&gt;=&lt;/span&gt; &lt;span class="m"&gt;0&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Specifies how many extra requests may wait in a queue.&lt;/p&gt;

&lt;p&gt;Because it is &lt;code&gt;0&lt;/code&gt;, extra requests are rejected immediately with &lt;code&gt;429&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;If it were:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight csharp"&gt;&lt;code&gt;&lt;span class="n"&gt;limiterOptions&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;QueueLimit&lt;/span&gt; &lt;span class="p"&gt;=&lt;/span&gt; &lt;span class="m"&gt;2&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;two additional requests could wait for permits. Queueing can increase response time, so &lt;code&gt;0&lt;/code&gt; is often simpler for APIs.&lt;/p&gt;

&lt;h2&gt;
  
  
  &lt;code&gt;QueueProcessingOrder&lt;/code&gt;
&lt;/h2&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight csharp"&gt;&lt;code&gt;&lt;span class="n"&gt;limiterOptions&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;QueueProcessingOrder&lt;/span&gt; &lt;span class="p"&gt;=&lt;/span&gt;
    &lt;span class="n"&gt;QueueProcessingOrder&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;OldestFirst&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;When queueing is enabled, the oldest waiting request is processed first.&lt;/p&gt;

&lt;p&gt;This setting has no practical effect when &lt;code&gt;QueueLimit&lt;/code&gt; is &lt;code&gt;0&lt;/code&gt;.&lt;/p&gt;

&lt;h2&gt;
  
  
  &lt;code&gt;AutoReplenishment&lt;/code&gt;
&lt;/h2&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight csharp"&gt;&lt;code&gt;&lt;span class="n"&gt;limiterOptions&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;AutoReplenishment&lt;/span&gt; &lt;span class="p"&gt;=&lt;/span&gt; &lt;span class="k"&gt;true&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;ASP.NET Core automatically renews the available request permits when a new window begins.&lt;/p&gt;

&lt;h2&gt;
  
  
  &lt;code&gt;UseRateLimiter()&lt;/code&gt;
&lt;/h2&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight csharp"&gt;&lt;code&gt;&lt;span class="n"&gt;app&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;UseRateLimiter&lt;/span&gt;&lt;span class="p"&gt;();&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Adds the rate-limiting middleware to the HTTP request pipeline.&lt;/p&gt;

&lt;p&gt;Registering &lt;code&gt;AddRateLimiter()&lt;/code&gt; alone is insufficient. The middleware must also be enabled.&lt;/p&gt;

&lt;h2&gt;
  
  
  &lt;code&gt;EnableRateLimiting&lt;/code&gt;
&lt;/h2&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight csharp"&gt;&lt;code&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="nf"&gt;EnableRateLimiting&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s"&gt;"FixedPolicy"&lt;/span&gt;&lt;span class="p"&gt;)]&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Applies the named policy to a controller or action.&lt;/p&gt;




&lt;h1&gt;
  
  
  Apply rate limiting to only one action
&lt;/h1&gt;

&lt;p&gt;Instead of placing the attribute on the controller, it can be placed on an individual action:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight csharp"&gt;&lt;code&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="n"&gt;ApiController&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;
&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="nf"&gt;Route&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s"&gt;"api/[controller]"&lt;/span&gt;&lt;span class="p"&gt;)]&lt;/span&gt;
&lt;span class="k"&gt;public&lt;/span&gt; &lt;span class="k"&gt;class&lt;/span&gt; &lt;span class="nc"&gt;ProductsController&lt;/span&gt; &lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;ControllerBase&lt;/span&gt;
&lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="n"&gt;HttpGet&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;
    &lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="nf"&gt;EnableRateLimiting&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s"&gt;"FixedPolicy"&lt;/span&gt;&lt;span class="p"&gt;)]&lt;/span&gt;
    &lt;span class="k"&gt;public&lt;/span&gt; &lt;span class="n"&gt;IActionResult&lt;/span&gt; &lt;span class="nf"&gt;GetProducts&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt;
    &lt;span class="p"&gt;{&lt;/span&gt;
        &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="nf"&gt;Ok&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="k"&gt;new&lt;/span&gt;&lt;span class="p"&gt;[]&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="s"&gt;"Laptop"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s"&gt;"Mobile"&lt;/span&gt; &lt;span class="p"&gt;});&lt;/span&gt;
    &lt;span class="p"&gt;}&lt;/span&gt;

    &lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="nf"&gt;HttpGet&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s"&gt;"public"&lt;/span&gt;&lt;span class="p"&gt;)]&lt;/span&gt;
    &lt;span class="k"&gt;public&lt;/span&gt; &lt;span class="n"&gt;IActionResult&lt;/span&gt; &lt;span class="nf"&gt;GetPublicInformation&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt;
    &lt;span class="p"&gt;{&lt;/span&gt;
        &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="nf"&gt;Ok&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s"&gt;"This endpoint is not rate limited."&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
    &lt;span class="p"&gt;}&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Only &lt;code&gt;GET /api/products&lt;/code&gt; is rate limited.&lt;/p&gt;




&lt;h1&gt;
  
  
  Apply rate limiting to all controllers
&lt;/h1&gt;

&lt;p&gt;Remove &lt;code&gt;[EnableRateLimiting]&lt;/code&gt; from the controller and change endpoint mapping:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight csharp"&gt;&lt;code&gt;&lt;span class="n"&gt;app&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;MapControllers&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt;
   &lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;RequireRateLimiting&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s"&gt;"FixedPolicy"&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Now the policy applies to all controller endpoints.&lt;/p&gt;




&lt;h1&gt;
  
  
  Customize the &lt;code&gt;429&lt;/code&gt; response
&lt;/h1&gt;

&lt;p&gt;A meaningful response helps API clients understand why their request failed.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight csharp"&gt;&lt;code&gt;&lt;span class="n"&gt;builder&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;Services&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;AddRateLimiter&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;options&lt;/span&gt; &lt;span class="p"&gt;=&amp;gt;&lt;/span&gt;
&lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="n"&gt;options&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;RejectionStatusCode&lt;/span&gt; &lt;span class="p"&gt;=&lt;/span&gt;
        &lt;span class="n"&gt;StatusCodes&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;Status429TooManyRequests&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

    &lt;span class="n"&gt;options&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;OnRejected&lt;/span&gt; &lt;span class="p"&gt;=&lt;/span&gt; &lt;span class="k"&gt;async&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;context&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;cancellationToken&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;=&amp;gt;&lt;/span&gt;
    &lt;span class="p"&gt;{&lt;/span&gt;
        &lt;span class="n"&gt;context&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;HttpContext&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;Response&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;ContentType&lt;/span&gt; &lt;span class="p"&gt;=&lt;/span&gt;
            &lt;span class="s"&gt;"application/json"&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

        &lt;span class="k"&gt;await&lt;/span&gt; &lt;span class="n"&gt;context&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;HttpContext&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;Response&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;WriteAsJsonAsync&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;
            &lt;span class="k"&gt;new&lt;/span&gt;
            &lt;span class="p"&gt;{&lt;/span&gt;
                &lt;span class="n"&gt;statusCode&lt;/span&gt; &lt;span class="p"&gt;=&lt;/span&gt; &lt;span class="m"&gt;429&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
                &lt;span class="n"&gt;message&lt;/span&gt; &lt;span class="p"&gt;=&lt;/span&gt; &lt;span class="s"&gt;"Too many requests. Please try again later."&lt;/span&gt;
            &lt;span class="p"&gt;},&lt;/span&gt;
            &lt;span class="n"&gt;cancellationToken&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
    &lt;span class="p"&gt;};&lt;/span&gt;

    &lt;span class="n"&gt;options&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;AddFixedWindowLimiter&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;
        &lt;span class="n"&gt;policyName&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s"&gt;"FixedPolicy"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
        &lt;span class="n"&gt;configureOptions&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;limiterOptions&lt;/span&gt; &lt;span class="p"&gt;=&amp;gt;&lt;/span&gt;
        &lt;span class="p"&gt;{&lt;/span&gt;
            &lt;span class="n"&gt;limiterOptions&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;PermitLimit&lt;/span&gt; &lt;span class="p"&gt;=&lt;/span&gt; &lt;span class="m"&gt;5&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
            &lt;span class="n"&gt;limiterOptions&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;Window&lt;/span&gt; &lt;span class="p"&gt;=&lt;/span&gt;
                &lt;span class="n"&gt;TimeSpan&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;FromSeconds&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="m"&gt;10&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;

            &lt;span class="n"&gt;limiterOptions&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;QueueLimit&lt;/span&gt; &lt;span class="p"&gt;=&lt;/span&gt; &lt;span class="m"&gt;0&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
            &lt;span class="n"&gt;limiterOptions&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;QueueProcessingOrder&lt;/span&gt; &lt;span class="p"&gt;=&lt;/span&gt;
                &lt;span class="n"&gt;QueueProcessingOrder&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;OldestFirst&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
        &lt;span class="p"&gt;});&lt;/span&gt;
&lt;span class="p"&gt;});&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Response after exceeding the limit:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight json"&gt;&lt;code&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"statusCode"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="mi"&gt;429&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"message"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"Too many requests. Please try again later."&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;






&lt;h1&gt;
  
  
  Disable rate limiting for an action
&lt;/h1&gt;

&lt;p&gt;An endpoint can be excluded using &lt;code&gt;[DisableRateLimiting]&lt;/code&gt;:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight csharp"&gt;&lt;code&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="nf"&gt;HttpGet&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s"&gt;"health"&lt;/span&gt;&lt;span class="p"&gt;)]&lt;/span&gt;
&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="n"&gt;DisableRateLimiting&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;
&lt;span class="k"&gt;public&lt;/span&gt; &lt;span class="n"&gt;IActionResult&lt;/span&gt; &lt;span class="nf"&gt;Health&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt;
&lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="nf"&gt;Ok&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s"&gt;"API is healthy."&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This can be useful for selected health-check or internal endpoints, but exclusions should be chosen carefully.&lt;/p&gt;




&lt;h1&gt;
  
  
  Important limitation of the simple example
&lt;/h1&gt;

&lt;p&gt;The named fixed-window policy shown above uses a shared limit for the protected endpoint. In most real applications, limits should be separated by:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;User ID&lt;/li&gt;
&lt;li&gt;Client IP address&lt;/li&gt;
&lt;li&gt;API key&lt;/li&gt;
&lt;li&gt;Subscription plan&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Otherwise, one busy client could consume the request quota and affect other clients.&lt;/p&gt;

&lt;p&gt;For example:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;User A → 100 requests per minute
User B → Separate 100 requests per minute
User C → Separate 100 requests per minute
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This is called &lt;strong&gt;partitioned rate limiting&lt;/strong&gt;.&lt;/p&gt;




&lt;h1&gt;
  
  
  Rate-limiting algorithms
&lt;/h1&gt;

&lt;p&gt;ASP.NET Core provides four main algorithms:&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Algorithm&lt;/th&gt;
&lt;th&gt;Purpose&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Fixed window&lt;/td&gt;
&lt;td&gt;Allows a fixed number of requests during fixed time blocks&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Sliding window&lt;/td&gt;
&lt;td&gt;Provides smoother control by dividing the window into segments&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Token bucket&lt;/td&gt;
&lt;td&gt;Permits controlled traffic bursts while tokens are available&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Concurrency&lt;/td&gt;
&lt;td&gt;Limits requests executing at the same time&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;For a basic Web API, &lt;strong&gt;fixed window&lt;/strong&gt; is the easiest starting point.&lt;/p&gt;

&lt;h2&gt;
  
  
  Key points
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;Rate limiting controls incoming API traffic.&lt;/li&gt;
&lt;li&gt;Rejected requests normally receive &lt;code&gt;429 Too Many Requests&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;Register services using &lt;code&gt;AddRateLimiter()&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;Enable middleware using &lt;code&gt;UseRateLimiter()&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;Create a policy such as &lt;code&gt;"FixedPolicy"&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;Apply it with &lt;code&gt;[EnableRateLimiting]&lt;/code&gt; or &lt;code&gt;RequireRateLimiting()&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;Use &lt;code&gt;[DisableRateLimiting]&lt;/code&gt; for carefully selected exceptions.&lt;/li&gt;
&lt;li&gt;Prefer per-user, per-IP or per-API-key limits in production.&lt;/li&gt;
&lt;li&gt;Load-test the chosen limits before deploying.&lt;/li&gt;
&lt;li&gt;Rate limiting supports security but does not replace proper DDoS protection.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;&lt;em&gt;More Articles Visit&lt;/em&gt;&lt;/strong&gt;: &lt;a href="https://jntech.in/Articles" rel="noopener noreferrer"&gt;https://jntech.in/Articles&lt;/a&gt;&lt;/p&gt;

</description>
      <category>webapi</category>
      <category>dotnet</category>
      <category>dotnetcore</category>
      <category>aspdotnet</category>
    </item>
    <item>
      <title>𝗨𝗻𝗱𝗲𝗿𝘀𝘁𝗮𝗻𝗱𝗶𝗻𝗴 𝗔𝗻𝗴𝘂𝗹𝗮𝗿 𝗙𝘂𝗻𝗱𝗮𝗺𝗲𝗻𝘁𝗮𝗹𝘀</title>
      <dc:creator>Syed Mohamed</dc:creator>
      <pubDate>Tue, 22 Sep 2026 03:55:33 +0000</pubDate>
      <link>https://dev.to/syed_mohamed/-5be0</link>
      <guid>https://dev.to/syed_mohamed/-5be0</guid>
      <description>&lt;p&gt;𝗔𝗻𝗴𝘂𝗹𝗮𝗿 𝗧𝘂𝘁𝗼𝗿𝗶𝗮𝗹 𝗦𝗲𝗿𝗶𝗲𝘀 – 𝗗𝗮𝘆 𝟭 | 𝗨𝗻𝗱𝗲𝗿𝘀𝘁𝗮𝗻𝗱𝗶𝗻𝗴 𝗔𝗻𝗴𝘂𝗹𝗮𝗿 𝗙𝘂𝗻𝗱𝗮𝗺𝗲𝗻𝘁𝗮𝗹𝘀&lt;/p&gt;

&lt;p&gt;I’m starting a 𝗱𝗮𝗶𝗹𝘆 𝗔𝗻𝗴𝘂𝗹𝗮𝗿 𝘁𝘂𝘁𝗼𝗿𝗶𝗮𝗹 𝘀𝗲𝗿𝗶𝗲𝘀 covering Angular concepts in a simple, practical, and interview-friendly way.&lt;/p&gt;

&lt;p&gt;Every day, I’ll share a new topic along with a 𝗣𝗗𝗙 𝗰𝗼𝗻𝘁𝗮𝗶𝗻𝗶𝗻𝗴 𝗲𝘅𝗽𝗹𝗮𝗻𝗮𝘁𝗶𝗼𝗻𝘀, 𝗱𝗶𝗮𝗴𝗿𝗮𝗺𝘀, 𝗸𝗲𝘆 𝗽𝗼𝗶𝗻𝘁𝘀, 𝗮𝗻𝗱 𝗲𝘅𝗮𝗺𝗽𝗹𝗲𝘀 for quick reference.&lt;/p&gt;

&lt;p&gt;𝗧𝗼𝗱𝗮𝘆’𝘀 𝘁𝗼𝗽𝗶𝗰: 𝗔𝗻𝗴𝘂𝗹𝗮𝗿 𝗙𝘂𝗻𝗱𝗮𝗺𝗲𝗻𝘁𝗮𝗹𝘀&lt;/p&gt;

&lt;p&gt;𝟭. 𝗪𝗵𝗮𝘁 𝗶𝘀 𝗔𝗻𝗴𝘂𝗹𝗮𝗿?&lt;br&gt;
Angular is a 𝗧𝘆𝗽𝗲𝗦𝗰𝗿𝗶𝗽𝘁-𝗯𝗮𝘀𝗲𝗱 𝘄𝗲𝗯 𝗳𝗿𝗮𝗺𝗲𝘄𝗼𝗿𝗸 for building modern, scalable, and maintainable web applications.&lt;br&gt;
𝟮. 𝗖𝗼𝗺𝗽𝗼𝗻𝗲𝗻𝘁𝘀 𝗶𝗻 𝗔𝗻𝗴𝘂𝗹𝗮𝗿&lt;br&gt;
Components are the 𝗯𝘂𝗶𝗹𝗱𝗶𝗻𝗴 𝗯𝗹𝗼𝗰𝗸𝘀 𝗼𝗳 𝗮𝗻 𝗔𝗻𝗴𝘂𝗹𝗮𝗿 𝗮𝗽𝗽𝗹𝗶𝗰𝗮𝘁𝗶𝗼𝗻. Each component manages a specific part of the UI and its behavior.&lt;br&gt;
𝟯. 𝗦𝗶𝗻𝗴𝗹𝗲 𝗣𝗮𝗴𝗲 𝗔𝗽𝗽𝗹𝗶𝗰𝗮𝘁𝗶𝗼𝗻 (𝗦𝗣𝗔)&lt;br&gt;
A SPA loads the application once and dynamically updates the required content without reloading the entire page during normal navigation.&lt;br&gt;
𝟰. 𝗧𝗼𝗽 𝗙𝗲𝗮𝘁𝘂𝗿𝗲𝘀 𝗼𝗳 𝗔𝗻𝗴𝘂𝗹𝗮𝗿&lt;br&gt;
Component-based architecture, Data Binding, Dependency Injection, Routing, Directives, Pipes, Forms, HttpClient, TypeScript support, and scalability.&lt;br&gt;
𝟱. 𝗔𝗻𝗴𝘂𝗹𝗮𝗿 𝘃𝘀 𝗝𝗮𝘃𝗮𝗦𝗰𝗿𝗶𝗽𝘁 𝘃𝘀 𝗧𝘆𝗽𝗲𝗦𝗰𝗿𝗶𝗽𝘁&lt;br&gt;
𝗝𝗮𝘃𝗮𝗦𝗰𝗿𝗶𝗽𝘁 → Programming language&lt;br&gt;
𝗧𝘆𝗽𝗲𝗦𝗰𝗿𝗶𝗽𝘁 → JavaScript with static typing and additional development-time features&lt;br&gt;
𝗔𝗻𝗴𝘂𝗹𝗮𝗿 → Web application framework primarily built around TypeScript&lt;br&gt;
𝟲. 𝗔𝗢𝗧 𝘃𝘀 𝗝𝗜𝗧 𝗖𝗼𝗺𝗽𝗶𝗹𝗮𝘁𝗶𝗼𝗻&lt;br&gt;
𝗔𝗢𝗧 (𝗔𝗵𝗲𝗮𝗱-𝗼𝗳-𝗧𝗶𝗺𝗲) → Compiles during the build process.&lt;br&gt;
𝗝𝗜𝗧 (𝗝𝘂𝘀𝘁-𝗶𝗻-𝗧𝗶𝗺𝗲) → Compiles at runtime in the browser.&lt;br&gt;
Modern Angular production builds use 𝗔𝗢𝗧 𝗯𝘆 𝗱𝗲𝗳𝗮𝘂𝗹𝘁.&lt;/p&gt;

&lt;p&gt;𝗖𝗼𝗺𝗽𝗼𝗻𝗲𝗻𝘁𝘀 → 𝗗𝗮𝘁𝗮 𝗕𝗶𝗻𝗱𝗶𝗻𝗴 → 𝗗𝗶𝗿𝗲𝗰𝘁𝗶𝘃𝗲𝘀 → 𝗣𝗶𝗽𝗲𝘀 → 𝗦𝗲𝗿𝘃𝗶𝗰𝗲𝘀 &amp;amp; 𝗗𝗲𝗽𝗲𝗻𝗱𝗲𝗻𝗰𝘆 𝗜𝗻𝗷𝗲𝗰𝘁𝗶𝗼𝗻 → 𝗥𝗼𝘂𝘁𝗶𝗻𝗴 → 𝗙𝗼𝗿𝗺𝘀 → 𝗥𝘅𝗝𝗦 &amp;amp; 𝗢𝗯𝘀𝗲𝗿𝘃𝗮𝗯𝗹𝗲𝘀 → 𝗛𝘁𝘁𝗽𝗖𝗹𝗶𝗲𝗻𝘁 → 𝗦𝗶𝗴𝗻𝗮𝗹𝘀 → 𝗔𝘂𝘁𝗵𝗲𝗻𝘁𝗶𝗰𝗮𝘁𝗶𝗼𝗻 → 𝗚𝘂𝗮𝗿𝗱𝘀 → 𝗜𝗻𝘁𝗲𝗿𝗰𝗲𝗽𝘁𝗼𝗿𝘀 → 𝗦𝘁𝗮𝗻𝗱𝗮𝗹𝗼𝗻𝗲 𝗔𝗿𝗰𝗵𝗶𝘁𝗲𝗰𝘁𝘂𝗿𝗲 → 𝗣𝗲𝗿𝗳𝗼𝗿𝗺𝗮𝗻𝗰𝗲 𝗮𝗻𝗱 𝗺𝗼𝗿𝗲.&lt;/p&gt;

&lt;p&gt;𝗜’𝘃𝗲 𝗮𝘁𝘁𝗮𝗰𝗵𝗲𝗱 𝘁𝗼𝗱𝗮𝘆’𝘀 𝗣𝗗𝗙 𝘄𝗶𝘁𝗵 𝗱𝗲𝘁𝗮𝗶𝗹𝗲𝗱 𝗻𝗼𝘁𝗲𝘀 𝗮𝗻𝗱 𝗱𝗶𝗮𝗴𝗿𝗮𝗺𝘀 𝗳𝗼𝗿 𝗿𝗲𝗳𝗲𝗿𝗲𝗻𝗰𝗲.&lt;/p&gt;

&lt;p&gt;If you are also learning Angular or preparing for frontend/full-stack interviews, 𝗳𝗲𝗲𝗹 𝗳𝗿𝗲𝗲 𝘁𝗼 𝗳𝗼𝗹𝗹𝗼𝘄 𝘁𝗵𝗲 𝘀𝗲𝗿𝗶𝗲𝘀.&lt;/p&gt;

&lt;p&gt;𝗧𝗵𝗿𝗼𝘂𝗴𝗵 𝘁𝗵𝗶𝘀 𝘀𝗲𝗿𝗶𝗲𝘀, I’ll focus not only on Angular syntax, but also on how Angular works, why each concept is required, where it is used in 𝗿𝗲𝗮𝗹-𝘄𝗼𝗿𝗹𝗱 𝗮𝗽𝗽𝗹𝗶𝗰𝗮𝘁𝗶𝗼𝗻𝘀, and the key points to know for interviews.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;More Articles&lt;/strong&gt;: &lt;a href="http://www.jntech.in" rel="noopener noreferrer"&gt;www.jntech.in&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;hashtag#Angular hashtag#Angular20 hashtag#TypeScript hashtag#JavaScript hashtag#DotNet hashtag#FullStackDevelopment hashtag#FrontendDevelopment hashtag#WebDevelopment hashtag#SoftwareEngineering hashtag#InterviewPreparation hashtag#LearningJourney&lt;/p&gt;

</description>
      <category>angular</category>
      <category>typescript</category>
      <category>node</category>
      <category>npm</category>
    </item>
    <item>
      <title>𝗔𝗦𝗣.𝗡𝗘𝗧 𝗪𝗲𝗯 𝗔𝗣𝗜 𝗦𝗲𝗿𝗶𝗲𝘀 | 𝗚𝗹𝗼𝗯𝗮𝗹 𝗘𝘅𝗰𝗲𝗽𝘁𝗶𝗼𝗻 𝗛𝗮𝗻𝗱𝗹𝗶𝗻𝗴 𝗶𝗻 𝗔𝗦𝗣.𝗡𝗘𝗧 𝗖𝗼𝗿𝗲 𝗪𝗲𝗯 𝗔𝗣𝗜</title>
      <dc:creator>Syed Mohamed</dc:creator>
      <pubDate>Wed, 16 Sep 2026 14:47:24 +0000</pubDate>
      <link>https://dev.to/syed_mohamed/--7jl</link>
      <guid>https://dev.to/syed_mohamed/--7jl</guid>
      <description>&lt;p&gt;𝗣𝗮𝗿𝘁 𝟰 | 𝗔𝗦𝗣.𝗡𝗘𝗧 𝗪𝗲𝗯 𝗔𝗣𝗜 𝗦𝗲𝗿𝗶𝗲𝘀 | 𝗚𝗹𝗼𝗯𝗮𝗹 𝗘𝘅𝗰𝗲𝗽𝘁𝗶𝗼𝗻 𝗛𝗮𝗻𝗱𝗹𝗶𝗻𝗴 𝗶𝗻 𝗔𝗦𝗣.𝗡𝗘𝗧 𝗖𝗼𝗿𝗲 𝗪𝗲𝗯 𝗔𝗣𝗜&lt;br&gt;
🚨 One unhandled exception can expose sensitive information and create an inconsistent experience for API consumers.&lt;/p&gt;

&lt;p&gt;That is why every production-ready ASP.NET Core Web API needs Global Exception Handling.&lt;/p&gt;

&lt;p&gt;Instead of adding 𝗿𝗲𝗽𝗲𝘁𝗶𝘁𝗶𝘃𝗲 try-catch 𝗯𝗹𝗼𝗰𝗸𝘀 inside every controller action, we can handle exceptions in one centralized place.&lt;/p&gt;

&lt;p&gt;𝗜𝗻 .𝗡𝗘𝗧 𝟴+, 𝘁𝗵𝗲 𝗿𝗲𝗰𝗼𝗺𝗺𝗲𝗻𝗱𝗲𝗱 𝗮𝗽𝗽𝗿𝗼𝗮𝗰𝗵 𝗶𝘀:&lt;br&gt;
✅ Implement IExceptionHandler&lt;br&gt;
✅ Register it using AddExceptionHandler()&lt;br&gt;
✅ Enable it using UseExceptionHandler()&lt;br&gt;
✅ Return consistent ProblemDetails responses&lt;br&gt;
✅ Log the complete exception internally&lt;/p&gt;

&lt;p&gt;𝗛𝗼𝘄 𝗱𝗼𝗲𝘀 𝗶𝘁 𝘄𝗼𝗿𝗸?&lt;br&gt;
1️⃣ The client sends an API request.&lt;br&gt;
2️⃣ The request passes through the exception-handling middleware.&lt;br&gt;
3️⃣ The controller calls the service and repository.&lt;br&gt;
4️⃣ If an unhandled exception occurs, it travels back through the pipeline.&lt;br&gt;
5️⃣ The global handler catches and logs it.&lt;br&gt;
6️⃣ The exception is mapped to the correct HTTP status code.&lt;br&gt;
7️⃣ A safe and consistent error response is returned.&lt;/p&gt;

&lt;p&gt;𝗖𝗼𝗺𝗺𝗼𝗻 𝗲𝘅𝗰𝗲𝗽𝘁𝗶𝗼𝗻 𝗺𝗮𝗽𝗽𝗶𝗻𝗴:&lt;br&gt;
🔹 𝗜𝗻𝘃𝗮𝗹𝗶𝗱 𝗶𝗻𝗽𝘂𝘁 → 400 Bad Request&lt;br&gt;
🔹 𝗔𝘂𝘁𝗵𝗲𝗻𝘁𝗶𝗰𝗮𝘁𝗶𝗼𝗻 𝗿𝗲𝗾𝘂𝗶𝗿𝗲𝗱 → 401 Unauthorized&lt;br&gt;
🔹 𝗣𝗲𝗿𝗺𝗶𝘀𝘀𝗶𝗼𝗻 𝗱𝗲𝗻𝗶𝗲𝗱 → 403 Forbidden&lt;br&gt;
🔹 𝗥𝗲𝘀𝗼𝘂𝗿𝗰𝗲 𝗻𝗼𝘁 𝗳𝗼𝘂𝗻𝗱 → 404 Not Found&lt;br&gt;
🔹 𝗗𝘂𝗽𝗹𝗶𝗰𝗮𝘁𝗲 𝗼𝗿 𝗰𝗼𝗻𝗰𝘂𝗿𝗿𝗲𝗻𝗰𝘆 𝗰𝗼𝗻𝗳𝗹𝗶𝗰𝘁 → 409 Conflict&lt;br&gt;
🔹 𝗕𝘂𝘀𝗶𝗻𝗲𝘀𝘀 𝘃𝗮𝗹𝗶𝗱𝗮𝘁𝗶𝗼𝗻 𝗳𝗮𝗶𝗹𝘂𝗿𝗲 → 422 Unprocessable Entity&lt;br&gt;
🔹 𝗘𝘅𝘁𝗲𝗿𝗻𝗮𝗹 𝘀𝗲𝗿𝘃𝗶𝗰𝗲 𝘁𝗶𝗺𝗲𝗼𝘂𝘁 → 504 Gateway Timeout&lt;br&gt;
🔹 𝗨𝗻𝗲𝘅𝗽𝗲𝗰𝘁𝗲𝗱 𝗲𝘅𝗰𝗲𝗽𝘁𝗶𝗼𝗻 → 500 Internal Server Error&lt;/p&gt;

&lt;p&gt;A standard error response can include:&lt;br&gt;
{&lt;br&gt;
  "title": "Resource not found",&lt;br&gt;
  "status": 404,&lt;br&gt;
  "detail": "Product with ID 100 was not found.",&lt;br&gt;
  "instance": "/api/products/100",&lt;br&gt;
  "traceId": "0HN7K2B8N98R2:00000001"&lt;br&gt;
}&lt;br&gt;
𝗧𝗵𝗲 traceId 𝗶𝘀 𝗲𝘀𝗽𝗲𝗰𝗶𝗮𝗹𝗹𝘆 𝘃𝗮𝗹𝘂𝗮𝗯𝗹𝗲 𝗶𝗻 𝗽𝗿𝗼𝗱𝘂𝗰𝘁𝗶𝗼𝗻. When a user reports an issue, the support team can use it to locate the related logs quickly.&lt;/p&gt;

&lt;p&gt;𝗞𝗲𝘆 𝗽𝗼𝗶𝗻𝘁𝘀:&lt;br&gt;
✅ Keep controllers clean and focused.&lt;br&gt;
✅ Log complete exception details on the server.&lt;br&gt;
✅ Return only safe messages to clients.&lt;br&gt;
✅ Never expose stack traces, SQL queries or connection strings.&lt;br&gt;
✅ Use custom exceptions for known business errors.&lt;br&gt;
✅ Do not return 500 for every exception.&lt;br&gt;
✅ Register the exception middleware early in the pipeline.&lt;br&gt;
✅ Remember: normal validation errors and unknown-route 404 responses are not necessarily exceptions.&lt;/p&gt;

&lt;p&gt;♻️ 𝗥𝗲𝗽𝗼𝘀𝘁 𝗶𝗳 𝘁𝗵𝗶𝘀 𝗵𝗲𝗹𝗽𝘀 𝗮𝗻𝗼𝘁𝗵𝗲𝗿 .𝗡𝗘𝗧 𝗱𝗲𝘃𝗲𝗹𝗼𝗽𝗲𝗿.&lt;/p&gt;

&lt;p&gt;𝗖𝗵𝗲𝗰𝗸 𝗼𝘂𝘁 𝘁𝗵𝗲 𝗹𝗶𝗻𝗸 𝗯𝗲𝗹𝗼𝘄 𝗳𝗼𝗿 𝗮 𝗱𝗲𝘁𝗮𝗶𝗹𝗲𝗱 𝗲𝘅𝗽𝗹𝗮𝗻𝗮𝘁𝗶𝗼𝗻 𝘄𝗶𝘁𝗵 𝗽𝗿𝗮𝗰𝘁𝗶𝗰𝗮𝗹 𝗲𝘅𝗮𝗺𝗽𝗹𝗲𝘀.👇&lt;br&gt;
&lt;a href="https://jntech.in/view/global-exception-handling-in-aspnet-core-web-api" rel="noopener noreferrer"&gt;https://jntech.in/view/global-exception-handling-in-aspnet-core-web-api&lt;/a&gt;&lt;/p&gt;

</description>
      <category>webapi</category>
      <category>dotnet</category>
      <category>aspdotnet</category>
      <category>csharp</category>
    </item>
    <item>
      <title>𝗔𝗻𝗴𝘂𝗹𝗮𝗿 𝗧𝘂𝘁𝗼𝗿𝗶𝗮𝗹 𝗦𝗲𝗿𝗶𝗲𝘀 – 𝗗𝗮𝘆 𝟭 | 𝗨𝗻𝗱𝗲𝗿𝘀𝘁𝗮𝗻𝗱𝗶𝗻𝗴 𝗔𝗻𝗴𝘂𝗹𝗮𝗿 𝗙𝘂𝗻𝗱𝗮𝗺𝗲𝗻𝘁𝗮𝗹𝘀</title>
      <dc:creator>Syed Mohamed</dc:creator>
      <pubDate>Sun, 06 Sep 2026 07:12:20 +0000</pubDate>
      <link>https://dev.to/syed_mohamed/--23ph</link>
      <guid>https://dev.to/syed_mohamed/--23ph</guid>
      <description>&lt;p&gt;I’m starting a 𝗱𝗮𝗶𝗹𝘆 𝗔𝗻𝗴𝘂𝗹𝗮𝗿 𝘁𝘂𝘁𝗼𝗿𝗶𝗮𝗹 𝘀𝗲𝗿𝗶𝗲𝘀 covering Angular concepts in a simple, practical, and interview-friendly way.&lt;/p&gt;

&lt;p&gt;Every day, I’ll share a new topic along with a 𝗣𝗗𝗙 𝗰𝗼𝗻𝘁𝗮𝗶𝗻𝗶𝗻𝗴 𝗲𝘅𝗽𝗹𝗮𝗻𝗮𝘁𝗶𝗼𝗻𝘀, 𝗱𝗶𝗮𝗴𝗿𝗮𝗺𝘀, 𝗸𝗲𝘆 𝗽𝗼𝗶𝗻𝘁𝘀, 𝗮𝗻𝗱 𝗲𝘅𝗮𝗺𝗽𝗹𝗲𝘀 for quick reference.&lt;/p&gt;

&lt;p&gt;𝗧𝗼𝗱𝗮𝘆’𝘀 𝘁𝗼𝗽𝗶𝗰: 𝗔𝗻𝗴𝘂𝗹𝗮𝗿 𝗙𝘂𝗻𝗱𝗮𝗺𝗲𝗻𝘁𝗮𝗹𝘀&lt;/p&gt;

&lt;p&gt;𝟭. 𝗪𝗵𝗮𝘁 𝗶𝘀 𝗔𝗻𝗴𝘂𝗹𝗮𝗿?&lt;br&gt;
Angular is a 𝗧𝘆𝗽𝗲𝗦𝗰𝗿𝗶𝗽𝘁-𝗯𝗮𝘀𝗲𝗱 𝘄𝗲𝗯 𝗳𝗿𝗮𝗺𝗲𝘄𝗼𝗿𝗸 for building modern, scalable, and maintainable web applications.&lt;br&gt;
𝟮. 𝗖𝗼𝗺𝗽𝗼𝗻𝗲𝗻𝘁𝘀 𝗶𝗻 𝗔𝗻𝗴𝘂𝗹𝗮𝗿&lt;br&gt;
Components are the 𝗯𝘂𝗶𝗹𝗱𝗶𝗻𝗴 𝗯𝗹𝗼𝗰𝗸𝘀 𝗼𝗳 𝗮𝗻 𝗔𝗻𝗴𝘂𝗹𝗮𝗿 𝗮𝗽𝗽𝗹𝗶𝗰𝗮𝘁𝗶𝗼𝗻. Each component manages a specific part of the UI and its behavior.&lt;br&gt;
𝟯. 𝗦𝗶𝗻𝗴𝗹𝗲 𝗣𝗮𝗴𝗲 𝗔𝗽𝗽𝗹𝗶𝗰𝗮𝘁𝗶𝗼𝗻 (𝗦𝗣𝗔)&lt;br&gt;
A SPA loads the application once and dynamically updates the required content without reloading the entire page during normal navigation.&lt;br&gt;
𝟰. 𝗧𝗼𝗽 𝗙𝗲𝗮𝘁𝘂𝗿𝗲𝘀 𝗼𝗳 𝗔𝗻𝗴𝘂𝗹𝗮𝗿&lt;br&gt;
Component-based architecture, Data Binding, Dependency Injection, Routing, Directives, Pipes, Forms, HttpClient, TypeScript support, and scalability.&lt;br&gt;
𝟱. 𝗔𝗻𝗴𝘂𝗹𝗮𝗿 𝘃𝘀 𝗝𝗮𝘃𝗮𝗦𝗰𝗿𝗶𝗽𝘁 𝘃𝘀 𝗧𝘆𝗽𝗲𝗦𝗰𝗿𝗶𝗽𝘁&lt;br&gt;
𝗝𝗮𝘃𝗮𝗦𝗰𝗿𝗶𝗽𝘁 → Programming language&lt;br&gt;
𝗧𝘆𝗽𝗲𝗦𝗰𝗿𝗶𝗽𝘁 → JavaScript with static typing and additional development-time features&lt;br&gt;
𝗔𝗻𝗴𝘂𝗹𝗮𝗿 → Web application framework primarily built around TypeScript&lt;br&gt;
𝟲. 𝗔𝗢𝗧 𝘃𝘀 𝗝𝗜𝗧 𝗖𝗼𝗺𝗽𝗶𝗹𝗮𝘁𝗶𝗼𝗻&lt;br&gt;
𝗔𝗢𝗧 (𝗔𝗵𝗲𝗮𝗱-𝗼𝗳-𝗧𝗶𝗺𝗲) → Compiles during the build process.&lt;br&gt;
𝗝𝗜𝗧 (𝗝𝘂𝘀𝘁-𝗶𝗻-𝗧𝗶𝗺𝗲) → Compiles at runtime in the browser.&lt;br&gt;
Modern Angular production builds use 𝗔𝗢𝗧 𝗯𝘆 𝗱𝗲𝗳𝗮𝘂𝗹𝘁.&lt;/p&gt;

&lt;p&gt;𝗖𝗼𝗺𝗽𝗼𝗻𝗲𝗻𝘁𝘀 → 𝗗𝗮𝘁𝗮 𝗕𝗶𝗻𝗱𝗶𝗻𝗴 → 𝗗𝗶𝗿𝗲𝗰𝘁𝗶𝘃𝗲𝘀 → 𝗣𝗶𝗽𝗲𝘀 → 𝗦𝗲𝗿𝘃𝗶𝗰𝗲𝘀 &amp;amp; 𝗗𝗲𝗽𝗲𝗻𝗱𝗲𝗻𝗰𝘆 𝗜𝗻𝗷𝗲𝗰𝘁𝗶𝗼𝗻 → 𝗥𝗼𝘂𝘁𝗶𝗻𝗴 → 𝗙𝗼𝗿𝗺𝘀 → 𝗥𝘅𝗝𝗦 &amp;amp; 𝗢𝗯𝘀𝗲𝗿𝘃𝗮𝗯𝗹𝗲𝘀 → 𝗛𝘁𝘁𝗽𝗖𝗹𝗶𝗲𝗻𝘁 → 𝗦𝗶𝗴𝗻𝗮𝗹𝘀 → 𝗔𝘂𝘁𝗵𝗲𝗻𝘁𝗶𝗰𝗮𝘁𝗶𝗼𝗻 → 𝗚𝘂𝗮𝗿𝗱𝘀 → 𝗜𝗻𝘁𝗲𝗿𝗰𝗲𝗽𝘁𝗼𝗿𝘀 → 𝗦𝘁𝗮𝗻𝗱𝗮𝗹𝗼𝗻𝗲 𝗔𝗿𝗰𝗵𝗶𝘁𝗲𝗰𝘁𝘂𝗿𝗲 → 𝗣𝗲𝗿𝗳𝗼𝗿𝗺𝗮𝗻𝗰𝗲 𝗮𝗻𝗱 𝗺𝗼𝗿𝗲.&lt;/p&gt;

&lt;p&gt;𝗜’𝘃𝗲 𝗮𝘁𝘁𝗮𝗰𝗵𝗲𝗱 𝘁𝗼𝗱𝗮𝘆’𝘀 𝗣𝗗𝗙 𝘄𝗶𝘁𝗵 𝗱𝗲𝘁𝗮𝗶𝗹𝗲𝗱 𝗻𝗼𝘁𝗲𝘀 𝗮𝗻𝗱 𝗱𝗶𝗮𝗴𝗿𝗮𝗺𝘀 𝗳𝗼𝗿 𝗿𝗲𝗳𝗲𝗿𝗲𝗻𝗰𝗲.&lt;/p&gt;

&lt;p&gt;If you are also learning Angular or preparing for frontend/full-stack interviews, 𝗳𝗲𝗲𝗹 𝗳𝗿𝗲𝗲 𝘁𝗼 𝗳𝗼𝗹𝗹𝗼𝘄 𝘁𝗵𝗲 𝘀𝗲𝗿𝗶𝗲𝘀.&lt;/p&gt;

&lt;p&gt;𝗧𝗵𝗿𝗼𝘂𝗴𝗵 𝘁𝗵𝗶𝘀 𝘀𝗲𝗿𝗶𝗲𝘀, I’ll focus not only on Angular syntax, but also on how Angular works, why each concept is required, where it is used in 𝗿𝗲𝗮𝗹-𝘄𝗼𝗿𝗹𝗱 𝗮𝗽𝗽𝗹𝗶𝗰𝗮𝘁𝗶𝗼𝗻𝘀, and the key points to know for interviews.&lt;/p&gt;

&lt;p&gt;hashtag#Angular hashtag#Angular20 hashtag#TypeScript hashtag#JavaScript hashtag#DotNet hashtag#FullStackDevelopment hashtag#FrontendDevelopment hashtag#WebDevelopment hashtag#SoftwareEngineering hashtag#InterviewPreparation hashtag#LearningJourney&lt;a href="https://dev.tourl"&gt;&lt;/a&gt;&lt;/p&gt;

</description>
      <category>angular</category>
      <category>typescript</category>
      <category>javascript</category>
      <category>react</category>
    </item>
    <item>
      <title>What is an Azure DevOps Agent?</title>
      <dc:creator>Syed Mohamed</dc:creator>
      <pubDate>Sun, 12 Apr 2026 09:54:58 +0000</pubDate>
      <link>https://dev.to/syed_mohamed/what-is-an-azure-devops-agent-4bb6</link>
      <guid>https://dev.to/syed_mohamed/what-is-an-azure-devops-agent-4bb6</guid>
      <description>&lt;p&gt;𝗔𝘇𝘂𝗿𝗲 𝗗𝗲𝘃𝗢𝗽𝘀 𝗔𝗴𝗲𝗻𝘁 𝗮𝗻𝗱 𝗜𝘁𝘀 𝗧𝘆𝗽𝗲𝘀&lt;br&gt;
Ever wondered what actually runs your 𝗽𝗶𝗽𝗲𝗹𝗶𝗻𝗲𝘀 𝗶𝗻 𝗔𝘇𝘂𝗿𝗲 𝗗𝗲𝘃𝗢𝗽𝘀?&lt;/p&gt;

&lt;p&gt;That’s where 𝗔𝘇𝘂𝗿𝗲 𝗗𝗲𝘃𝗢𝗽𝘀 𝗔𝗴𝗲𝗻𝘁𝘀 come in.&lt;/p&gt;

&lt;p&gt;Think of an agent as the worker behind the scenes — the one that picks up your pipeline job, executes the steps, installs dependencies, builds your code, runs tests, and pushes deployments.&lt;/p&gt;

&lt;p&gt;Now, not all agents are the same. There are 𝗺𝗮𝗶𝗻𝗹𝘆 𝘁𝘄𝗼 𝘁𝘆𝗽𝗲𝘀:&lt;br&gt;
🔹 𝗠𝗶𝗰𝗿𝗼𝘀𝗼𝗳𝘁-𝗵𝗼𝘀𝘁𝗲𝗱 𝗮𝗴𝗲𝗻𝘁𝘀&lt;br&gt;
These are managed by Microsoft. You don’t need to set up anything — just select an image and run your pipeline. Perfect when you want simplicity and quick setup.&lt;/p&gt;

&lt;p&gt;🔹 𝗦𝗲𝗹𝗳-𝗵𝗼𝘀𝘁𝗲𝗱 𝗮𝗴𝗲𝗻𝘁𝘀&lt;br&gt;
These run on your own machines (VMs, servers, or even your local system). You have full control over configurations, installed tools, and network access. Ideal for custom requirements or secure environments.&lt;/p&gt;

&lt;p&gt;𝗖𝗵𝗼𝗼𝘀𝗶𝗻𝗴 𝗯𝗲𝘁𝘄𝗲𝗲𝗻 𝘁𝗵𝗲𝗺 𝗱𝗲𝗽𝗲𝗻𝗱𝘀 𝗼𝗻 𝘆𝗼𝘂𝗿 𝗻𝗲𝗲𝗱:&lt;br&gt;
• 𝗪𝗮𝗻𝘁 𝘇𝗲𝗿𝗼 𝗺𝗮𝗶𝗻𝘁𝗲𝗻𝗮𝗻𝗰𝗲? 𝗚𝗼 𝘄𝗶𝘁𝗵 𝗠𝗶𝗰𝗿𝗼𝘀𝗼𝗳𝘁-𝗵𝗼𝘀𝘁𝗲𝗱&lt;br&gt;
• 𝗡𝗲𝗲𝗱 𝗰𝗼𝗻𝘁𝗿𝗼𝗹 𝗼𝗿 𝗮𝗰𝗰𝗲𝘀𝘀 𝘁𝗼 𝗽𝗿𝗶𝘃𝗮𝘁𝗲 𝗿𝗲𝘀𝗼𝘂𝗿𝗰𝗲𝘀? 𝗦𝗲𝗹𝗳-𝗵𝗼𝘀𝘁𝗲𝗱 𝗶𝘀 𝘁𝗵𝗲 𝘄𝗮𝘆&lt;/p&gt;

&lt;p&gt;At the end of the day, no agent = no pipeline execution.&lt;/p&gt;

&lt;p&gt;If you're learning Azure DevOps, understanding agents is a game changer &lt;/p&gt;

&lt;p&gt;𝗧𝗵𝗲 𝗰𝗼𝗺𝗽𝗹𝗲𝘁𝗲 𝗮𝗿𝘁𝗶𝗰𝗹𝗲 𝗶𝘀 𝗮𝘃𝗮𝗶𝗹𝗮𝗯𝗹𝗲 𝗶𝗻 𝗺𝘆 𝗣𝗼𝗿𝘁𝗳𝗼𝗹𝗶𝗼 𝘂𝗻𝗱𝗲𝗿 𝘁𝗵𝗲 𝗔𝗿𝘁𝗶𝗰𝗹𝗲𝘀 𝘀𝗲𝗰𝘁𝗶𝗼𝗻:&lt;a href="https://www.youtube.com/watch?v=2fPgEK_anlo" rel="noopener noreferrer"&gt;https://www.youtube.com/watch?v=2fPgEK_anlo&lt;/a&gt;&lt;/p&gt;

</description>
      <category>azure</category>
      <category>devops</category>
      <category>agents</category>
      <category>cicd</category>
    </item>
    <item>
      <title>Upload &amp; Download Files in Azure Blob Storage using C# (Full Tutorial) | Syed Cloud Tech</title>
      <dc:creator>Syed Mohamed</dc:creator>
      <pubDate>Sat, 04 Apr 2026 02:45:00 +0000</pubDate>
      <link>https://dev.to/syed_mohamed/upload-download-files-in-azure-blob-storage-using-c-full-tutorial-syed-cloud-tech-4pap</link>
      <guid>https://dev.to/syed_mohamed/upload-download-files-in-azure-blob-storage-using-c-full-tutorial-syed-cloud-tech-4pap</guid>
      <description>&lt;p&gt;𝗨𝗽𝗹𝗼𝗮𝗱 &amp;amp; 𝗗𝗼𝘄𝗻𝗹𝗼𝗮𝗱 𝗙𝗶𝗹𝗲𝘀 𝗶𝗻 𝗔𝘇𝘂𝗿𝗲 𝗕𝗹𝗼𝗯 𝗦𝘁𝗼𝗿𝗮𝗴𝗲 𝘂𝘀𝗶𝗻𝗴 𝗖# &lt;br&gt;
Working with files in the cloud is something every developer eventually needs to master—and 𝗔𝘇𝘂𝗿𝗲 𝗕𝗹𝗼𝗯 𝗦𝘁𝗼𝗿𝗮𝗴𝗲 makes it incredibly powerful and scalable.&lt;/p&gt;

&lt;p&gt;Recently, I explored how to 𝘂𝗽𝗹𝗼𝗮𝗱 𝗮𝗻𝗱 𝗱𝗼𝘄𝗻𝗹𝗼𝗮𝗱 𝗳𝗶𝗹𝗲𝘀 𝘂𝘀𝗶𝗻𝗴 𝗖# 𝘄𝗶𝘁𝗵 𝗔𝘇𝘂𝗿𝗲 𝗕𝗹𝗼𝗯 𝗦𝘁𝗼𝗿𝗮𝗴𝗲, and it’s surprisingly straightforward once you understand the flow.&lt;/p&gt;

&lt;p&gt;You basically:&lt;br&gt;
• 𝗖𝗼𝗻𝗻𝗲𝗰𝘁 𝘂𝘀𝗶𝗻𝗴 𝘁𝗵𝗲 𝘀𝘁𝗼𝗿𝗮𝗴𝗲 𝗮𝗰𝗰𝗼𝘂𝗻𝘁 𝗰𝗼𝗻𝗻𝗲𝗰𝘁𝗶𝗼𝗻 𝘀𝘁𝗿𝗶𝗻𝗴&lt;br&gt;
• 𝗪𝗼𝗿𝗸 𝘄𝗶𝘁𝗵 𝗰𝗼𝗻𝘁𝗮𝗶𝗻𝗲𝗿𝘀 𝗮𝗻𝗱 𝗯𝗹𝗼𝗯𝘀&lt;br&gt;
• 𝗨𝘀𝗲 𝘁𝗵𝗲 𝗔𝘇𝘂𝗿𝗲 𝗦𝗗𝗞 𝘁𝗼 𝘂𝗽𝗹𝗼𝗮𝗱 𝗮𝗻𝗱 𝗱𝗼𝘄𝗻𝗹𝗼𝗮𝗱 𝗳𝗶𝗹𝗲𝘀 𝘀𝗲𝗮𝗺𝗹𝗲𝘀𝘀𝗹𝘆&lt;/p&gt;

&lt;p&gt;What I found interesting is how clean the .NET SDK is—you can handle large files, manage storage efficiently, and integrate it easily into real-world applications.&lt;/p&gt;

&lt;p&gt;If you're a .𝗡𝗘𝗧 𝗱𝗲𝘃𝗲𝗹𝗼𝗽𝗲𝗿 or getting started with 𝗔𝘇𝘂𝗿𝗲, this is definitely a must-learn skill. It’s widely used in real-time applications like document storage, media handling, backups, and more.&lt;/p&gt;

&lt;p&gt;I’ve put together a full tutorial where I walk through everything step by step with practical examples.&lt;/p&gt;

&lt;p&gt;🎥 You can check out the complete video on my YouTube channel 𝗦𝘆𝗲𝗱 𝗖𝗹𝗼𝘂𝗱 𝗧𝗲𝗰𝗵 for a detailed explanation.&lt;/p&gt;

&lt;p&gt;𝗘𝘅𝗽𝗹𝗼𝗿𝗲 𝘁𝗵𝗲 𝗙𝘂𝗹𝗹 𝗩𝗶𝗱𝗲𝗼:&lt;a href="https://youtu.be/0HWaJsHf8v0" rel="noopener noreferrer"&gt;https://youtu.be/0HWaJsHf8v0&lt;/a&gt;&lt;/p&gt;

&lt;h1&gt;
  
  
  Azure #AzureBlobStorage #CSharp #DotNet #CloudComputing #AzureStorage #Programming #Developers #TechLearning #SoftwareDevelopment #MicrosoftAzure
&lt;/h1&gt;

</description>
      <category>azure</category>
      <category>googlecloud</category>
      <category>csharp</category>
      <category>dotnet</category>
    </item>
    <item>
      <title>Azure Key Vault Explained | Secure Secrets, Keys &amp; Certificates</title>
      <dc:creator>Syed Mohamed</dc:creator>
      <pubDate>Fri, 03 Apr 2026 07:13:01 +0000</pubDate>
      <link>https://dev.to/syed_mohamed/azure-key-vault-explained-secure-secrets-keys-certificates-33ii</link>
      <guid>https://dev.to/syed_mohamed/azure-key-vault-explained-secure-secrets-keys-certificates-33ii</guid>
      <description>&lt;p&gt;When working with applications in Azure, one of the biggest challenges is managing sensitive data like API keys, connection strings, certificates, and passwords. Storing them directly in code or config files? Risky.&lt;/p&gt;

&lt;p&gt;That’s where Azure Key Vault comes in.&lt;/p&gt;

&lt;p&gt;It provides a centralized and secure way to store and control access to:&lt;/p&gt;

&lt;p&gt;Secrets (passwords, connection strings)&lt;br&gt;
Keys (encryption keys)&lt;br&gt;
Certificates (SSL/TLS)&lt;/p&gt;

&lt;p&gt;What I really like about Key Vault:&lt;br&gt;
✔ Tight integration with Azure services&lt;br&gt;
✔ Role-based access control (RBAC)&lt;br&gt;
✔ Managed Identity support (no hardcoding credentials!)&lt;br&gt;
✔ Audit logs for better security tracking&lt;/p&gt;

&lt;p&gt;Instead of worrying about "where to store secrets", you can focus on building your application while Azure takes care of securing them.&lt;/p&gt;

&lt;p&gt;If you're building cloud applications, learning Key Vault is a must-have skill — not just for developers, but also for DevOps engineers.&lt;/p&gt;

&lt;p&gt;👉 I’ve explained Azure Key Vault in a simple way in my latest video on my YouTube channel Syed Cloud Tech. Feel free to check it out here.&lt;br&gt;
&lt;a href="https://www.youtube.com/watch?v=FV8ZyfUpMjM" rel="noopener noreferrer"&gt;https://www.youtube.com/watch?v=FV8ZyfUpMjM&lt;/a&gt;&lt;/p&gt;

&lt;h1&gt;
  
  
  Azure #CloudSecurity #AzureKeyVault #DevOps #CloudComputing #MicrosoftAzure #Security #Developers #Learning #Tech
&lt;/h1&gt;

</description>
      <category>azure</category>
      <category>microsoft</category>
      <category>webapi</category>
      <category>secret</category>
    </item>
    <item>
      <title>File Access Modifier in C# with Examples (C# 11 Guide)</title>
      <dc:creator>Syed Mohamed</dc:creator>
      <pubDate>Thu, 26 Mar 2026 08:43:43 +0000</pubDate>
      <link>https://dev.to/syed_mohamed/file-access-modifier-in-c-with-examples-c-11-guide-3809</link>
      <guid>https://dev.to/syed_mohamed/file-access-modifier-in-c-with-examples-c-11-guide-3809</guid>
      <description>&lt;p&gt;&lt;strong&gt;More .NET related Articles:&lt;/strong&gt; &lt;a href="https://jntech.in/Articles" rel="noopener noreferrer"&gt;https://jntech.in/Articles&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;File Access Modifier in C# – Why It Exists and When to Use It&lt;/strong&gt;&lt;br&gt;
The Problem&lt;br&gt;
In real projects, we often create helper classes that are only needed inside one file.&lt;/p&gt;

&lt;p&gt;If we use internal, those classes become accessible across the entire project. This can lead to:&lt;/p&gt;

&lt;p&gt;Accidental usage&lt;br&gt;
Poor code organization&lt;br&gt;
Tight coupling between files&lt;br&gt;
So the question is:&lt;br&gt;
How do we restrict a class to just one file?&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;The Solution&lt;/strong&gt;&lt;br&gt;
C# introduced the file access modifier.&lt;br&gt;
It allows you to define a class that is:&lt;/p&gt;

&lt;p&gt;Accessible only within the same file&lt;br&gt;
Completely hidden from other files&lt;br&gt;
This gives better control over your code and improves encapsulation.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight csharp"&gt;&lt;code&gt;&lt;span class="n"&gt;file&lt;/span&gt; &lt;span class="k"&gt;class&lt;/span&gt; &lt;span class="nc"&gt;DataFormatter&lt;/span&gt;
&lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="k"&gt;public&lt;/span&gt; &lt;span class="kt"&gt;string&lt;/span&gt; &lt;span class="nf"&gt;Format&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="kt"&gt;string&lt;/span&gt; &lt;span class="n"&gt;data&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
    &lt;span class="p"&gt;{&lt;/span&gt;
        &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="n"&gt;data&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;Trim&lt;/span&gt;&lt;span class="p"&gt;();&lt;/span&gt;
    &lt;span class="p"&gt;}&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;

&lt;span class="k"&gt;public&lt;/span&gt; &lt;span class="k"&gt;class&lt;/span&gt; &lt;span class="nc"&gt;DataService&lt;/span&gt;
&lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="k"&gt;public&lt;/span&gt; &lt;span class="k"&gt;void&lt;/span&gt; &lt;span class="nf"&gt;Execute&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt;
    &lt;span class="p"&gt;{&lt;/span&gt;
        &lt;span class="kt"&gt;var&lt;/span&gt; &lt;span class="n"&gt;formatter&lt;/span&gt; &lt;span class="p"&gt;=&lt;/span&gt; &lt;span class="k"&gt;new&lt;/span&gt; &lt;span class="nf"&gt;DataFormatter&lt;/span&gt;&lt;span class="p"&gt;();&lt;/span&gt;
        &lt;span class="n"&gt;Console&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;WriteLine&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;formatter&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;Format&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s"&gt;"  sample  "&lt;/span&gt;&lt;span class="p"&gt;));&lt;/span&gt;
    &lt;span class="p"&gt;}&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Note: The file access modifier restricts a class so that it is accessible only within the same source file. Multiple classes inside the same file can use it, but it cannot be accessed from another file, even within the same project. It is mainly used for helper classes and provides better encapsulation than internal.&lt;/p&gt;

&lt;p&gt;Can we use file inside another class?&lt;/p&gt;

&lt;p&gt;No. We cannot use file for nested classes&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight csharp"&gt;&lt;code&gt;&lt;span class="k"&gt;public&lt;/span&gt; &lt;span class="k"&gt;class&lt;/span&gt; &lt;span class="nc"&gt;Outer&lt;/span&gt;
&lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="n"&gt;file&lt;/span&gt; &lt;span class="k"&gt;class&lt;/span&gt; &lt;span class="nc"&gt;Inner&lt;/span&gt;  &lt;span class="c1"&gt;// Not allowed&lt;/span&gt;
    &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="p"&gt;}&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Key Points about file Access Modifier in C#&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;General Rules&lt;/strong&gt;&lt;br&gt;
file restricts a type to only the same source file&lt;br&gt;
Introduced in C# 11&lt;br&gt;
Works only with top-level types&lt;br&gt;
Cannot be used inside another class (no nested file types)&lt;br&gt;
Supported Types&lt;br&gt;
You can use file with:&lt;/p&gt;

&lt;p&gt;file class&lt;br&gt;
file struct&lt;br&gt;
file interface&lt;br&gt;
file record&lt;br&gt;
Example:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight csharp"&gt;&lt;code&gt;&lt;span class="n"&gt;file&lt;/span&gt; &lt;span class="k"&gt;struct&lt;/span&gt; &lt;span class="nc"&gt;MyStruct&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt;
&lt;span class="n"&gt;file&lt;/span&gt; &lt;span class="k"&gt;interface&lt;/span&gt; &lt;span class="nc"&gt;IHelper&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Inheritance Rules&lt;/strong&gt;&lt;br&gt;
A file class can inherit from another class (if accessible)&lt;br&gt;
file class Base { }&lt;/p&gt;

&lt;p&gt;file class Derived : Base  // Allowed (same file)&lt;br&gt;
{&lt;br&gt;
}&lt;br&gt;
Cannot inherit a file class from another file.  Because it is not visible&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Interface Implementation&lt;/strong&gt;&lt;br&gt;
file classes can implement interfaces&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight csharp"&gt;&lt;code&gt;&lt;span class="n"&gt;file&lt;/span&gt; &lt;span class="k"&gt;interface&lt;/span&gt; &lt;span class="nc"&gt;IHelper&lt;/span&gt;
&lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="k"&gt;void&lt;/span&gt; &lt;span class="nf"&gt;DoWork&lt;/span&gt;&lt;span class="p"&gt;();&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;

&lt;span class="n"&gt;file&lt;/span&gt; &lt;span class="k"&gt;class&lt;/span&gt; &lt;span class="nc"&gt;Helper&lt;/span&gt; &lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;IHelper&lt;/span&gt;
&lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="k"&gt;public&lt;/span&gt; &lt;span class="k"&gt;void&lt;/span&gt; &lt;span class="nf"&gt;DoWork&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Works only within the same file&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Real Usage Scenarios&lt;/strong&gt;&lt;br&gt;
Helper classes used only in one file&lt;br&gt;
Utility logic tightly coupled to a feature&lt;br&gt;
Avoiding accidental usage across project&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Limitations&lt;/strong&gt;&lt;br&gt;
Cannot be used for:&lt;br&gt;
Nested classes&lt;br&gt;
Members (methods, properties, fields)&lt;br&gt;
Only applies to types, not methods or variables&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Best Practice&lt;/strong&gt;&lt;br&gt;
Use file when:&lt;br&gt;
The class is not reusable&lt;br&gt;
Logic should stay in one file&lt;br&gt;
You want strong encapsulation&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Conclusion&lt;/strong&gt;&lt;br&gt;
The file access modifier is a simple but powerful feature in C# that helps you control how your code is used. By restricting a class, struct, or interface to a single file, it ensures that internal logic stays exactly where it belongs.&lt;/p&gt;

&lt;p&gt;It is especially useful when you are working with helper classes or feature-specific logic that should not be exposed to the rest of the project. Compared to internal, it provides a stricter level of encapsulation, which helps avoid accidental usage and keeps your codebase clean.&lt;/p&gt;

&lt;p&gt;From a design perspective, using file encourages better organization and makes your intent clear to other developers. When someone reads your code, they immediately understand that certain types are meant to be used only within that file.&lt;/p&gt;

&lt;p&gt;In short, the file modifier is a great tool for writing more maintainable, readable, and well-structured applications.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;More .NET related Articles:&lt;/strong&gt; &lt;a href="https://jntech.in/Articles" rel="noopener noreferrer"&gt;https://jntech.in/Articles&lt;/a&gt;&lt;/p&gt;

</description>
      <category>csharp</category>
      <category>dotnet</category>
      <category>webapi</category>
      <category>dotnetcore</category>
    </item>
    <item>
      <title>What’s New in C# 14: Exploring the Latest Features in .NET 10</title>
      <dc:creator>Syed Mohamed</dc:creator>
      <pubDate>Wed, 11 Mar 2026 05:25:08 +0000</pubDate>
      <link>https://dev.to/syed_mohamed/whats-new-in-c-14-exploring-the-latest-features-in-net-10-4cb0</link>
      <guid>https://dev.to/syed_mohamed/whats-new-in-c-14-exploring-the-latest-features-in-net-10-4cb0</guid>
      <description>&lt;p&gt;🔗 𝗙𝘂𝗹𝗹 𝗮𝗿𝘁𝗶𝗰𝗹𝗲 𝗿𝗲𝗹𝗮𝘁𝗲𝗱 𝘁𝗼 𝘁𝗵𝗶𝘀 𝗽𝗼𝘀𝘁: &lt;a href="https://jntech.in/view/whats-new-in-csharp-14-exploring-the-latest-features-in-net-10" rel="noopener noreferrer"&gt;https://jntech.in/view/whats-new-in-csharp-14-exploring-the-latest-features-in-net-10&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;C# continues to evolve with every .NET release, and 𝗖# 𝟭𝟰 (𝘄𝗶𝘁𝗵 .𝗡𝗘𝗧 𝟭𝟬) introduces several improvements that make the language cleaner, more flexible, and easier for developers to work with.&lt;/p&gt;

&lt;p&gt;Here are some of the 𝗻𝗲𝘄 𝗳𝗲𝗮𝘁𝘂𝗿𝗲𝘀 𝗶𝗻𝘁𝗿𝗼𝗱𝘂𝗰𝗲𝗱 𝗶𝗻 𝗖# 𝟭𝟰:&lt;br&gt;
• 𝗘𝘅𝘁𝗲𝗻𝘀𝗶𝗼𝗻 𝗠𝗲𝗺𝗯𝗲𝗿𝘀 (𝗘𝘅𝘁𝗲𝗻𝘀𝗶𝗼𝗻 𝗕𝗹𝗼𝗰𝗸𝘀) — Allows grouping multiple extension methods and properties together for a specific type, improving code organization.&lt;/p&gt;

&lt;p&gt;• 𝗘𝘅𝘁𝗲𝗻𝘀𝗶𝗼𝗻 𝗣𝗿𝗼𝗽𝗲𝗿𝘁𝗶𝗲𝘀 — Enables adding property-like members to existing types without modifying the original class.&lt;/p&gt;

&lt;p&gt;• 𝗦𝘁𝗮𝘁𝗶𝗰 𝗘𝘅𝘁𝗲𝗻𝘀𝗶𝗼𝗻 𝗠𝗲𝗺𝗯𝗲𝗿𝘀 — Allows developers to extend static functionality of existing types using extensions.&lt;/p&gt;

&lt;p&gt;• 𝗣𝗿𝗶𝘃𝗮𝘁𝗲 𝗙𝗶𝗲𝗹𝗱𝘀 𝗶𝗻𝘀𝗶𝗱𝗲 𝗘𝘅𝘁𝗲𝗻𝘀𝗶𝗼𝗻 𝗕𝗹𝗼𝗰𝗸𝘀 — Extension blocks can now contain private fields used internally by extension members.&lt;/p&gt;

&lt;p&gt;• 𝗙𝗶𝗲𝗹𝗱-𝗯𝗮𝗰𝗸𝗲𝗱 𝗣𝗿𝗼𝗽𝗲𝗿𝘁𝗶𝗲𝘀 (field 𝗸𝗲𝘆𝘄𝗼𝗿𝗱) — Provides direct access to the compiler-generated backing field in auto-properties.&lt;/p&gt;

&lt;p&gt;• 𝗡𝘂𝗹𝗹-𝗰𝗼𝗻𝗱𝗶𝘁𝗶𝗼𝗻𝗮𝗹 𝗔𝘀𝘀𝗶𝗴𝗻𝗺𝗲𝗻𝘁 (?.= 𝗮𝗻𝗱 ?[]=) — Allows assignments to occur only when the object is not null, reducing repetitive null checks.&lt;/p&gt;

&lt;p&gt;• nameof 𝗦𝘂𝗽𝗽𝗼𝗿𝘁 𝗳𝗼𝗿 𝗨𝗻𝗯𝗼𝘂𝗻𝗱 𝗚𝗲𝗻𝗲𝗿𝗶𝗰 𝗧𝘆𝗽𝗲𝘀 — Enables using nameof with generic types without specifying type parameters.&lt;/p&gt;

&lt;p&gt;• 𝗜𝗺𝗽𝗹𝗶𝗰𝗶𝘁 𝗖𝗼𝗻𝘃𝗲𝗿𝘀𝗶𝗼𝗻𝘀 𝗳𝗼𝗿 Span 𝗮𝗻𝗱 ReadOnlySpan — Simplifies working with spans by allowing more automatic conversions.&lt;/p&gt;

&lt;p&gt;• 𝗣𝗮𝗿𝗮𝗺𝗲𝘁𝗲𝗿 𝗠𝗼𝗱𝗶𝗳𝗶𝗲𝗿𝘀 𝗶𝗻 𝗟𝗮𝗺𝗯𝗱𝗮 𝗘𝘅𝗽𝗿𝗲𝘀𝘀𝗶𝗼𝗻𝘀 — Lambdas now support modifiers like ref, in, and out.&lt;/p&gt;

&lt;p&gt;• 𝗨𝘀𝗲𝗿-𝗱𝗲𝗳𝗶𝗻𝗲𝗱 𝗖𝗼𝗺𝗽𝗼𝘂𝗻𝗱 𝗔𝘀𝘀𝗶𝗴𝗻𝗺𝗲𝗻𝘁 𝗢𝗽𝗲𝗿𝗮𝘁𝗼𝗿𝘀 — Custom types can now define operators such as +=, -=, etc.&lt;/p&gt;

&lt;p&gt;• 𝗣𝗮𝗿𝘁𝗶𝗮𝗹 𝗖𝗼𝗻𝘀𝘁𝗿𝘂𝗰𝘁𝗼𝗿𝘀 𝗮𝗻𝗱 𝗣𝗮𝗿𝘁𝗶𝗮𝗹 𝗘𝘃𝗲𝗻𝘁𝘀 — Extends partial member support to constructors and events.&lt;/p&gt;

&lt;p&gt;🔗 𝗙𝘂𝗹𝗹 𝗮𝗿𝘁𝗶𝗰𝗹𝗲 𝗿𝗲𝗹𝗮𝘁𝗲𝗱 𝘁𝗼 𝘁𝗵𝗶𝘀 𝗽𝗼𝘀𝘁: &lt;a href="https://jntech.in/articles/view/whats-new-in-csharp-14-exploring-the-latest-features-in-net-10" rel="noopener noreferrer"&gt;https://jntech.in/articles/view/whats-new-in-csharp-14-exploring-the-latest-features-in-net-10&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;📚 𝗠𝗼𝗿𝗲 .𝗡𝗘𝗧, 𝗖#, 𝗦𝗤𝗟 𝗔𝗿𝘁𝗶𝗰𝗹𝗲𝘀: &lt;a href="https://jntech.in/Articles" rel="noopener noreferrer"&gt;https://jntech.in/Articles&lt;/a&gt;&lt;/p&gt;

</description>
      <category>csharp</category>
      <category>dotnetcore</category>
      <category>dotnet</category>
      <category>net10</category>
    </item>
  </channel>
</rss>
