نظرات مطالب
غیرمعتبر شدن کوکی‌های برنامه‌های ASP.NET Core هاست شده‌ی در IIS پس از ری‌استارت آن
یک نکته‌ی تکمیلی: روش محافظت از کلیدهای سیستم DataProtection با یک مجوز SSL

اگر برنامه‌های ASP.NET Core را اجرا کرده باشید، عموما در ابتدای آن یک پیام محافظت نشده بودن کلیدهای سیستم DataProtection را لاگ می‌کند. برای رفع این مشکل می‌توان این مراحل را طی کرد:
الف) نیاز به یک مجوز SSL داریم که دارای private key هم باشد.
برای این منظور سه دستور زیر را صادر کنید تا یک فایل pfx مناسب سیستم DataProtection تولید شود:
"C:\Program Files\Git\usr\bin\openssl.exe" genrsa -out private.key 2048
"C:\Program Files\Git\usr\bin\openssl.exe" req -new -x509 -key private.key -out publickey.cer -days 1398
"C:\Program Files\Git\usr\bin\openssl.exe" pkcs12 -export -out idp.pfx -inkey private.key -in publickey.cer
این دستورات از openssl.exe برنامه‌ی Git for windows استفاده می‌کنند. اگر فایل pfx نهایی دارای private key نباشد (روش فوق این مشکل را ندارد)، حین استفاده‌ی از آن در برنامه، با خطاهایی مانند «کلید یافت نشد» و یا «access denied» مواجه می‌شوید.

ب) خواندن فایل pfx در برنامه
روش خواندن فایل‌های pfx به صورت زیر است:
private static X509Certificate2 loadCertificateFromFile(string filePath, string password)
{
    // NOTE:
    // You should check out the identity of your application pool and make sure
    // that the `Load user profile` option is turned on, otherwise the crypto susbsystem won't work.

    // For decryption the certificate must be in the certificate store. It's a limitation of how EncryptedXml works.
    using (var store = new X509Store(StoreName.My, StoreLocation.CurrentUser))
    {
      store.Open(OpenFlags.ReadWrite);
      store.Add(new X509Certificate2(filePath, password, X509KeyStorageFlags.Exportable));
    }

    return new X509Certificate2(
            filePath,
            password,
            keyStorageFlags: X509KeyStorageFlags.MachineKeySet | X509KeyStorageFlags.PersistKeySet
                             | X509KeyStorageFlags.Exportable);
}
دو نکته در اینجا مهم هستند: اگر از IIS استفاده می‌کنید، روشن کردن گزینه‌ی «Load user profile» را در Application pool برنامه فراموش نکنید، تا سیستم RSA به خوبی کار کند. همچنین در اینجا قسمت store.Add الزامی است. از این جهت که ASP.NET Core برای کار decryption کلیدها، فقط به اطلاعات X509Store سیستم مراجعه می‌کند و کاری به فایل pfx ما ندارد.

ج) معرفی مجوز تولید شده به سیستم
دراینجا آخرین مرحله، ذکر متد ProtectKeysWithCertificate به همراه مجوزی است که تولید کردیم:
services
   .AddDataProtection()
   .SetDefaultKeyLifetime(...)
   .SetApplicationName(...)
   .ProtectKeysWithCertificate(loadCertificateFromFile("path ...", "123"));
اکنون اگر برنامه را اجرا کنید، از فایل pfx تولیدی، برای رمزنگاری کلیدهای سیستم DataProtection استفاده خواهد شد.
مطالب
Getting Started with Windows SharePoint Services 3.0

کتابچه‌ی رایگان 60 صفحه‌ای از مایکروسافت در مورد SharePoint Services 3.0 با محتوای زیر:

Microsoft Corporation - Published: March 2009

Introduction to Getting Started with Windows SharePoint Services 3.0 technology
What's new for IT professionals in Windows SharePoint Services 3.0
Administration model enhancements
New and improved compliance features and capabilities
New and improved operational tools and capabilities
Improved support for network configuration
Extensibility enhancements
For further reading: Evaluation guide for Windows SharePoint Services 3.0 technology
Determine hardware and software requirements
About hardware and software requirements
Stand-alone installation
Server farm installation
Plan browser support
About browser support
Levels of browser support
Feature-specific compatibility listed by Web browser
Install Windows SharePoint Services 3.0 on a stand-alone computer
Hardware and software requirements
Configure the server as a Web server
Install and configure Windows SharePoint Services 3.0 with Windows Internal Database
Post-installation steps
Deploy in a simple server farm
Deployment overview
Deploy and configure the server infrastructure
Perform additional configuration tasks
Create a site collection and a SharePoint site
Roadmap to Windows SharePoint Services 3.0 content
Windows SharePoint Services 3.0 content by audience
Windows SharePoint Services 3.0 IT professional content by stage of the IT life cycle


دریافت

اشتراک‌ها
معرفی Nuget 3.4.3

Today, we are releasing the 3.4.3 RTM version of the NuGet Visual Studio 2015 extension and the Windows x86 commandline executable. We continue to heavily invest in improving the quality of NuGet scenarios in Visual Studio and commandline. The complete list of issues fixed in this version is available on GitHub. In this post, we will review the important changes in 3.4.3 release. 

معرفی Nuget 3.4.3
اشتراک‌ها
آموزش ساخت یک بلاگ با Blazor .Net 8

In this video we will build a complete full stack Blog Web App using the new Blazor Web App with SSR with .Net 8 | Step by Step | From Scratch to End You will learn: New Static Server Side Rendering with Blazor, QuickGrid, Enhanced Navigation, Enhanced Forms, Stream Rendering, Image Preview & Upload, Identity Authentication, Interactive Server Render Mode for Admin Panel, and much more  

آموزش ساخت یک بلاگ با  Blazor .Net 8
اشتراک‌ها
Data Dictionary در C#.NET

Database is an integral part of any company/project. They range from small scale to large scale. But most of the times, if you ask for a data dictionary, then 'boom' - nobody has a data dictionary. This tool will enable you to create data dictionary for your tables and export them to an Excel file. 

Data Dictionary در C#.NET
اشتراک‌ها
Visual Studio 2019 version 16.4.4 منتشر شد