نظرات مطالب
ASP.NET MVC #17

عنوان خطا: The anti-forgery token could not be decrypted

جزئیات خطا

The anti-forgery token could not be decrypted. 
If this application is hosted by a Web Farm or cluster,
ensure that all machines are running the same version of ASP.NET Web Pages and
that the <machineKey> configuration specifies explicit encryption and validation keys. 
AutoGenerate cannot be used in a cluster

Description: An unhandled exception occurred during the execution of the current web request. 
Please review the stack trace for more information about the error and where it originated in the code.

Exception Details: System.Web.Mvc.HttpAntiForgeryException: 
The anti-forgery token could not be decrypted.
If this application is hosted by a Web Farm or cluster, 
ensure that all machines are running the same version of ASP.NET Web Pages and that the <machineKey> configuration 
specifies explicit encryption and validation keys. AutoGenerate cannot be used in a cluster.
شرایط  برنامه:  در زمان ذخیره سازی اطلاعات.(در Mvc دات نت فریم ورک 4.5 و Vs2013)

موارد مشابه در سایر انجمن‌ها : اینجا و اینجا و ...

نتیجه حاصله: درج MachinKey در WebConfig برای مثال:

<system.web>
  <machineKey validationKey="mykey" decryptionKey="myotherkey" validation="SHA1" decryption="AES" />
</system.web>
سوال: علت بروز خطا بر روی بعضی از سیستم‌ها چیست؟ چرا همیشه این خطا نمایش داده نمی‌شود. چرا پیغام نمی‌توانم Decrypt کنم؟ پس چرا در همین برنامه ولی دربخش دیگری که از anti-forgery token استفاده شده مشکل وجود ندارد؟
اشتراک‌ها
31 نکته برای کدنویسی بهتر در سی شارپ

Clean code is C# code that is easy to read and understand, both for the original author and any future developers who may need to work on the codebase. It is a code that follows best coding practices and is organized in a logical way. 

31 نکته برای کدنویسی بهتر در سی شارپ
اشتراک‌ها
چرا stackOverflow بخش Top Navigation را طراحی مجدد کرد

The data validated our hypothesis — of the average 9.3 million daily visits to Stack Overflow, we get fewer than 88,000 clicks to the navigation or top bar (this includes inbox, rep, profile, and search.) If you divided each individual click per visit, that’s fewer than 1% of visits navigating anywhere (and far fewer if you counted multiple clicks per visit). Our navigation is not being used by 99% of our users. 

چرا stackOverflow بخش Top Navigation را طراحی مجدد کرد
اشتراک‌ها
جدول آژاکس خودکار - AMIB AJAX List

با کمک این کتابخانه‌ی جاوااسکریپت می‌توانید فهرست‌های بلند را به صورت خودکار صفحه‌بندی کنید. این کتابخانه تمامی وظایف صفحه‌بندی و قالب‌بندی اطلاعات را بر عهده می‌گیرد. تنها بخشی که لازم است توسط برنامه‌نویس به صورت جداگانه کدنویسی شود، بخش بازخوانی اطلاعات است که می‌تواند از پایگاه داده یا هر منبع دیگر به انجام برسد.

شیوه‌ی تعامل این کتابخانه با سرور بر اساس استاندارد صفحه‌بندی در فریم‌ورک Laravel طراحی شده است 

جدول آژاکس خودکار - AMIB AJAX List
اشتراک‌ها
Bootstrap 4.3.0 منتشر شد

Bootstrap v4.3 has landed with over 120 combined closed issues and merged pull requests. This release brings improvements to our utilities, some prep work for moving on to v5’s development, and the standard bug fixes and documentation updates. 

Bootstrap 4.3.0 منتشر شد
اشتراک‌ها
PSScriptAnalyzer (PSSA) 1.21.0 منتشر شد

PSScriptAnalyzer is a static code checker for PowerShell modules and scripts. PSScriptAnalyzer checks the quality of PowerShell code by running a set of rules. The rules are based on PowerShell best practices identified by PowerShell Team and the community. It generates DiagnosticResults (errors and warnings) to inform users about potential code defects and suggests possible solutions for improvements. 

PSScriptAnalyzer (PSSA) 1.21.0 منتشر شد
اشتراک‌ها
بایدها و نبایدهای برنامه نویسی async در دات نت از تیم ASP.NET Core

ASP.NET Core Diagnostic Scenarios

The goal of this repository is to show problematic application patterns for ASP.NET Core applications and a walk through on how to solve those issues. It shall serve as a collection of knowledge from real life application issues our customers have encountered.

بایدها و نبایدهای برنامه نویسی async در دات نت از تیم ASP.NET Core