اشتراک‌ها
نوشتن اپ های Native برای موبایل

In the February 2016 issue of MSDN Magazine, I showed how to create a custom scripting language based on the Split-And-Merge algorithm for parsing mathematical expressions in C# (msdn.com/magazine/mt632273). I called my language Customizable Scripting in C#, or CSCS. Recently, I published an E-book that provided more details about creating a custom language (bit.ly/2yijCod). Creating your own scripting language might not initially seem to be particularly useful, even though there are some interesting applications of it (for example, game cheating). I also found some applications in Unity programming.

نوشتن اپ های Native برای موبایل
اشتراک‌ها
روش‌های مقابله با مشکل امنیتی Mass Assignment در ASP.NET Core
  • Use BindAttribute on the action method 
  • Use [Editable] or [BindNever] on the model 
  • Use two different models 
  • Use a base class 
  • Use ModelMetadataTypeAttribute 
  • Explicit binding via TryUpdateModelAsync<> 

This was a very quick run down of some of the options available to you to prevent mass assignment. Which approach you take is up to you, though I would definitely suggest using one of the latter 2-model approaches. There are other options too, such as doing explicit binding via TryUpdateModelAsync<> but the options I've shown represent some of the most common approaches. Whatever you do, don't just blindly bind your view models if you have properties that should not be edited by a user, or you could be in for a nasty surprise.

And whatever you do, don't bind directly to your EntityFramework models. Pretty please. 

روش‌های مقابله با مشکل امنیتی Mass Assignment در ASP.NET Core
اشتراک‌ها
مرورگرها از سال بعد دیگر TLS 1.0 و 1.1 را پشتیبانی نمی‌کنند

Safari, Firefox, Edge and Chrome are removing support for TLS 1.0 and 1.1 in March of 2020. If you manage websites, this means there’s less than a year to enable TLS 1.2 (and, ideally, 1.3) on your servers, otherwise all major browsers will display error pages, rather than the content your users were expecting to find. 

مرورگرها از سال بعد دیگر TLS 1.0 و 1.1 را پشتیبانی نمی‌کنند
اشتراک‌ها
رهانش نسخه نهایی ویژوال‌استدیو ۲۰۲۲، نگارش ۱۷.۱۱
  • Find the Code You’re Looking For: Enhanced search capabilities to help you quickly locate the code you need, even in the largest projects.
  • More Meaningful Code Reviews: Improvements to code review workflows, making it easier to spot potential issues and collaborate with your team.
  • Updates to pull request creation: Continual improvements to the pull request creation experience.
  • Familiar keyboard shortcuts: Some common keyboard shortcuts now match those in other popular IDEs.
  • AI-Generated Breakpoint Expressions: Automatically suggest breakpoints based on your code, helping you debug more efficiently.
  • Understand Your Symbols: Improved symbol recognition to ensure you get the most accurate suggestions.
  • Refined Suggestions: More precise and context-aware code completions, reducing the need for manual edits.
  • GitHub Copilot is even more secure: GitHub Copilot Business customers to prevent specified files or repositories from being used to inform code completion suggestions made by GitHub Copilot.

رهانش نسخه نهایی ویژوال‌استدیو ۲۰۲۲، نگارش ۱۷.۱۱
اشتراک‌ها
باید از View Componentها به جای Partial Viewها در ASP.NET Core استفاده کنید

Why use View Components and not Partial Views? The biggest reason is that when inserting a Partial View into a Razor page, all the ViewData associated with the calling View is automatically associated with the Partial View. This means that a Partial View may behave very differently on one Razor page than on another. With View Components, you control what gets shared to your View Components. 

باید از View Componentها به جای Partial Viewها در ASP.NET Core استفاده کنید