четверг, 30 ноября 2017 г.

Quik Memory Lick

Примерно за 2 месяца процесс Quik разрастается по памяти примерно в 2.5 раза.
А затем Quik просто виснет.
Будьте осторожны.
Тем кто роботов использует необходимо раз в месяц Quik перезапускать.

При запуске память примерно 240MB



После 2-3 месяцев непрерывной работы память уже 641MB




воскресенье, 19 ноября 2017 г.

WEB API/ Security, Authentication, and Authorization in ASP.NET Web API

https://docs.microsoft.com/en-us/aspnet/web-api/overview/security/

Important

Update-package Microsoft.Asp.Net.WebApi

http://www.c-sharpcorner.com/uploadfile/ff2f08/token-based-authentication-using-asp-net-web-api-owin-and-i/

Add User

use OWinTest

INSERT [dbo].[AspNetUsers] ([Id], [Email], [EmailConfirmed], [PasswordHash], [SecurityStamp],[PhoneNumber], [PhoneNumberConfirmed], [TwoFactorEnabled], [LockoutEndDateUtc], [LockoutEnabled], [AccessFailedCount], [UserName])  

VALUES (N'9f15bdd0fcd5423190c2e877ba0228ee', N'abc@gail.com', 1, 
N'ALkHGax/i5KBYWJ7q4jhJmMKmm2quBtnnqS8KcmLWd2kQpN6FaGVulDmmX12s7YAyQ==', 
N'a7bc5c5c-6169-4911-b935-6fc4df01d313', NULL, 0, 0, NULL, 0, 0, N'Jignesh') 

Migration: Configurate, Init
enable-migrations -ContextTypeName OwinAuthentication.Models.OwinAuthDbContext
Add-Migration -configuration OwinAuthentication.Migrations.Configuration InitialEntities
Update-Database -configuration:OwinAuthentication.Migrations.Configuration -Verbose


https://metanit.com/sharp/aspnet_webapi/5.1.php


https://stackoverflow.com/questions/15176538/net-httpclient-how-to-post-string-value

Microsoft.Owin.Hosting.Start and Stop

https://stackoverflow.com/questions/31562192/owin-stop-server-service


private IDisposable myServer;

public void Start() {
    myServer = WebApp.Start(URL);
}

public void Stop() {
    myServer.Dispose();
}