Thursday, July 21, 2022

XUnit

 

It is opted by MS as standard framework for .Net & .Net core

Xunit is a cross platform




Comparison:

https://www.lambdatest.com/blog/nunit-vs-xunit-vs-mstest/

https://www.c-sharpcorner.com/UploadFile/Santhi.M/comparison-of-unit-testing-tools-in-net/

Saturday, December 4, 2021

Azure Kubernetes

                                                                         AKS














Sunday, November 14, 2021

Docker

                                                 Docker

Docker Interview Questions:

https://www.interviewbit.com/docker-interview-questions/

Monday, November 8, 2021

AZ-204

                                                 AZ-204

$PSVersionTavle.PSVersion to see the latest version.

AZ-400

                                 AZ-400

                                Microsoft DevOps Engineer Expert(AZ-400)


DevOps Life Cycle :




DevOps Tools




Source control tools

1) Azure Repos Git

2) Bitbucket cloud

3) GitHub

4) GitHub Enterprise Server

5) Other Git

6) Subversion

Pipeline Tasks:

https://docs.microsoft.com/en-us/azure/devops/pipelines/tasks/?view=azure-devops

Chef vs Puppet vs Ansible vs SaltStack | Configuration Management Tools Comparison 

https://www.youtube.com/watch?v=OmRxKQHtDbY

Compare with the below factors

1) Scalability - is good in all four tools

2) Easy to setup - Except Ansible, remaining tools user Master-Agent concept to install the configured

3) Availability - all four supports

4) Management - Puppet & CHEF follows pull configuration and  Ansible & SaltStack follows push configuration. Ansible & SaltStack both uses YAML(PYTHON). Puppet uses DSL language and CHEF uses DSL(RUBY).

5) Interoperability: All server(Puppet chef,etc.,) machines uses Linux/Unix and agents supports windows

Final conclusion : Ansible is the best configuration tool out of 4 tools.

Monitoring Tools:

Nagios, Splunk, Amazon cloud watch

 Nagios has large market share in the IT industry.


Learn Below Important topics

VM Scale Set , VM Load balancer, Availability Set, Availability Zone, Application Ingights

Virtual network, Network Interface, Subnet, IP address Range

=========================================================================


Deploying the application from VS to VM

To become a Microsoft Certified DevOps Engineer Expert, first take either AZ-104 or AZ-204. Then, take AZ-400. These exams will teach you to effectively manage DevOps processes and integrations between Microsoft and the various DevOps tools. 

1) To deploy the code from Visual studio to Windows server then we should create a new VM and install MANAGEMENT SERVICE from server explorer and IIS. Install web Deploy and .net framework bundle in the VM

Custom Script Extension

If we want to install any software's or add users to the Admin group then we can make use of this feature.

PS Desired State Configuration

DSC will install the same as CSE but it will make sure that the installed s/w is present in the system with the help of Azure Automation service. If some deletes that required  then DSC will install again.


DevOps process templates:

https://docs.microsoft.com/en-us/azure/devops/boards/work-items/guidance/choose-process?view=azure-devops&tabs=basic-process

Basic, Agile, Scrum & CMMI











Saturday, July 24, 2021

MS Azure

 Multi tenant Authentication:

https://www.youtube.com/watch?v=BJXqrI1nabk

Access token :

The default lifetime of an access token is variable. When issued, an access token's default lifetime is assigned a random value ranging between 60-90 minutes (75 minutes on average). 

SAML : 

The default lifetime of the token is 1 hour




VM:

Creating a VM needs VNet, NIC, NSG, Private ,public IP.

NIC is assigned when a new VM created

Transferring data in the form of packets send and receive through NIC 

NSG assigned to the NIC and it a firewall.

To run ASP.NET core application in Linux,

install Kestrel web server in the Linux machine

Publish code to the folder

Copy the folder to the server

Install .Net core framework SDK 3.1

Install Win SCP tool to copy the published files to the Linux VM.

Kestrel web server runs the application locally inside the Linux VM.

If we want to make it publicly available then we need to install NGINX web server.

NGNIX will redirects the request to the http://localhost:5000

Recovery Service vault:

We can take the backup of a vm using this service.

Recovery service vault should be present at same location where the VM is present.

It will take the incremental backup from the server.

We have 3 different backup policies

1) File 2) VM 3) Disk recovery

We can create backup policy according to our requirement.

We can restore the VM from Backup point.

A Recovery Services vault must be in the same location as the virtual machines being protected. If you have virtual machines in multiple regions, create a Recovery Services vault in each region.

Disaster recovery:

VM: Enable this from the VM -> Disaster recovery & choose the resources to create tartget.

Storage Account:

Microsoft recommends RA-GZRS for maximum availability and durability for your applications.

