DotNet Mirror
  DNM facebook   DNM Google+   DNM Twitter   
Stats
Total Count : 27
Interview QA Post Interview QA  
 
What are the features of Azure functions?
Ashok Nalam
Below are the few features of Azure functions
  1. Server-less -  Focus more on building your apps faster to add business value without managing infrastructure. 
  2. Language of your choice - You can develop your function code using C#, Java, JavaScript, Powershell and Python languages of your choice.
  3. Custom development  - you can bring your own dependencies using  Nuget and NPM to extend your application logic.
  4. Continuous Integration and Deployment - you can set up your function code with continuous integration and deployment using GitHub, Azure DevOps, bitbucket and other CI/CD processes.
  5. Built-in Security - Protect your functions with SSL Bindings, VNet integration and OAuth providers. Authenticate users with the OAuth standard from providers such as Active Directory, Facebook, Twitter, Google, and Microsoft Account.
  6. Scale on demand - Automatically scale out whenever there is a need  by adding compute power and scale in when the code is stopped running.
  7. Optimized Pricing - Pay only when your app runs.
  8. Performance and Monitoring - Easily configure Azure App Insight to your App for monitoring and analyzing the app performance.
  9. Connect to Other Services - Use triggers and bindings that enable your server-less applications to respond to events and connect to other services seamlessly.
  10. Choice of hosting plan - Based on your need, you can opt for Consumption, Premium or App Service Plan.
By: Ashok Nalam | 22 Feb 2022 | Microsoft Azure | Views: 508 | Comments: 0 | Tags:azure  azure functions 
Are Azure functions free?
Ashok Nalam
Yes, Azure functions provide free grants(1 million requests and 4,00,000 GB-s of resource) which applies to paid, consumption subscriptions only per month.

Once the Azure functions are developed and deployed to azure, then you can pay per use pricing model. While creating azure function, you must choose a hosting plan for your app. There are 3 types of pricing plans. 
  1. Consumption Plan - is billed based on per-second resource consumption and executions.
  2. Dedicate(App Service) Plan - Runs like your web apps. If the app service plan is shared between your applications and functions there is no additional cost for functions run.
  3. Premium Plan - It contains Pre-warmed instances that are always readily available to respond immediately. Also, it contains VNET connectivity for security. In this plan,  you pay for Pre-warmed instances and any additional instance which you use to scale your app in and out.
Consumption and Premium plan automatically scale out whenever there is a need  by adding compute power and scale in when the code is stopped running. Also, both plans provide a monthly free grant of 1 million requests and 4,00,000 GB-s of resource consumption per month per subscription in pay-as-you-go pricing across all function apps in that subscription.

In the App Service plan, your app does not scale automatically. Also, you must enable Always on setting so that your function app runs correctly.

Note: A storage account is created by default with each Functions app. The storage account is not included in the free grant.

To understand more on pricing refer Azure functions pricing https://azure.microsoft.com/en-in/pricing/details/functions/ 
By: Ashok Nalam | 06 Apr 2021 | Microsoft Azure | Views: 1227 | Comments: 0 | Tags:azure  azure functions 
What is the difference between CLR and DLR in C#?
Abhishek Choubey

 What is DLR?
  • DLR is a runtime environment that adds a set of services for dynamic languages to the CLR.
  • DLR makes it easier to develop dynamic languages to run on .net framework and give them .net interoperability.
  • DLR introduces dynamic objects in C#
  • DLR helps you create libraries that support dynamic operations
  • Examples of languages developed by using DLR is IronPython,IronRuby etc.
What is CLR?
  • As part of the Microsoft  .NET Framework, the Common Language Runtime (CLR) is the programming (Virtual Machine component) that manages the execution of programs written in any language that uses the .NET Framework, for example C#, VB.Net, F# and so on.
  • Programmers write code in any language, including VB.Net, C# and F# when they compile their programs into an intermediate form of code called CLI in a portable execution file (PE) that can be managed and used by the CLR and then the CLR converts  it into machine code to be will executed by the processor.
  • The information about the environment, programming language, its version and what class libraries will be used for this code are stored in the form of metadata with the compiler that tells the CLR how to handle this code.
  • The CLR allows an instance of a class written in one language to call a method of the class written in another language.
