Показаны сообщения с ярлыком Web Api. Показать все сообщения
Показаны сообщения с ярлыком Web Api. Показать все сообщения

понедельник, 20 ноября 2017 г.

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();
}

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

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

Web Api with Autho

https://habrahabr.ru/post/231807/

https://stackoverflow.com/questions/9571445/asp-net-web-api-self-host-with-windows-authentication

https://stackoverflow.com/questions/45485454/owin-self-host-with-windows-authentication-allowanonymous-not-working

https://www.codeproject.com/Tips/1057538/Authorization-on-Self-Hosted-SignalR-Server-with

https://docs.microsoft.com/en-us/aspnet/web-api/overview/security/authentication-and-authorization-in-aspnet-web-api


OWIN

https://coding.abel.nu/2014/06/writing-an-owin-authentication-middleware/

https://habrahabr.ru/post/202344/

https://brockallen.com/2013/08/07/owin-authentication-middleware-architecture/

https://msdn.microsoft.com/en-us/library/dn253811(v=vs.113).aspx

https://seminda.wordpress.com/2017/01/12/building-an-owin-authentication-middleware/

https://www.scottbrady91.com/Katana/OWIN-Basic-Authentication

https://github.com/dotnet/home/blob/master/projects/owin-authentication-middleware.md

https://gist.github.com/eberlitz/9694818

https://dotnetcodr.com/2015/11/26/wiring-up-a-custom-authentication-method-with-owin-in-web-api-part-4-putting-the-components-to-work/

https://chris.59north.com/post/Understanding-OWIN-(Katana)-Authentication-Middleware

https://stackoverflow.com/questions/44524318/asp-net-web-api-2-custom-owin-auth-middleware-working-with-authorize-attribute

https://www.codeproject.com/Articles/864725/ASP-NET-Understanding-OWIN-Katana-and-the-Middlewa

https://weblogs.asp.net/cibrax/writing-an-authenticationhandler-for-katana

https://www.microsoftpressstore.com/articles/article.aspx?p=2473126

https://www.red-gate.com/simple-talk/dotnet/net-framework/creating-custom-oauth-middleware-for-mvc-5/

http://world.episerver.com/documentation/developer-guides/CMS/security/configuring-mixed-mode-owin-authentication/

http://blog.tamizhvendan.in/blog/2015/02/04/step-6-authentication-using-owin-middleware-and-asp-dot-net-identity/

http://lvasquez.github.io/2015/07/20/ASP-MVC-5-Authentication/

https://long2know.com/2016/07/asp-net-core-oauth-middleware/

Crypto

https://dotnetcodr.com/security-and-cryptography/








четверг, 17 декабря 2015 г.

понедельник, 23 ноября 2015 г.

WebApi Mapping

1. Request find success Method in Controller if

if( Request.Parameters  >=  Controller.Method.Parameter)
{
      Find Method to ProcessRequest is Succesfull
}
else
      Find Method to ProcessRequest is Failure

for example

if Request = = param1=1&param2=2&param3=3
{
     Find Method(param1, param2) is Successfull
}

if Request  = = param1=1&param2=2
{
     Find Method(param1, param2, param3) is Failure
}