Friday, July 1, 2011

ASP.NET INTERVIEW QUESTIONS :

Explain ASP.NET PAGE EXECUTION ARCHITECTURE...
=========================================
Ans: When client request comes to asp.net webpage, webserver will forward the request to asp.net worker process using aspnet_isapi.dll.
Asp.Net worker process will peform 3 steps:
1)Creating a class for asp.net webpage,this class will be inherited from page class.
2)This webpage class will be compiled into dll[dll is a compiled code of asp.net page].
3)It will create webpage class object from dll, this object will be called with process request method. This process request
method will perform page execution and produces output to client browser.[process request is a method of page class].

[(The answer is enough till here but immediatly they will ask 2 more questions from in it as below)].

What is aspnet_isapi.dll and what do you mean by asp.net worker process?
Ans: [aspnet_isapi.dll ===> aspnet Internet Server Application Programming Interface and the
.Net installation will configure webserver with aspnet_isapi.dll

Asp.Net worker process is called as asp.net engine or asp.net runtime, this will encapsulate .net services. This will maintain http application factory. The http application factory will contain all the application names which are loaded into worker process.
required for page execution. Asp.Net worker process will peform the above 3 steps to page execution.

What is the Application Domain ?
Ans : Application domain will contain page handler factory this page handler factory will maintain all the webpage names for which dll is existing.

What is web gardening ? or how will you do the load balancing in asp.net ?
Ans : Executing more than one worker process with more than one processor for a single application is called as web gardening. This is considered as a part of load balancing. Under web gardening more than one application domain will be maintained for a single application by more than one worker process.

Explain ASP.NET PAGE LIFE CYCLE...
============================
Ans: The different stages of the asp.net webpage execution is called the "Asp.Net webpage life cycle".
The different stages of the webpage life cycle are:
1)Start
2)Page Initialization
3)Load
4)Validation
5)Postback events execution
6)Rendering
7)Unload
[(The answer is enough till here if they ask any more we should give the following explanation)]
Explanation:
============
[Page Request: The page request occus before the page life cycle begins].
1)Start:It will create response,request objects and ispostback will be initialized.
2)Page Initialization: In this stage contorls will be created by assigning unique id if any theme is attached
properties will be applied from theme.
3)Load:If it is postback request, the viewstate data will be loaded and cotrols properties will be applied from the viewstate.
4)Validation state:In this stage validations will be take place if validation controls are used in the web page.
5)Postback Events Execution: [Button click, Dropdown list, selectedindexchanged...]
6)Rendering:In this stage webserver controls will produce HTML content the output will be produced to client.
7)Unload:In this stage the memory will be erased(released).

The set of sub programs executed for different stages of page execution are called "page life cycle events".
1)Preinit event
2)Init event
3)Initcomplete
4)Preload
5)Load
6)Load complete
7)Prerender
8)Savestage complete
9)Unload

The differences between ASP and ASP.NET:
========================================
Ans: Differences are:
---------------------
1) Asp supports scripting languages that is Vbscript, Javascript. These are interpreter based.Execution will be slow.
Asp.net supports .net languages that is vb.net,c# these are compiler based.Execution will be faster.
2) Asp doesn't support server side controls.No event driven programing at server side.more burden on developer.
Asp.net supports server side controls. Event driven programming is supported on server. It will reduce burden on developer.
3) Asp is requires manual coding to perform validation.
Asp.net doesn't required manual coding to perform validations.
4) Asp supports only inpapge techniques.
Asp.net supports inpage and code behind techniques.
5) Asp supports only inprocess session state.
Asp.net supports inprocess and out process session state.
6) Asp supports only entire page caching within client location.
Asp.net supports 3 types of caching.(output, fragment and data caching).
7)Asp supports ADO library for database connectivity.
Asp.net supports ADO.Net.
8) Asp doesn't support setup creation.
Asp.net supports setup creation.

[(the below message is for more clarity )].

ASP[Active Server Pages]:
=========================
Asp is a technology provided with IIS in the form of asp.dll for developing dynamic webpage with server
side coding. Asp supports server side coding with the help of VBScript or JavaScript.
Drawbacks of ASP:
=================
1)Lack of Peformance of ASP(because scripting languages are interpreter based languages).
2)No Proper memory management(Scripting languages cann't taken any data types).
3)Coding complexity and no readability(design part code and logic part code into single asp file).
4)No proper state management.
5)No proper caching(asp supports only client side caching, no server side caching).
6)No builtin security support.