By: Abhishek Choubey | 27 Nov 2020 | C# | Views: 1175 | Comments: 0 | Tags:.NET  C# 
What are the features of Azure functions?
Ashok Nalam

Below are few features of Azure functions
  1. Serverless -  Focus more on building your apps faster to add business value without managing infrastructure.
  2. Language of your choice - Develop your function code using C#, Java, JavaScript, Powershell and Python languages of your choice
  3. Custom development  - Bring your own dependencies using  Nuget and NPM to extend your application logic.
  4. Continuous Integration and Deployment - Set up your function code with continuous integration and deployment using GitHub, Azure DevOps, bitbucket and other CI/CD processes.
  5. Built-in Security - Protect your functions with SSL Bindings, VNet integration and OAuth providers. You can authenticate users with the OAuth standard from providers such as Active Directory, Facebook, Twitter, Google, and Microsoft Account
  6. Scale on demand - Automatically scale out whenever there is a need  by adding compute power and scale in when the code is stopped running
  7. Optimized Pricing - Pay only when your app runs.
  8. Performance and Monitoring - Easily configure Azure App Insight to your App for monitoring and analyzing the app performance
  9. Connect to Other Services - Use triggers and bindings that enable your serverless applications to respond to events and connect to other services seamlessly
  10. Choice of hosting plan - Based on your need, you can opt for Consumption, Premium or App Service Plan
By: Ashok Nalam | 24 Sep 2020 | Microsoft Azure | Views: 4614 | Comments: 2 | Tags:azure  azure functions 
How do I deploy a function app in Azure?
Ashok Nalam
Once the Azure functions are developed and there are different ways you can deploy your app to Azure. The different deployment methods are
  1. Tool based deployments - deployments are managed locally. Useful when you are doing local development and requires multiple ad-hoc deployments manually.
    • Visual Studio Code publish
    • Visual Studio publish
    • Core tools deployments (using Zip deploy or docker container)
  2. App Service Deployment - deployments are managed from the Azure App Service under Deployment section. Useful when you want to deploy as part of source control commits or from a container registry.
    • Deployment center - Continuous deployment using Azure Repos, GitHub, Bitbucket and Local Git or Manual deployment using One drive, Dropbox, External Git and FTP.
    • Container deployments
  3. External Pipelines - deployment are managed by pipelines. Useful for Production scenarios where you want to do some additional validations as part CI/CD.
By: Ashok Nalam | 13 Sep 2020 | Microsoft Azure | Views: 4294 | Comments: 0 | Tags:azure  azure app service  azure functions 
What is Azure Functions Premium plan?
Ashok Nalam
Once the Azure functions are developed and deployed to azure, then you pay per use pricing model. Azure function has below hosting plans
  1. Dedicated app service plan
  2. Consumption plan
  3. Premium plan (called as elastic premium plan)
Azure functions Premium plan is a higher plan compared to other 2 plans. It contains following features
  • VNET Integration- To add more security to your app, you can configure a VNET and add your function app. With this, your function app is secured with service endpoints. VNET integration is not available in other plans.
  • Pre-warmed instances to avoid cold start - In consumption plan, if there are no execution/calls to your function app it scales in to Zero instances. Once it goes to zero instances, if we make any function call, it takes some time(called as cold start time) to respond to the first call (from zero to one). This latency can be avoided in Premium plan with pre-warmed instances.
  • Unlimited execution duration - Consumption plan has a 10 minutes limit whereas Premium plan defaults to 30 minutes but you can modify it to unlimited(60 minutes guaranteed). Use functiontTimeout property in host.json file to change the configuration.
  • Premium hardware - Provides best cores(1, 2 and 4), memory and storage.
  • Multiple function apps can be deployed to the same plan and all function apps in premium plan shares pre-warmed active instances.
  • Automatic Scaling - Like consumption plan, your app will scale in or scale out based on the need.
