A simple yet organized project template for building ASP.NET Core APIs in .NET Core 3.1
Tools and Frameworks Used
- .NET Core 3.1
- ASP.NET Core - For building RESTful APIs
- Dapper - For data access.
- AutoMapper - For mapping entity models to DTOs.
- AutoWrapper - For handling request Exceptions and consistent HTTP response format.
- AutoWrapper.Server - For unwrapping the Result attribute from AutoWrapper's ApiResponse output.
- Swashbuckle.AspNetCore - For securing API documentation.
- FluentValidation.AspNetCore - For Model validations
- Serilog.AspNetCore - For logging capabilities
- IdentityServer4.AccessTokenValidation - For JWT Authentication handling
- Microsoft.Extensions.Http.Polly - For handling HttpClient Resilience and Transient fault-handling
- AspNetCoreRateLimit - For controlling the rate of requests that clients can make to an external API based on IP address or client ID.
- AspNetCore.Diagnostics.HealthChecks - For performing health checks
- Microsoft.AspNetCore.Diagnostics.HealthChecks - For getting the results of Health Checks in the application
- AspNetCore.HealthChecks.UI - For Health Status visualization
- xUnit and Moq - For unit testing.
Here’s a summary of what’s new in this preview release:
Servers & middleware
Antiforgery middleware
API authoring
Antiforgery integration for minimal APIs
Native AOT
Request Delegate Generator supports interceptors feature
Full TrimMode is used for web projects compiled with trimming enabled
WebApplication.CreateEmptyBuilder
Blazor
Antiforgery integration
Server-side form handling improvements
Auto render mode
Register root-level cascading values
Improved integration of interactive components with server-side rendering
New EmptyContent parameter for Virtualize
Identity
New bearer token authentication handler
New API endpoints
Single page apps (SPA)
New Visual Studio templates
- Day One Keynote (Slides)
- Day Two Keynote
- What's New for Microsoft Silverlight and Microsoft Windows Presentation
Foundation (WPF) Developers in Microsoft Visual Studio 2010 - Semantic HTML and Unobtrusive JavaScript
- Design Fundamentals for Developers
- Microsoft Silverlight and Windows Presentation Foundation (WPF): Sharing
Skills and Code - Going Inside Microsoft Silverlight: Exploring the Core CLR
- Delivering Media with Internet Information Services 7 (IIS) Media
Services and Microsoft Silverlight - Shio O Totte: Using What You Know
- Building Data-Driven Scalable AJAX Web Pages
- Microsoft ASP.NET: Taking AJAX to the Next Level
- A Shot of Windows Live Messenger and a Pint of Microsoft Silverlight
- Automated User Interface (UI) Testing with Microsoft Visual Studio
Team System 2010 - There's a Little Scripter in All of Us: Building a Web App for the
Masses - Microsoft ASP.NET 4.0 Data Access: Patterns for Success with Web Forms
- Cascading Stylesheets
- Creating a "Next Generation" E-Commerce Experience
- Cloud Computing: What's in It for Me?
- Developing for Experience with 3 Heads
- Developing and Deploying Applications on Internet Information Services
(IIS) - Hiking Mt. Avalon
- Advance Your Design with UX Design Patterns
- Love the New Windows Live Messenger Web Toolkit for Social Websites
- Ten Ways to Ensure RIA Failure
- Using Dynamic Languages to Develop Microsoft Silverlight Applications
- Miss March and Other Distractions
- Caching REST with Windows Communication Foundation
- Designing the Windows 7 Desktop Experience
- Microsoft Silverlight Media End-to-End
- Optimizing Performance for Microsoft Expression Encoder
- Scaling a Rich Client to Half a Billion Users
- User Experience Design for Non-Designers
- Build Applications on the Microsoft Platform Using Eclipse, Java,
Ruby and PHP! - Customized Live Search for Web and Client Applications
- Building Microsoft Silverlight Controls
- Working across the Client Continuum
- Building a Rich Social Network Application
- Adding Microsoft Silverlight to Your Company's Skill Set
- Principles of Microsoft Silverlight Animation
- Oomph: A Microformat Toolkit
- Introducing the Microsoft Virtual Earth Silverlight Map Control CTP
- Delivering Ads to a Silverlight Media Player Application
- High-Speed RIA Development with the Microsoft Silverlight Toolkit
- Deep Zoom++ : Build Dynamic Deep Zoom Applications with Open Source
- See through the Clouds: Introduction to the Azure Services Platform
- Modeling RESTful Data Services: Present and Future
- Escaping Flatland in Application Design: Rich User Experiences
- Building High Performance Web Applications and Sites
- Sketch Flow: From Concept to Production
- Design Prototyping: Bringing Wireframes to Life
- Overview of Windows Azure
- A Website Named Desire
- Protecting Online Identities
- Web Form Design
- Simplifying Distributed Access Control with Microsoft .NET Services
- Software Entrepreneurs: Go Big with BizSpark
- How I Learned to Stop Worrying and Love the Microsoft ADO.NET Entity
Framework - Copyright Laws for Web Designers and Developers
- Effective Infographics with Interactivity
- State of the Art in Web Site Design on Microsoft SharePoint
- The Way of the Whiteboard: Persuading with Pictures
- Interaction Techniques Using the Wii Remote (and Other HCI Projects)
- Touch and Gesture Computing, What You Haven't Heard
- Enhancing Large Windows Media Platforms with Microsoft Silverlight
- The Future of Microsoft Expression Blend
- Exposing Web Content to a Global Audience Using Machine Translation
- Building Microsoft Silverlight Applications with Eclipse
(Slides) - Going Inside Microsoft Silverlight: Exploring the Core CLR
(Slides) - Web Development Using Microsoft Visual Studio: Now and in the Future
(Slides) - Building Amazing Business Centric Applications with Microsoft Silverlight 3
- Creating Media Content for Microsoft Silverlight Using Microsoft Expression
Encoder (Slides) - Design Prototyping: Bringing Wireframes to Life (Slides)
- Measuring Social Media Marketing (Slides)
- Mesh-Enabled Web Applications (Slides)
- .NET RIA Services - Building Data-Driven Applications with Microsoft
Silverlight and Microsoft ASP.NET (Slides) - Making XML Really, Really Easy with Microsoft Visual Basic 9
(Slides) - Building Accessible RIAs in Microsoft Silverlight
(Slides) - Integrating Microsoft Expression Blend with Adobe Creative Suite
(Slides) - Principles of Microsoft Silverlight Animation (Slides)
- Windows Mobile 6.5 Overview (Slides)
- How'd they do it? Real App. Real Code. Two Weeks. Nothing but .NET
- Building Web Applications with Windows Azure (Slides)
- Live Framework and Mesh Services: Live Services for Developers
(Slides) - Software Entrepreneurs: Go Big with BizSpark (Slides)
- Microsoft ASP.NET 4.0 : What's Next? (Slides)
- Building Out of Browser Experiences with Microsoft Silverlight 3
- The Microsoft Web Sandbox: An Open Source Framework for Developing
Secure Standards-Based Web Applications (Slides) - Enhancing Large Windows Media Platforms with Microsoft Silverlight
(Slides) - Microsoft Silverlight Media End-to-End (Slides)
- Improving UX through Application Lifecycle Management
(Slides) - Go Beyond Best Practices: Evolving Next Practices to Prosper in the
21st Century (Slides) - Creating Interactivity with Microsoft Expression Blend
(Slides) - See through the Clouds: Introduction to the Azure Services Platform
(Slides) - Overview of Windows Azure (Slides)
- What's New in Microsoft Silverlight 3 (Slides)
- the New Windows Live Messenger Web Toolkit for Social Websites
- Extending Your Brand to the Desktop with Windows 7 (Slides)
- RESTful
Services for the Programmable Web with Windows Communication Foundation
(Slides) - Securing Web Applications (Slides)
- How Razorfish Lights Up Brand with Microsoft SharePoint (Slides)
- Copyright Laws for Web Designers and Developers
- Improving Mobile Experiences with the Microsoft Mobile Device Browser
File - A Shot of Windows Live Messenger and a Pint of Microsoft Silverlight
(Slides) - Microsoft Silverlight Is Ready for Business (Slides)
- Exposing Web Content to a Global Audience Using Machine Translation
(Slides) - Search Engine Optimization (SEO) for Web Developers
- Five Killer Scenarios for the Windows Live Messenger Web Toolkit
(Slides) - Lighting Up Web and Client Applications with Microsoft Live Services
(Slides) - Scaling a Rich Client to Half a Billion Users (Slides)
- Windows Internet Explorer 8 in the Real World: How Is Internet Explorer
8 Used (Slides) - When Errors Happen: Debugging Microsoft Silverlight
(Slides) - Introducing the Microsoft Web Platform (Slides)
- Protecting Against Internet Service Abuse (Slides)
- Connecting Applications across Networks with Microsoft .NET Services
(Slides) - Microsoft Xbox "Lips" and "Fable II": Multi Channel Experiences
(Slides) - Windows Azure Storage (Slides)
- Sketch Flow: From Concept to Production (Slides)
- Consuming Web Services in Microsoft Silverlight 3
- A Website Named Desire
- The Microsoft Web Platform: Starring Internet Information Services
(IIS) and Your Application (Slides) - Microsoft ASP.NET: Taking AJAX to the Next Level
(Slides) - Using Microsoft ASP.NET MVC to Easily Extend a Web Site into the Mobile
Space (Slides) - Using Total Experience Design to Transform the Digital Building
(Slides) - Wireframes That Work: Designing (Rich Internet) Applications
(Slides) - Interactive Prototyping with DHTML
- Working across the Client Continuum (Slides)
- ASP.NET MVC: America's Next Top Model View Controller Framework
(Slides) - Microsoft Expression Web: No Platform Left Behind
(Slides) - Choosing between ASP.NET Web Forms and MVC (Slides)
- Customized Live Search for Web and Client Applications
(Slides) - Creating a Great Experience on Digg with Windows Internet Explorer 8
- C# for Designers (Slides)
- A Lap around Microsoft .NET Services (Slides)
- Building Scalable and Available Web Applications with Microsoft Project
Code Name "Velocity" (Slides) - Building an Optimized, Graphics-Intensive Application for Microsoft Silverlight
(Slides) - What's New in Microsoft SQL Data Services (Slides)
- What's New in Windows Presentation Foundation (WPF) 4 (Slides)
- A Lap around Windows Internet Explorer 8 (Slides)
- The Future of Microsoft Expression Blend (Slides)
- Running PHP on Microsoft Servers and Services (Slides)
- Delivering Media with Internet Information Services 7 (IIS) Media
Services and Microsoft Silverlight (Slides) - Deep Dive into Microsoft Silverlight Graphics (Slides)
- Microsoft ASP.NET Model View Controller (MVC): Ninja on Fire Black
Belt Tips (Slides) - Developing
RESTful Services and Clients with "M" (Slides) - User Experience Design Patterns for Business Applications with Microsoft
Silverlight 3 (Slides) - Using the Windows Azure Tools for Microsoft Visual Studio to Build
Cloud Services (Slides) - Standards for Aggregating Activity Feeds and Social Aggregation Services
- Offline
Network Detection in Microsoft Silverlight 3 (Slides) - File|New Company: Creating NerdDinner.com with Microsoft ASP.NET
Model View Controller (MVC)
سری کار با Web API
My road for the series is as follows,
RESTful Day #1: Enterprise level application architecture with Web APIs using Entity Framework, Generic Repository pattern and Unit of Work.
RESTful Day #2: Inversion of control using dependency injection in Web APIs using Unity Container and Bootstrapper.
RESTful Day #3: Resolve dependency of dependencies using Inversion of Control and dependency injection in Asp.net Web APIs with Unity Container and Managed Extensibility Framework (MEF).
RESTful Day #4: Custom URL Re-Writing/Routing using Attribute Routes in MVC 4 Web APIs.
RESTful Day #5: Basic Authentication and Token based custom Authorization in Web APIs using Action Filters.
RESTful Day #6: Request logging and Exception handing/logging in Web APIs using Action Filters, Exception Filters and nLog.
RESTful Day #7: Unit testing ASP.NET Web APIs controllers using nUnit.
RESTful Day #8: Extending OData support in ASP.NET Web APIs.
Professional REST API design with ASP.NET Core and WebAPI
This project is an example of lightweight and extensible infrastructure for building RESTful Web API with ASP.NET Core.
This example contains a number of tricks and techniques which I've learned while building APIs in ASP.NET Core.
Techniques and Features
- JWT Authentication
- Secure JWT using Encryption (JWE)
- Logging to File, Console and Database using Elmah & NLog
- Logging to sentry.io (Log Management System)
- Exception Handling using Custom Middleware
- Automatic Validation
- Standard API Resulting
- Dependency Injection using Autofac
- Map resources using AutoMapper
- Async/Await Best Practices
- Versioning Management
- Using Swagger (Swashbuckle)
- Auto Document Generator for Swagger
- Integrate Swagger and Versioning
- Integrate Swagger and JWT/OAuth Authentication
- Best Practices for Performance and Security
ترکیب Asp Core 3 Identity با JWT
اجرای دات نت در مروگر توسط Ooui
Earlier this year, Microsoft announced their support for Blazor, and now Frank A. Krueger has developed the Ooui library which allows C# or F# to be used to write applications that run in the browser. Ooui can target WASM, enabling Xamarin.Forms app to be deployed in web assembly and the result runs entirely in-browser without the need for an application server.