Two-Factor Asp.core

var authenticatorCode = command.Code.Replace(" ", string.Empty).Replace("-", string.Empty);
var twoFactor = await _userManager.VerifyTwoFactorTokenAsync(user, _userManager.Options.Tokens.AuthenticatorTokenProvider, authenticatorCode);

https://chsakell.com/2019/08/18/asp-net-core-identity-series-two-factor-...
https://stackoverflow.com/questions/41084411/whats-the-difference-betwee...
https://blog.elmah.io/how-to-implement-two-factor-authentication-with-as...

Kategoria: 

Asp.core no caching controller methods

[ResponseCache(Duration = 0, Location = ResponseCacheLocation.None, NoStore = true)]
Kategoria: 

File asp.core Api swagger client NSwag

https://stackoverflow.com/questions/43844261/what-is-the-correct-way-to-download-a-file-via-the-nswag-code-generator-angular

1. Microsoft.AspNetCore.StaticFiles // To determine MimeType
2. NSwag.Annotations 

services.AddSwaggerGen(options =>
{
    // Swagger Configurations
    options.MapType<FileContentResult>(() => new OpenApiSchema
    {
        Type = "file"
    });
});

[HttpGet("Get_File")]
[SwaggerOperation("Get_File", OperationId = "Get_File")]
[SwaggerResponse(200, type: typeof(FileContentResult))]
[ProducesResponseType(typeof(FileContentResult), 200)]
public IActionResult GetFile()
{
    var filePath = "D:\\11.pdf"; // get file full path based on file name
    if (!System.IO.File.Exists(filePath))
    {
        return BadRequest();
     }
 
     return File(System.IO.File.ReadAllBytesAsync(filePath).Result, "application/octet-stream", "11.pdf");
}
Kategoria: 

drupal alias pattern

[node:field-myterm:parent:parent]/[node:field-myterm:parent]/[node:field-myterm]/[node:title]

Kategoria: 

Drupal composer

composer create-project drupal/recommended-project ********.pl/

composer require drupal/bootstrap_layouts
composer require drupal/paragraphs
composer require drupal/pathauto
composer require drupal/panels
composer require drupal/AutoFloat
composer require drupal/juicebox:3.0-alpha2

composer require drupal/taxonomy_menu

Kategoria: 

Drupal modules

drush dl Paragraphs
drush dl Bootstrap
drush dl pathauto
drush dl ctools
drush dl token
drush dl Bootstrap_Layouts
drush dl bootstrap_layouts
drush dl bootstrap
drush dl exclude_node_title
drush dl paragraphs
drush dl entity_reference_revisions
drush dl asset_injector

drush dl taxonomy_menu
drush dl tb_mega_menu

Kategoria: 

entity rollbacl

Remove-Migration -context ***omainMo***xt  -Force
Kategoria: 

Net use

net use s: \\tower\movies /user:HTG CrazyFourHorseMen
Kategoria: 

Strony

Subskrybuj Notatnik RSS