Note: Premium plan is charged based on the number of  core seconds, memory used and configured pre-warmed instances.
By: Ashok Nalam | 12 Sep 2020 | Microsoft Azure | Views: 9189 | Comments: 0 | Tags:azure  azure app service  azure functions 
What is Azure Functions Runtime?
Ashok Nalam
Azure Function Runtime is a specific version runtime where your Function App runs on top of it. Currently Azure function supports 3 versions of runtime host
  • 1.x - Supports .NET Framework
  • 2.x - Supports .NET Core2.1
  • 3.x - supports .NET Core3.1
All 3 versions are supported for your production workloads. By default, Function Apps are created in 3.x version runtime. If you are using C# language to develop Azure functions and visual studio gives below options as function runtime while creating Function App
  1. Azure Functions V3(.NET Core) 
  2. Azure Functions V2(.NET Core) 
  3. Azure Functions V1(.NET Framework)
In order to find the function version number in your project, refer .csproj file.

1.x version setting in .csproj file

<TargetFramework>net461</TargetFramework>
<AzureFunctionsVersion>v1</AzureFunctionsVersion>

2.x version setting in .csproj file

<TargetFramework>netcoreapp2.1</TargetFramework>
<AzureFunctionsVersion>v2</AzureFunctionsVersion>

3.x version setting in .csproj file

<TargetFramework>netcoreapp2.1</TargetFramework>
<AzureFunctionsVersion>v2</AzureFunctionsVersion>
We are just referring C# as language, for other languages refer Azure Functions documentation.
By: Ashok Nalam | 11 Sep 2020 | Microsoft Azure | Views: 4514 | Comments: 0 | Tags:azure  azure functions 
What is Azure functions template
Ashok Nalam
While creating Azure Functions with Visual Studio and visual studio code, IDE provides different project templates which are used to create function triggers which can be deployed to Azure Function App. Below are the different function templates available in Visual Studio
  1. Blob Trigger - Creates a function trigger when a blob is added to a container
  2. Cosmos DB  Trigger - Creates a function trigger when a document change in document collection
  3. Event Grid Trigger - Creates a function trigger when an event grid receives a new event
  4. Event Hub Trigger -  Creates a function trigger when an event hub receive a new event
  5. HTTP Trigger -  Creates function triggered by HTTP Request
  6. IoT Hub Trigger -  Creates a function trigger when an IoT hub receives a new event on the event hub endpoint
  7. Queue Trigger - Creates a function trigger when a message is added to specified azure storage
  8. Service Bus Queue Trigger - Creates a function trigger when a message is added to specified service bus queue
  9. Service Bus Topic Trigger - Creates a function trigger  when a message is added to specified service bus topic
  10. Timer Trigger - Creates a function trigger on a specified schedule
By: Ashok Nalam | 02 Sep 2020 | Microsoft Azure | Views: 8795 | Comments: 0 | Tags:azure  azure functions 
What is the default return value of HTTP triggered Azure function
Ashok Nalam

In Azure functions, HTTP triggers lets you invoke a function with an HTTP request and default HTTP response code Azure HTTP triggered functions are
  1. HTTP 204 No Content with empty body from version 2.x and higher
  2. HTTP 200 OK with an empty body from version 1.x
By: Ashok Nalam | 27 Aug 2020 | Microsoft Azure | Views: 3647 | Comments: 0 | Tags:azure functions 
What is difference between SPContext.Current.Web and SPContext.Current.Site.OpenWeb()
Ashok Nalam
To refer SPWeb object sometimes we use SPContext.Current.Web or SPContext.Current.Site.OpenWeb(). Here we will see What are differences between SPContext.Current.Web and SPContext.Current.Site.OpenWeb()
SPContext.Current.Site.OpenWeb()
  1. Creates a new instance of the SPWeb object, and we are responsible to dispose after using it.
  2. OpenWeb() with out sending parameters opens root web of current site collection. If OpenWeb() with parameters opens specific web site.
  3. Expensive call - It cost more resources than reusing an existing one.
