اشتراک‌ها
ملاحظات امنیتی جهت کار با JavaScript در سال 2024

5 JavaScript Security Best Practices for 2024

Any JavaScript web application needs to have a Content Security Policy (CSP), a browser security standard that dictates what the browser is allowed to load — whether that be a domain, subdomain, or resource. Without a CSP, hackers can exploit cross-site scripting vulnerabilities, potentially resulting in a data breach.

ملاحظات امنیتی جهت کار با JavaScript  در سال 2024
اشتراک‌ها
مقایسه HTTP/2 PUSH و HTTP Preload

HTTP/2 PUSH is a feature that lets a server pre-emptively push resources to the client (without a corresponding request). HTTP Preload is a way to indicate to the browser resources it would require while loading the current page. In this post, we will discuss the key differences between PUSH and Preload, with a detailed explanation of which one to choose based on your use case. 

مقایسه  HTTP/2 PUSH و HTTP Preload
اشتراک‌ها
اصول طراحی Windows 11

Windows 11 marks a visual evolution of the operating system. We have evolved our design language alongside with Fluent to create a design which is human, universal and truly feels like Windows. 

اصول طراحی Windows 11
اشتراک‌ها
کنفرانس dotNetConf 2015 مایکروسافت

During the two-day event we will have more than 16 hours of content on subjects such as ASP.NET 5, .NET Core, C#, F#, Roslyn, debugging with VS2015, learnings from running large scale websites, and more! 

کنفرانس dotNetConf 2015 مایکروسافت
اشتراک‌ها
کتاب رایگان توسعه نرم افزار Agile

Learning new development processes can be difficult, but switching to Agile doesn’t need to be complicated. Explore the theories behind Agile and learn how to make it work for you. In Agile Software Development Succinctly, author Stephen Haunts will guide you to a fuller understanding of Agile, its advantages and disadvantages, and how to get the most out of it. 

کتاب رایگان توسعه نرم افزار Agile
اشتراک‌ها
معرفی مجموعه کتابخانه‌های NEXT.

.NEXT (dotNext) is the family of powerful libaries aimed to improve  development productivity and extend .NET API with unique features which potentially will be implemented in the next versions of C# compiler or .NET Runtime.

معرفی مجموعه کتابخانه‌های NEXT.
اشتراک‌ها
NetBeans IDE 8.1 Beta منتشر شد

The latest version of the NetBeans IDE features a range of new tools for HTML5/JavaScript and supports mixed Java/C++ development. It is now available for download in beta.

NetBeans IDE 8.1 Beta منتشر شد
نظرات مطالب
فعالسازی Windows Authentication در برنامه‌های ASP.NET Core 2.0
یک نکته‌ی تکمیلی: UseHttpSys و استفاده‌ی از HTTPS
اگر بخواهید برای آزمایش برنامه از روش UseHttpSys استفاده کنید و همچنین « اجبار به استفاده‌ی از HTTPS در حین توسعه‌ی برنامه‌های ASP.NET Core 2.1 » را هم فعال کرده باشید ... برنامه کار نمی‌کند. از این جهت که در حالت استفاده‌ی از http.sys ویندوز، آدرس‌ها و پورت‌های SSL، باید به این صورت نصب شوند:
netsh http add sslcert ipport=0.0.0.0:6001 certhash=<thumbprint of certificate> appid={new guid here} certstorename=Root
در اینجا در کنسول مدیریت مجوزهای ویندوز، به خواص آن مجوز مراجعه کرده و thumbprint آن‌را در قسمت certhash وارد کنید. یک guid دلخواه را هم باید داخل {} در قسمت appid ذکر کنید. سپس این دستور را با دسترسی مدیریتی در خط فرمان ویندوز اجرا کنید. پس از آن است که برنامه برای مثال می‌تواند بر روی پورت 6001 که SSL تعریف شده، از http.sys استفاده کند.
مشکلات احتمالی
مجوزی که در اینجا ذکر می‌شود باید دارای private key بوده و همچنین در local computer وارد شده باشد؛ در غیراینصورت خطای زیر را دریافت می‌کنید:
SSL Certificate add failed, Error: 1312 A specified logon session does not exist.
It may already have been terminated.
- برای رفع آن از طریق اجرای certmgr.msc، در قسمت «Personal/Certificates»، مجوز پیش‌فرض ASP.NET Core را با نام «ASP.NET Core HTTPS development certificate»، انتخاب کرده و بر روی آن کلیک راست کنید. سپس گزینه‌ی All tasks -> export را انتخاب کنید. نکته‌ی مهمی را که در اینجا باید رعایت کنید، انتخاب گزینه‌ی «yes, export the private key» است. کپی و paste این مجوز از اینجا به جایی دیگر، این private key را export نمی‌کند. به همین جهت مشکل فوق را مشاهده خواهید کرد. در پایان این عملیات، یک فایل pfx را خواهید داشت.
- اکنون برای import این فایل pfx، بجای ورود به قسمت مدیریت مجوزهای ویندوز از طریق certmgr.msc، نیاز است از طریق mmc و add remove snap-ins وارد شوید تا بتوانید به local computer دسترسی پیدا کنید. 
- به همین جهت در خط فرمان دستور mmc را وارد کرده و آن‌را اجرا کنید. در صفحه‌ی باز شده، گزینه‌ی File -> Add remove snap-ins را انتخاب کنید. در اینجا در لیست ظاهر شده، certificates را انتخاب و add کنید. در صفحه‌ی بعدی نیز computer account و سپس local computer را انتخاب کنید. اکنون بر روی دکمه‌ی ok کلیک کنید تا صفحه‌ی certificate مخصوص local computer ظاهر شود. حالت استفاده‌ی از certmgr.msc، مجوزهای current user را نمایش می‌دهد که برای اینکار مناسب نیست.
- در پایان، این فایل pfx را در مسیر «Trusted Root Certification Authorities/Certificates» قرار دهید. برای اینکار بر روی نود certificate کلیک راست کرده و گزینه‌ی All tasks -> import را انتخاب کنید. سپس مسیر فایل pfx خود را داده و این مجوز را import نمائید.
- اکنون اگر مجددا دستور netsh http add sslcert یاد شده را اجرا کنید، بدون مشکل اجرا می‌شود.