An important part of a disaster recovery plan is preparing to fail over to the secondary endpoint in the event that the primary endpoint becomes unavailable.

AppService:

Backup -> Configure -> choose the details to proceed further.

Sql Server or DB:

Enable Auditing.

Azure Recovery Services contributes to your BCDR strategy:

  • Site Recovery service: Site Recovery helps ensure business continuity by keeping business apps and workloads running during outages. Site Recovery replicates workloads running on physical and virtual machines (VMs) from a primary site to a secondary location. When an outage occurs at your primary site, you fail over to secondary location, and access apps from there. After the primary location is running again, you can fail back to it.
  • Backup service: The Azure Backup service keeps your data safe and recoverable.
App Service:
We have different app service plans based on our requirement.
Free, Dev/Test, Standard, premium & Isolated.
Azure Functions:

Azure RDS vs Wvd
The basic difference between RDS and WVD is, RDS is based on a server operating system (OS), WVD comes with a desktop OS that is, multi-user Windows 10. WVD is both platform and infrastructure services (PaaS and Iaas). Here the host is a virtual machine (VM), and the rest of the service is PaaS
https://searchwindowsserver.techtarget.com/tip/WVD-vs-RDS-vs-VDI-Which-should-you-choose
app service environment vs app service plan
App Service Plan represents the collection of physical resources for the App Service. An App Service Plan can have multiple web apps. ... The App Service Environment on the other hand is a deployment of the Azure App Service into your own Azure Virtual Network, and runs on a separate SKU, which is called Isolated SKU






Tuesday, July 20, 2021

C#

Design Patterns:

https://www.c-sharpcorner.com/UploadFile/nipuntomar/creational-design-pattern-for-net/

https://www.c-sharpcorner.com/UploadFile/nipuntomar/structural-design-pattern-for-net/

https://www.c-sharpcorner.com/UploadFile/nipuntomar/behavioral-design-pattern-for-net-part-1/

SOLID Principles:

Single Responsibility Principle (SRP): High cohesion and Loosely couples design is preferred.

refer UDEMY course

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

Default access specifier of the class members is 'Private

Object class is the 'Default parent class 

Base keyword is used to refer to the members of the parent class

Default class access specifier is internal.

Sealed class- can't be inherited further

Sealed method - can't be overridden further.

Static classes are sealed and therefore cannot be inherited.

Q: If we want to make a class not accessible to anyone?

    A: Define private constructor

Q: Restrict a class not to be accessible to any other except child class?

A: Define constructor of a class protected.

Q: throw vs throws

A: 

throwthrows
throw keyword is used to throw an exception explicitly.throws keyword is used to declare one or more exceptions, separated by commas.
Only single exception is thrown by using throw.Multiple exceptions can be thrown by using throws.
throw keyword is used within the method.throws keyword is used with the method signature.

Read about delegates.

Delegate is a class, which is used to create and invoke delegates at runtime.

A delegate in C# is similar to a function pointer in C or C++

delegates are object-oriented type-safe and very secure as they ensure that the signature of the method being called is correct. 

Events and delegates work together. An event is a reference to a delegate i.e. when an event is raised, a delegate is called. 

Func, Action  & Predicate.

https://www.c-sharpcorner.com/UploadFile/puranindia/C-Sharp-interview-questions/

constant vs readonly

lazy loading vs eager loading

Tasks and threads in .NET and classes

App Domain:

Asp.Net introduces the concept of an Application Domain which is shortly known as AppDomain. It can be considered as a Lightweight process which is both a container and boundary. The .NET runtime uses an AppDomain as a container for code and data, just like the operating system uses a process as a container for code and data. As the operating system uses a process to isolate misbehaving code, the .NET runtime uses an AppDomain to isolate code inside of a secure boundary.


can destructors cause deadlocks

SQL: execution plans

Access token
Grant type = client credentials
used graph.microsoft.com/default
this will return claims related to only app

Grant type= Authorization code (This will as the user to login for claims)
this will return claims realted to App + User

JWT token :
Header
Payload
Certificate

ID_token: The purpose of ID_token is to only verify the identity of the user
Id_token is not used by applications to access protected resources, which is the case with access token
used graph.microsoft.com/default OpenID
this will return Access token and id_token

Refresh token
Re fresh token is required for the authorization/authentication flow which needs user interaction

graph.microsoft.com/default OpenID offline_access
This will return Accesstoken, id token, and refresh token
https://www.c-sharpcorner.com/article/oauth2-0-and-openid-connect-oidc-core-concepts-what-why-how/
https://www.c-sharpcorner.com/article/accesstoken-vs-id-token-vs-refresh-token-what-whywhen/
https://docs.microsoft.com/en-us/azure/active-directory-b2c/configure-tokens?pivots=b2c-user-flow