SPContext.Current.Web :
  1. Gives you access to the current instance of SPWeb, and you must not dispose it
  2. Gives current Subsite if you are at web other than root web.
By: Ashok Nalam | 01 Oct 2013 | Sharepoint | Views: 8534 | Comments: 0 | Tags:.NET  security 
What is Site Columns in SharePoint
Ashok Nalam
Site Columns are re-usable data type model which can be used in many different content types and list definitions across multiple SharePoint sites. Site Columns shares metadata information across multiple list and libraries. If we define Site Column at root level site of site collection then it can be used across all sub sites in same site collection.

Inbuilt SharePoint site creates many site columns when we create a new site. We can find them at Site Settings -> Web Designer Galleries -> Site columns. We can create our own Site Column using Create link button from Site Columns page. Each Site Column will be mapped to a Group and Type.
By: Ashok Nalam | 24 Jun 2013 | Sharepoint | Views: 12559 | Comments: 2 | Tags:.NET 
What are the view formats for SharePoint Custom List template
Ashok Nalam
When we create a Custom List in SharePoint site, we need to map the list to View. By default when we create List, it will be mapped to "All Items" standard view. But we can change the view for the list. 

Each view is created from View Type and below are the available view types
  1. Standard View  - View data on a Web page. You can choose from a list of display styles.
  2. Calendar View -  View data as a daily, weekly, or monthly calendar.
  3. Datasheet View  - View data in an editable spreadsheet format that is convenient for bulk editing and quick customization. 
  4. Gantt View  - View list items in a Gantt chart to see a graphical representation of how a team's tasks relate over time. 
  5. Custom View in SharePoint Designer  - Start SharePoint Designer to create a new view for this list with capabilities such as conditional formatting. 
In order to see the available view types, Go to Custom List Settings -> Create View -> View Type.
By: Ashok Nalam | 20 Jun 2013 | Sharepoint | Views: 4939 | Comments: 2 | Tags:.NET  list 
What are the default columns added to SharePoint Custom List template
Ashok Nalam
When we create a Custom List in SharePoint site, By default 5 columns are added to custom list which are
  1. Title (Single line of text) - Mandatory field that defines a title for each list item.
  2. Created (Date and Time) -  When the user has created the current item.
  3. Modified (Date and Time) - When the last user has modified the current item.
  4. Created By (Person or Group) - User who created the current item.
  5. Modified By (Person or Group) - User who last modified the current item.
We can modify the column properties by clicking on Column Name from List Settings.
By: Ashok Nalam | 20 Jun 2013 | Sharepoint | Views: 7720 | Comments: 2 | Tags:.NET  list 
What is custom list template in sharepoint site
Ashok Nalam
Inbuilt SharePoint provides some predefined list of templates like Announcements,Calendar,Picture Library,Links...etc. If none of templates are meeting you requirement, you can create your own custom list instance and define columns/views for the list. This list is called Custom List.

In-order to create new custom list, Go to Site Contents -> Add an App -> Select Custom List -> Provide Name for Your Custom list.After creating list, add columns and views to it.
Create Column/View for List: Open created Custom List -> List Settings -> Create Column/View

Note: By default every Custom List will have 5 columns (Title, Modified, Created, Created By and Modified By).
By: Ashok Nalam | 20 Jun 2013 | Sharepoint | Views: 4192 | Comments: 0 | Tags:.NET  list 
What are the various default permission levels in SharePoint site
Ashok Nalam
SharePoint site has different permission levels for the SharePoint Groups. When you create SharePoint site, you can observe the below permissions as default. 

Full Control - Has full control.
Design - Can view, add, update, delete, approve, and customize.
Edit - Can add, edit and delete lists; can view, add, update and delete list items and documents.
Contribute - Can view, add, update, and delete list items and documents.
Read - Can view pages and list items and download documents.
Limited Access - Can view specific lists, document libraries, list items, folders, or documents when given permissions.
Approve - Can edit and approve pages, list items, and documents.
Manage Hierarchy - Can create sites and edit pages, list items, and documents.
Restricted Read - Can view pages and documents, but cannot view historical versions or user permissions.
Restricted Interfaces for Translation - Can open lists and folders, and use remote interfaces.