To overcome the above problems the solution provided with .Net is Asp.Net.

ASP.NET:
========
Asp.Net is technology providing set of specifications for building web based application.
Asp.Net supports .Net languages for serverside coding ( but VC++.Net programming is not supported by asp.net).
Asp.Net provides two things for dynamic webpage creation with serverside coding.(Asp.Net = .Net languages support + Collection of Objects).

The current version is Asp.Net 4.0 , this provides the following features:
1) Session Shrinking
2) New controls ( Chart controls)
3) Url routing
4) Silver light Integration
5) MVC Support ( Model View Controller).


what is the STATE MANAGEMENT
================== =======
CLIENT SIDE STATEMANAGEMENT:
============================
1)Cookies :
===========

1) What do you mean by Cookie ?
Ans:
2)what are the avantages of Cookies ?
Ans: Following are main advantages of using cookies in web application:
•It's very simple to use and implement.
•Browser's taking care send data.
•For multiple sites cookies, Browser automatically arranges them.
3)what are the disavantages of Cookies ?
Ans: Main disadvantages of cookies are:
•Its store data in a simple text format. so it's not secure at all.
•There is a size limit of cookies data ( 4096 bytes / 4KB).
•Number if cookies also limited. Most Browser provides limits of storing cookies is 20 w.r.t a website.If new cookies came, it will discard the old one. The browser supports up to 300 w.r.t different websites.
•We need to configure browser. It will not work on a high security configuration of browser.
3)How to create cookies ?
Ans: For working with cookies we need to use namespace System.web
4)How to make Persistent Cookies ?
Ans:
5)Where does cookies are stored in local Hard drive ?
Ans:
6)How to remove a persistent cookies before it's Expiration time ?
Ans:
7)What is Cookie Munging?
Ans:
8)Why we are using Cookie Munging in ASP.NET ?
Ans:
9)How do you turn off cookies in your site?
Ans: Use the Cookie.Discard Property which gets or sets the Discard flag set by server. When true this property instructs the client application not to save the cookie on the users hard disk when a session ends.
OR
It can be turned off by mentioning cookie state= false in Web.Config file.
This will turn off session cookie.

2)Hidden Field
3)View State
4)ControlState
5)QueryString(URL)


SERVER SIDE STATEMANAGEMENT:
============================
1)Application
2)Caching
3)Session
4)Context

CACHING:
========
1)OutputCaching
2)FragmentCaching
3)DataCaching

Can we run asp.net application without WEB.CONFIG file ?
=========================================
ans : Yes, we can run an asp.net application without the WEB.CONFIG file. It means that the default configuration will be loaded from MACHINE.CONFIG file.

Can we add more than one Global.asax file to a website ?
=======================================
ans : No

What is the use of Global.asax File in ASP.NET Application ?
==========================================
ans : The Global.asax file is an optional file and can be stored in root directory.
This File is in accesible for web-sites. This Global.asax file contained in HttpApplicationClass.
In Global.asax file we can declare global variables like for example the variables used in master pages because same variables can be used for different pages right.
It provides more security than others.
The Global.asax file is used to handle application-level and session-level events.
we donot worry about configuring Global.asax because it is itself configured.
Accessing the Global.asax file can not be possible.
while one request is in processing it is impossible to send another request, we can not get response for other request and even we can not start a new session.
while adding this Global.asax file to our application bydefault it contains five methods,
Those methods are:
1.Application_Start. 2.Application_End. 3.Session_Start. 4.Session_End. 5.Application_Error.

Web User Control Vs Custom Control :
===========================
1) How can you access a control(like Text box value) value of a user control ?
2) How can you add the user control to a web page?


Difference between Machine.Config and Web.Config ?
==================================================

What is the Tracing ?
===============

SECURITY:
=========
What is Authentication & Authorization?
What are the types of the Authentications ?
What is Membership ?

ADO.NET :
========

LINQ :
=====

WEB SERVICES:
============

WEBPARTS :
=========

AJAX :
=====

SILVERLIGHT :
============

WCF :
====

WPF :
====

SHAREPOINT :
===========

Monday, June 27, 2011

SQL SERVER INTERVIEW QUESTIONS:

3) Constraints in Sql Server :
Ans : Constraint is a condition specified on column in table to maintain data integrity within the database.

NotNull- To Restrict the inserting Null to a column.
Default- To provide a default value for a column.
Unique -
Primary Key -
Check Constraint -
Super Key -
Candidate Key -
Alternate/Secondary key-
Foreign Key -
Composite Constraints -

