Wednesday, June 29, 2022

ocelot

 I need to implement ocelot for our project these are the some useful links might help from security to load balancer




(API Gateway/Ocelot with Microservices)

https://www.c-sharpcorner.com/article/building-api-gateway-using-ocelot-in-asp-net-core/ [different gateway for different interfaces]


https://www.c-sharpcorner.com/article/building-api-gateway-using-ocelot-in-asp-net-core-part-two/ (JWT in Ocelot)

https://www.c-sharpcorner.com/article/how-to-use-jwt-authentication-with-web-api/

https://www.c-sharpcorner.com/article/asp-net-web-api-2-creating-and-validating-jwt-json-web-token/


https://www.c-sharpcorner.com/article/building-api-gateway-using-ocelot-in-asp-net-core-part-three-logging2/ (Logging with Ocelot)


https://www.blinkingcaret.com/2018/05/30/refresh-tokens-in-asp-net-core-web-api/ (Refreshing Bearer Token Automatically On Expiry)



Load-Balancing in OCELOT

https://ocelot.readthedocs.io/en/latest/features/loadbalancer.html

LeastConnection | CookieStickySessions |  | CustomLoadBalancer


ASP.NET Core Example for Load-Balancing with OCELOT

----------------------------------------------------

http://www.developerin.net/a/85-Ocelot-API-Gateway/144-Load-Balancing-with-Ocelot-API-Gateway



Ocelot OverAll Functionality

-------------------------------

https://altkomsoftware.pl/en/blog/building-api-gateways-with-ocelot/

Saturday, June 25, 2022

Run all SQL files in a directory

 if you want to executethe SQL multiples files 

first step 

Place the files in that order number is the best option so it will come in that order you want to execute


1.sql

2.sql

3.sql






Now the main step place this .BAT file in the directory from which you want the .SQL files to be executed, double click the .BAT file and you are done!


we have two options to create a .bat file

1-with if you want to give user and password for that sql server connection 

2-second one is with out password.


------------------------------------This one is for without Password-----------------------------------------


for %%G in (*.sql) do sqlcmd /S servername /d databaseName -E -i"%%G"

pause

 

------------------------------------This one is for with User and Password-----------------------------------------


for %%G in (*.sql) do sqlcmd /S servername /d databaseName -U username -P 

password -i"%%G"


Note that the "-E" is not needed when user/password is provided