We can create our own set of permissions also. In order to create new permission, go to site settings -> Users and Permissions -> Site permissions -> Permission Levels(Display list of permissions avalible on site) ->  Add a Permission Level
By: Ashok Nalam | 19 Jun 2013 | Sharepoint | Views: 12368 | Comments: 0 | Tags:.NET  groups  security 
What is site template in sharepoint
Ashok Nalam
Site Template is a pre-defined set of configuration, layout, and content files that define a site model for an SharePoint application. In built SharePoint has shipped with the set of site templates or we can create our own site templates. 

Each site collection site is associated with a site template. While creating a new site collection for an web application from Central Admin, we need to select a site template from Template Selection section.

Once we crate site collection, share point stores some of the files in the file system of front-end webs servers and some content in back-end databases. When we request for a page from browser, SharePoint engine will decide from where it needs to pick the data either file system or content database.

Sample Site Templates:
Collaboration - Team Site
Collaboration - Blog
Collaboration - Coommunity Site
Enterprise - Document Center
Publishing - Publishing Portal
Publishing - Enterprise Wiki
By: Ashok Nalam | 19 Jun 2013 | Sharepoint | Views: 6624 | Comments: 2 | Tags:.NET 
What is Service Applications in SharePoint
Ashok Nalam
Service Applications(SA) are software services which run in a SharePoint farm. These are very useful to share information, resources and capabilities across multiple sites/applications/servers in the same share point farm or even across farms.

Service applications are introduced from SharePoint 2010. Advantage with the Service Applications are salable and extensible.

Sample Service Applications:
Access Services
User Profile Service
User Profile Synchronization Service
SharePoint Server Search
...

Location of services : Central Administration -> System Settings -> Manage services on server
By: Ashok Nalam | 19 Jun 2013 | Sharepoint | Views: 4452 | Comments: 0 | Tags:.NET 
What is content database in SharePoint
Ashok Nalam
A content database is a database file that stores content for one or more site collections for SharePoint web application. The content can be pages,files,documents,images and much more. So if the Site Collection has more number of SharePoint sites, the content database size grows rapidly.

One SharePoint web application can have more than one content database mapped to it and the max limit is 300 ContentDB's per Web Application. If you want to add more content databases to web application, Go to Central Admin -> Application Management -> Manage Content Databases -> select web application -> Add a content database.

Maximum Content database size is 200 GB in general usage scenarios.
By: Ashok Nalam | 19 Jun 2013 | Sharepoint | Views: 28963 | Comments: 3 | Tags:.NET  database 
What is Microsoft Intermediate Language (MSIL)
Ashok Nalam
When we compile the .NET programming language code, the output of compiler is not executable code instead it generates special type of Pseudocode called as Microsoft Intermediate Language(MSIL). It can also referred as Intermediate Language (IL) or Common Intermediate Language (CIL).

When we run the program, Common Language Runtime(CLR) will translate MSIL code to executable code. CLR will covert MSIL code from any of .NET language.
By: Ashok Nalam | 21 May 2013 | .NET Framework | Views: 8244 | Comments: 0 | Tags:.NET 
What are the deployment models for Apps in SharePoint
Ashok Nalam
The deployment models for Apps in SharePoint are
  1. SharePoint-hosted - App and all resources will be hosted in your SharePoint farm. Used for light weight  smaller applications using HTML,Java Script and Client object model. Here you do not need to write server-side code. scope is site collection level.
  2. Autohosted - App is hosted in cloud. Used for light weight applications but the code is deployed at windows azure using cloud. scope is at site level.
  3. Provider-hosted - App and all resources are hosted on separate server. Code does not exists on SharePoint but will be in other domain which can be windows azure, IIS or even PHP app from your domain server. 
No matter where you host your app, it should target to support and consumable in SharePoint Apps.
By: Ashok Nalam | 29 Apr 2013 | Sharepoint | Views: 3815 | Comments: 0 | Tags:deployment 
12