4) What are the data types in sql server ?
Ans:
Exact numerics:
===========
bit - 1 (Byte)- boolean values
tinyint-1
smallint-2
int-4
bigint-8
numeric - 5 to 7
decimal - 5 to 7
smallmoney - 4
money - 8

Approximate numerics:
=====================

float - 4
real - 8

Date and time:
==============

date - 3 - 1/1/0001 to 31/12/9999
time - 5 bytes time only
smalldatetime - 1/1/1900 to 6/6/2079
datetime - 1/1/1753 to 31/12/9999
datetime2 - 1/1/0001 to 31/12/9999
datetimeoffset

Character strings:
==================

char
varchar
text

Unicode character strings:
==========================

nchar
nvarchar
ntext

Binary strings:
===============

binary
varbinary
image


Other data types:
=================

sql_variant
timestamp
uniqueidentifier
xml
cursor
table
hierarchyid
Geometry
Geography
Filestream


New data types in Sql Server 2008 are:

Datetime2
Datetimeoffset
hierarchyid
Geometry
Geography
Filestream

5)Whenever we want to change the name in the table freaquently then the datatype used is ?
Ans: Char

6) Which data type will be used to store the image and video files ?
Ans: For Image file ------ image data type
For Video file ------ binary/varbinary

7) Where’s the Boolean data type?
Ans: SQL Server doesn’t have a Boolean data type, at least not by that name.To store True/False, Yes/No, and On/Off values, use the bit data type.It accepts only three values: 0, 1, and NULL(NULL is supported by SQL Server 7.0 and later.).

8) What is the difference between smalldatetime and datetime?
Ans: Both smalldatetime and datetime store a combination date and time value,
but the minimum and maximum values, accuracy, and storage size are different,
as compared in below.we can use datetime even when all dates fall into smalldatetime’s range,if you require up-to-the-second accuracy.
Smalldatetime and datetime restrictions:

Data type Minimum value Maximum value
smalldatetime January 1, 1900 June 6, 2079
datetime January 1, 1753 December 31, 9999

9) what is Identity ?
Ans : Sql server provides identity options to automatically generate values for a column in a table, generally it is used for primary key or unique key columns.

Syntax: identity(seed,increment)

Seed : is used to specify the first valut to be generated by the identity.
Increment: is used to specify increment to be done everytime generates a new value while inserting a new row.
Ex : sid int primarykey identity(1001,1)
seed - 1001
increment-1

Identity Functions:

1)ident_seed('tablename')
2)ident_incr('tablename')
3)ident_current('tablename')
4)select @@ identity - Returns identity value generated by the last insert statement that may be on any table of that database.
5)Scope_identity


SCOPE_IDENTITY, IDENT_CURRENT, and @@IDENTITY are similar functions because they return values that are inserted into identity columns.

IDENT_CURRENT is not limited by scope and session; it is limited to a specified table. IDENT_CURRENT returns the value generated for a specific table in any session and any scope.

SCOPE_IDENTITY and @@IDENTITY return the last identity values that are generated in any table in the current session. However, SCOPE_IDENTITY returns values inserted only within the current scope; @@IDENTITY is not limited to a specific scope.

For example, there are two tables, T1 and T2, and an INSERT trigger is defined on T1. When a row is inserted to T1, the trigger fires and inserts a row in T2. This scenario illustrates two scopes: the insert on T1, and the insert on T2 by the trigger.

Assuming that both T1 and T2 have identity columns, @@IDENTITY and SCOPE_IDENTITY will return different values at the end of an INSERT statement on T1. @@IDENTITY will return the last identity column value inserted across any scope in the current session. This is the value inserted in T2. SCOPE_IDENTITY() will return the IDENTITY value inserted in T1. This was the last insert that occurred in the same scope. The SCOPE_IDENTITY() function will return the null value if the function is invoked before any INSERT statements into an identity column occur in the scope.

10) How can we get the last inserted/generated value in a row ( identity column value ) ?
Ans : ident_current('tablename')

11) What is the difference between Delete and Truncate ?
Ans : Both will be used to delete rows from the table.

Delete :
========
Sys: delete from tablename where colname=value
It can be used to delete only specific rows or all rows from the table.
It deletes the rows one by one.
It is slow when compared to truncate.
When identity is available on the table then if you delete all rows using delete command then identity value will not be reset to its seed.
Delete is a DML ( Data Manupulation Language ).

