All java c# .net servlet jdbc c sqlserver android javascript php wcf clearcase angularjs 2

What are the types of cookies?

Cookies can be broadly classified into 2 types

1. Persistent cookies: Remain on the client computer, even after the browser is closed. You can configure how long the cookies remain using the expires property of the Http Cookie object.

2. Non-Persistent cookies: If you don't set the Expires property, then the cookie is called as a Non-Persistent cookie. Non-Persistent cookies only remain in memory until the browser is closed.

There two type of cookies ..
 Persistent cookies: cookies are stored on your computer hard disk. They stay on your hard disk and can be accessed by web servers until they are deleted or have expired. 
public void SetPersistentCookies(string name, string value){
 HttpCookie cookie = new HttpCookie(name);
 cookie.Value = value;
 cookie.Expires = Convert.ToDateTime(“12/12/2008”);

Non-persistent cookies: cookies are saved only while your web browser is running. They can be used by a web server only until you close your browser. They are not saved on your disk.
 public void SetNonPersistentCookies(string name, string value){
 HttpCookie cookie = new HttpCookie(name);
 cookie.Value = value;

What is a NullPointer Exception in and how to fix it

Null pointer exception means you are trying to access a member field or a function from an object which is null. for example you created a object of a class object name is "ClassAobj" and you want a variable value from class which is assign and initilize in that class now int a = ClassAobj.Number1; if "ClassAobj" is null then you can not access the value of Number1 . for fixing it ,either you have to initilize the class or you have to full if condition if(ClassAobj != null) { int a = ClassAobj.Number1; }

You are trying to use something that is null (or Nothing in VB.NET). This means you either set it to null, or you never set it to anything at all.

Like anything else, null gets passed around. If it is null in method "A", it could be that method "B" passed a null to method "A".

The rest of this article goes into more detail and shows mistakes that many programmers often make which can lead to a NullReferenceException.

What is static polymorphism and dynamic polymorphism?


A method which will bind at compile time will execute in runtime is called as static polymorphism or early binding or compile time polymorphism


A method which will bind at compile time will not execute, instead of that a method which will bind at runtime will execute is called as RUNTIME


Static polymorphism:

The process of binding the overloaded method within object at compile time is known as Static polymorphism due to static polymorphism utilization of resources (main memory space) is poor because for each and every overloaded method a memory space is created at compile time when it binds with an object. In C++ environment the above problem can be solve by using dynamic polymorphism by implementing with virtual and pure virtual function so most of the C++ developer in real worlds follows only dynamic polymorphism.

Dynamic polymorphism:

In dynamic polymorphism method of the program binds with an object at runtime the advantage of dynamic polymorphism is allocating the memory space for the method (either for overloaded method or for override method) at run time.

Polymorphism means one name, multiple forms. It allows us to have more than one function with the same name in a program.It allows us to have overloading of operators so that an operation can exhibit different behaviours in different instances.

What is the data provider to communicate sql server data base?

Every DataProvider is providing by the Microsoft as a Base class library (BCL). To communicate Sql server database we have to import a BCL called Using System.Data.SqlClient;

.NET Framework Data Provider for OLE DB

SQLOLEDBMicrosoft OLE DB provider for SQL Server
MSDAORAMicrosoft OLE DB provider for Oracle
Microsoft.Jet.OLEDB.4.0OLE DB provider for Microsoft Jet

The following table lists the data providers that are included in the .NET Framework.

.NET Framework data provider


.NET Framework Data Provider for SQL Server

Provides data access for Microsoft SQL Server. Uses the System.Data.SqlClient namespace.

.NET Framework Data Provider for OLE DB

For data sources exposed by using OLE DB. Uses the System.Data.OleDb namespace.

.NET Framework Data Provider for ODBC

For data sources exposed by using ODBC. Uses the System.Data.Odbc namespace.

.NET Framework Data Provider for Oracle

For Oracle data sources. The .NET Framework Data Provider for Oracle supports Oracle client software version 8.1.7 and later, and uses the System.Data.OracleClient namespace.

EntityClient Provider

Provides data access for Entity Data Model (EDM) applications. Uses the System.Data.EntityClient namespace.

.NET Framework Data Provider for SQL Server Compact 4.0.

Provides data access for Microsoft SQL Server Compact 4.0. Uses the System.Data.SqlServerCe namespace.

Can we run application without IIS?

Yes. Using ASP.NET DEVELOPMENT SERVER which is the default server in ASP.NET.

It is easy to run your web application without installing any web server. For running your application without IIS you have to use Cassini Desktop Adapter.

Features of Cassini Desktop Adapter

* Standalone Web Applications – now on the Desktop
* 100% Embedded Web server
* No Installation or GAC Required
* No Administrator Privileges Required
* No XML / Configuration Files
* Cassini On-Demand

Download Link
Download Cassini

After Extracting above zip file you will find a folder named “Standalone.Simple”
It has following sub directory

Now do following steps
-> Just put your web application on \webApp folder
-> Copy UltiDevCassiniHttpRequestProcessor2.0.dll from \Cassini folder
-> Now past it your bin folder
-> Now run Standalone.Simple.bat file (It will create virtual web server)

Now your application is running without IIS It also support VWG application.

Where inproc session data will store?

Inproc sessions are creating within the Current App Domain, which is a part of Web Server.

The Inproc session data stores  in a memory object in the application worker process (aspnet_wp.exe) in the application domain. It is usually the fastest, but more session data means more memory is used on the web server, and that can affect performance. The session data is stored in the application domain of the web server. When the server restarts then existing data is lost. If you modify the Global.asax file and the Web.Config file for an ASP.NET application then the application will be restarted and all the session data will be lost.

How to import the data into the Share Point list

BCS: Business connectivity Service allows us to connect external data and work with it from SharePoint.Just we need to create an external content type. Getting started with Business Connectivity Services (BCS) in SharePoint 2010 PS: Steps are also same for SharePoint 2013

Add an app->Import Spreadsheet , through this you can import

What is the file format of web.config file ? and explain other properties of web.config

Web.config files are stored in XML format. Each directory can contain only one config file. All the web config file inherits the root web.config located at : systemroot\microsoft.NET\framework\versionNumber\CONFIG\Web.config

Each file is an XML file (with the extension .config) that contains a set of configuration elements. Configuration information is stored in XML-based text files.ASP.NET Configuration system is extensible and application specific information can be stored and retrieved easily.

What is this and base keywords?

This: It is a keyword which is representing current class object or instance. Using this we can invoke current class instance members.

Base: It is a keyword which is representing the super class instance. Using base keyword we can access super class instance members from derived Class or sub class.

Base is used in constructors. A derived class constructor is required to call the constructor from its base class.
he base keyword is used to refer to the base class when chaining constructors or when you want to access a member (method, property, anything) in the base class that has been overridden or hidden in the current class. For example, class A { protected virtual void Foo() { Console.WriteLine("I'm A"); } } class B : A { protected override void Foo() { Console.WriteLine("I'm B"); } public void Bar() { Foo(); base.Foo(); } } With these definitions, new B().Bar(); would output I'm B I'm A

What is ADO.Net? Why


1. It is an integral component in .NET framework, which was introduced by the Microsoft with .NET Framework 1.0

2. It is a Data Access Object, which allows communication between .NET application and Databases.


1. whenever .NET application wants to communicate Databases it has to take the help of Ado.Net.

2. acts like a mediator between .Net application and Database.

ADO is a language-neutral object model that is the keystone of Microsoft's Universal Data Access strategy.

ADO.NET is an integral part of the .NET Compact Framework, providing access to relational data, XML documents, and application data. ADO.NET supports a variety of development needs. You can create database-client applications and middle-tier business objects used by applications, tools, languages or Internet browsers.

ADO.NET defines DataSet and DataTable objects which are optimized for moving disconnected sets of data across intranets and Internets, including through firewalls. It also includes the traditional Connection andCommand objects, as well as an object called a DataReader that resembles a forward-only, read-only ADOrecordset. If you create a new application, your application requires some form of data access most of the time.

ADO.NET provides data access services in the Microsoft .NET platform.