Truncate :
==========
sys: truncate from tablename
It can be used only for deleting all rows from the table.
It deletes the rows page by page.
It is fast when compared to delete.
When identity is available on the table then if you delete all rows using truncate command then identity value will be reset to its seed.
Truncate is a DDL ( Data Defination Language ).

1) What is the difference between Primary key and Unique key ?
Ans :
2) What is the difference between Stored procedure and Functions(user defined functions) ?
Ans :
3) What is the different types of joins ?
Ans :
4) waht is Self Join and how can we get the employees details and employee's manager name from below table?
Ex table - emp :
empno ename eloc emgr(empno)

Ans: Join a table to itself is called as selfjoin.

select e.empno,e.ename,e.loc,emgr,m.ename as "Manager Name"
from emp e innerjoin emp m on e.emgr=m.empno

.NET INTERVIEW QUESTIONS...

1) How to convert a DataSet to a DataReader ?
Ans : DataTableReader rd = ds.Tables[0].CreateDataReader();

2) What are the Expansions of MSIL, JIT, CLR, CTS, CLS and RCW ?
Ans : 1. MSIL - Microsoft Intermediate Language.
2. JIT - Just-In-Time compiler .
3. CLR - Common Language Runtime.
4. CTS - Common Type System.
5. CLS - Common Language Specification.
6. RCW - Runtime Callable Wrapper.

Friday, June 24, 2011

An Architect Is...

Accepting my responsibility as an architect, I will strive daily to learn and perfect my trade.

Readily will I defend my organization’s I.T. investments from complexity, our greatest enemy.

Changing requirements will not break my design for it will be flexible and able to change with the requirements.

Helping developers to understand the reasons for the architecture and seeking their input is of great importance to our success.

I will never use acronyms or suggest technologies that are not pertinent to the problem at hand.

Technologies evolve and I know that solid architectures should accommodate and enable these evolutions.

Every day, I will strive to help our software achieve ideals that will make it flexible and easy to maintain.

Concern for the success of my organization’s I.T. investments will drive me to make appropriate decisions.

Teaching others about my trade will be an overarching responsibility that I accept as a part of my duties.

Saturday, June 18, 2011

What's New in Visual Studio 2010 SP1 Beta

New Features in Microsoft Visual Studio 2010 and the .NET Framework 4.0

Download Links on Ajax toolkit 4.0 and installation Procedure Link

Softwares :

Windows Sharepoint 2007 Vhd adding for Virtual Pc 2007

http://www.adrive.com/public/a27f31272cbe2f975d99858ed3bcabbffae37b082684adf93d6343b4f56f27b2.html

Visual Studio 2010 trail software link

http://www.microsoft.com/downloads/details.aspx?FamilyID=5414e4c0-c1f8-473e-8e9d-a1a7be786141&displaylang=en

Installation for IIS in windows 7

http://www.adrive.com/public/031b87941916a7ee49ec42d5f7e76fa5fea55bc823787db83167068c2ba193c8.html

Java(JDK , JRE 6 )& Netbeans Links

http://www.oracle.com/technetwork/java/javase/downloads/index.html

Installation Document for .Net 2008 & iis for Xp

http://www.adrive.com/public/d8ea17fc420c71712d1fbefa47e18e2bfbb846ebbce08d29c3c6d567a66d0fa7.html

Microsoft Virtual Pc 2007 with sp1 (32bit / 64bit)

http://www.microsoft.com/downloads/details.aspx?familyid=28C97D22-6EB8-4A09-A7F7-F6C7A1F000B5&displaylang=en

Oracle 10g Express edition download link

http://www.oracle.com/technology/software/products/database/xe/index.html

Microsoft SQL Server Management Studio Express Editon 2005

Microsoft SQL Server Management Studio Express Edition 2005

http://www.microsoft.com/downloads/details.aspx?familyid=c243a5ae-4bd1-4e3d-94b8-5a0f62bf7796&displaylang=en

Sql Server 2008 Expression Edition Link

Microsoft® SQL Server® 2008 Management Studio Express Edition software link

Click here to download

download link for Windows XP Service Pack 3

This is for windows XP Service Pack 3 Download Link

http://www.microsoft.com/downloads/details.aspx?familyid=5b33b5a8-5e76-401f-be08-1e1555d4f3d4&displaylang=en

Download link for .net 2010 trail

Download link for visuval studio 2010
http://www.microsoft.com/visualstudio/en-us/download