Thursday, May 29, 2008

.net3.0

The WCF programming model unifies the various communications programming models supported in .NET 2.0, into a single model. Released in November 2005, .NET 2.0 provided separate APIs for SOAP-based communications for maximum interoperability (Web Services), binary-optimized communications between applications running on Windows machines (.NET Remoting), transactional communications (Distributed Transactions), and asynchronous communications (Message Queues). WCF unifies the capabilities from these mechanisms into a single, common, general Service-oriented programming model for communications.

WCF can use SOAP messages for communication between two processes, thereby making WCF-based applications interoperable with any other process that communicates via SOAP messages. When a WCF process communicates with a non–WCF process, XML-based encoding is used for the SOAP messages but when it communicates with another WCF process, the SOAP messages are encoded in an optimized binary format. Both encodings conform to the data structure of the SOAP format, called Infoset.

WCF uses a pluggable encoding system, allowing developers to write their own encoders[1]. With the release of the .NET Framework 3.5 in November 2007, Microsoft released an encoder that added support for the JSON serialization format to WCF[2]. This allows WCF service endpoints to service requests from AJAX-powered web pages.

[edit] Service oriented architecture

WCF is designed in accordance with Service oriented architecture principles to support Distributed computing where services are consumed by consumers. Clients can consume multiple services and services can be consumed by multiple clients. Services typically have a WSDL interface which any WCF client can use to consume the service, irrespective of which platform the service is hosted on. WCF implements many advanced web services (WS) standards such as WS-Addressing, WS-ReliableMessaging and WS-Security. While Microsoft is a board member of WS-I it is not clear how many WS-I profiles they are committing to support fully.

[edit] WCF Service

A WCF Service is composed of three parts — a Service class that implements the service to be provided, a host environment to host the service, and one or more endpoints to which clients will connect. All communications with the WCF service will happen via the endpoints. The endpoints specify a Contract that defines which methods of the Service class will be accessible via the endpoint; each endpoint may expose a different set of methods. The endpoints also define a binding that specifies how a client will communicate with the service and the address where the endpoint is hosted.

WCF provides Windows Activation Services which can be used to host the WCF service. Otherwise the WCF service can also be hosted in IIS or in any process by using the ServiceHost class, which is provided by WCF. Services can also be self-hosted, in a console-based application or a Windows-forms application for example.

[edit] Defining WCF services

In programming code, a WCF Service is implemented as a class. The class typically implements a Service Contract - a specially annotated interface whose methods stipulate the operations that the service performs. Typically, the methods on the interface accept inputs and output messages, which conform to Data Contracts, described with specially annotated classes. Think of these as Data Transfer Objects.

The Data and Service Contracts are defined using annotations in programming code, known formally in .NET as Attributes. Any class that is to be exposed as a WCF service must be either marked with the ServiceContract attribute, or implement an interface marked with it. All methods in the class or interface that a client can invoke using SOAP messages must be marked with OperationContract attribute. All classes or structures that define the data to be passed into or out of the operations are marked with the DataContract attribute. The attributes support the automatic generation of WSDL descriptions for the exposed methods, which can then be accessed by clients, or advertised to them.

A service can expose multiple Service Contracts. This can be done by defining multiple .NET interfaces, each marked as a Service Contract. The service class can then implement all the interfaces.

The ServiceContract and OperationContract attributes also allow an interface to reference a previously existing contract, thus providing an option for supporting interface versioning.

All Service Contracts have an associated implicit or explicit Data Contract which defines the data that the service works on. If the parameters accepted and returned by the service methods consist of primitive types (integer, double, boolean, etc), then the Data Contract is defined implicitly by WCF. If, on the other hand, the data is of a complex type like an object or a struct, then it must be defined explicitly by the programmer via attributes. Data contracts specify how the data is serialized and de-serialized, allowing for custom representation of objects passing in and out.

A Data contract is defined by using a DataContract attribute on a class or structure. Members of the data structure which will be used by the service need to be marked with the DataMember attribute. Only those members will be transferred between the service and its client. In the same way that different classes can implement the same interface, different classes can implement the same Data Contract, and can serialize and de-serialize the same data. Taking the idea further, a .NET class defined in C# or VB can implement a Data Contract, and serialize to a data packet, that can then be de-serialized by a Java class or a PHP class.

The behavior of the Service in general and the operations in particular can be controlled using the ServiceBehavior and the OperationBehavior attributes respectively. The ServiceBehavior attribute has different properties. The ConcurrencyMode property specifies whether the service will be concurrent, i.e., whether it will support simultaneous clients or not. Similarly, the InstanceMode property specifies whether a single instance of the service will serve all requests or a new instance of the service will be created for each request, or a new instance of the service will be created for each session.

[edit] Defining Endpoints

A WCF client connects to a WCF service via an endpoint.

Each Service exposes its Contract via one or more endpoints. An endpoint has an address, which is a URL specifying where the endpoint can be accessed, and binding properties that specify how the data will be transferred.

The mnemonic "ABC" can be used to remember Address / Binding / Contract. Binding specifies what communication protocols are used to access the service, whether security mechanisms are to be used, and the like. WCF includes predefined bindings for most common communication protocols such as SOAP over HTTP, SOAP over TCP, and SOAP over Message Queues etc.

When a client wants to access the service via an endpoint, it not only needs to know the Contract, but it also has to adhere to the binding specified by the endpoint. Thus, both client and server must have compatible endpoints.

[edit] Communication with the service

A client can communicate with a WCF service using any of the RPC-based mechanisms in which the service can be invoked as a method call. Using synchronous communications, any call to the service will be blocking - that is, it will halt the execution of the client until the service processes the request. The client has to connect to a service using a proxy object, which is connected to the specified endpoint of the service and abstracts the service as an object. All method calls to the proxy object will be routed to the service and the proxy will return the results returned by the service to the caller.

Tools shipped with the .NET Framework SDK can consume WSDL and create client-side proxy classes for use with WCF. Such classes handle the serialization and data transmission to and from the service, as well as faults and exceptions.

WCF also supports non-blocking (asynchronous) calls between client and service, via several mechanisms. One option is to use Message Queues as the transport for the delivery and receipt of the messages. (Keep in mind that the use of Message Queues does not imply a change to a Put/Get style programming model. Even with the use of persistent queues, the programming model still uses friendly proxy classes.) A second mechanism for supporting asynchronous communications is via multiple threads - there is a simple mechanism to do this in the generated client-side proxies for WCF. (see Calling WCF Services asynchronously)

In addition to the higher-level programming model supported by the tool-generated proxy classes, WCF exposes a lower-level programming model where applications manually construct and pass messages to services. Communicating using messages does not require the use of the proxy object, and provides more control, although lower usability, to the programmer.

[edit] REST Support in WCF

In the .NET Framework 3.5, WCF added support for REST-style communications. Developers can specify URL Templates on Operation Contracts, to allow methods to be invoked when requests on specific URLs are received. Parameters from the URLs can be automatically extracted and passed to the method. JSON and plain-old-XML data serialization is supported, as well as alternative mechanisms for binary return types (such as JPG).

Cluster index vs non cluster

he difference is that, Clustered index is unique for any given table and we can have only one clustered index on a table. The leaf level of a clustered index is the actual data and the data is resorted in case of clustered index. Whereas in case of non-clustered index the leaf level is actually a pointer to the data in rows so we can have as many non-clustered indexes as we can on the db.

MSIL

Microsoft Intermediate Language

MSIL is the CPU –independent instruction set into which .Net framework programs are compiled. It contains instructions for loading, storing initializing, and calling methods on objects.

CLR

Common Language Runtime is the execution engine for .NET Framework applications. It provides a number of services, including the following.Code management (loading and execution), Application memory isolation, Verification of type safety, Conversion of IL to native code , Access to metadata (enhanced type information), Managing memory for managed objects, Enforcement of code access security, Exception handling, including cross-language exceptions, Interoperation between managed code, COM objects, and pre-existing DLLs (unmanaged code and data), Automation of object layout, Support for developer services (profiling, debugging, and so on)

CTS

The common type system is a rich type system, built into the common language runtime, that supports the types and operations found in most programming languages. The common type system supports the complete implementation of a wide range of programming languages.

CLS

The Common Language Specification is a set of constructs and constraints that serves as a guide for library writers and compiler writers. It allows libraries to be fully usable from any language supporting the CLS, and for those languages to integrate with each other. The Common Language Specification is a subset of the common type system. The Common Language Specification is also important to application developers who are writing code that will be used by other developers. When developers design publicly accessible APIs following the rules of the CLS, those APIs are easily used from all other programming languages that target the common language runtime.

Managed code

Managed code is code that is written to target the services of the common language runtime . Managed data—data that is allocated and de-allocated by the common language runtime's garbage collector

Namespace

A namespace is a collection of different classes. All .Net applications are developed using classes from the .NET System namespace. The namespace with all the built-in functionality is the System namespace. All other namespaces are based on this System namespace

Assembly

Assemblies are the building blocks of .NET Framework applications.
they form the fundamental unit of deployment, version control, reuse, activation scoping, and security permissions.
An assembly is a collection of types and resources that are built to work together and form a logical unit of functionality. An assembly provides the common language runtime with the information it needs to be aware of type implementations. To the runtime, a type does not exist outside the context of an assembly.

Manifest

Every assembly, whether static or dynamic, contains a collection of data that describes how the elements in the assembly relate to each other. The assembly manifest contains this assembly metadata. An assembly manifest contains all the metadata needed to specify the assembly's version requirements and security identity, and all metadata needed to define the scope of the assembly and resolve references to resources and classes. The assembly manifest can be stored in either a PE file (an .exe or .dll) with Microsoft intermediate language (MSIL) code or in a standalone PE file that contains only assembly manifest information.

GAC

Each computer where the common language runtime is installed has a machine-wide code cache called the global assembly cache. The global assembly cache stores assemblies specifically designated to be shared by several applications on the computer.There are several ways to deploy an assembly into the global assembly cache:
1)Use an installer designed to work with the global assembly cache. This is the preferred option for installing assemblies into the global assembly cache.
2)Use a developer tool called the Global Assembly Cache tool (Gacutil.exe) provided by the .NET Framework SDK.
3) Use Windows Explorer to drag assemblies into the cache.

DLL Hell

DLL hell is a colorful term given to any problem based on a difficulty in managing Dynamically Linked Libraries (DLLs) installed on a particular copy of an operating system. This includes conflicts between various versions of these libraries, difficulty in obtaining a large number of such libraries, and/or having many unnecessary copies of different versions (which can cause both disk space and performance problems).

Value Type - Reference Type

What are Value types and Reference types? Reference types are stored on the run-time heap; they may only be accessed through a reference to that storage. Because reference types are always accessed through references, their lifetime is managed by the .NET FrameworkValue types are stored directly on the stack, either within an array or within another type; their storage can only be accessed directly. Because value types are stored directly within variables, their lifetime is determined by the lifetime of the variable that contains them

Thursday, August 16, 2007

stored procedure

Connected Architecture:-
when the application maintains d.b table information by maintain connectivity with datebaseserver,then it is called as C .A
When th....0e application maintains db table information without maintaing connectiveity with db serrver
Recordset can't mainain data from multiple databases.
it doesn't supports constaints.
Rs will manage data internally in the form of ADTG(Active data table gram) format.
This is a binary standard format ZC12089-NBDG-452A
rc cnnot maintain from multipel databases.
rs does not support conditions.
rs will manage data internally in the form under adrg format.
When the application maintain d.b table information by maintain connectivity from db server.
..........................................................................................What is the difference between Userdefined Functions and Stored Procedures in Sql server?..........................................................................................

Stored Proc is a precompiled object which is used to increase the performance of your application.A stored procedure is a program (or procedure) which is physically stored within a database.
Function
A user-defined function is a routine that encapsulates useful logic for use in other queries. It can have multiple SELECT statements
Both functions and procedures can return values. Apart from this following are the differences
1) Functions are used for computations where as procedures can be used for performing business logic
2) Functions MUST return a value, procedures need not be.
3) You can have DML(insert,update, delete) statements in a function. But, you cannot call such a function in a SQL query..eg: suppose, if u have a function that is updating a table.. you can't call that function in any sql query.- select myFunction(field) from sometable; will throw error.
4) Function parameters are always IN, no OUT is possible
5) Function returns 1 value only. procedure can return multiple values(max. 1024)
6) Stored Procedure :supports deffered name resoultion Example while writing a stored procedure that uses table named tabl1 and tabl2 etc..but actually not exists in database is allowed only in during creation but runtime throws error Function wont support deffered name resolution. Stored procedure returns always integer value by default zero. where as function return type could be scalar or table or table values(SQL Server). Stored procedure is pre compiled exuction plan where as functions are not.
7) A procedure may modifiy an object where a function can only return a value
-------------------------------------------------------------------------------------------------------------------------------------------------------------Template Column:-
This column will act as a container for placing web server control within datagrid.
Paging:- Paging is a concept of maintaining the db tables information into different blocks.where each block is called as page.Datagrid will present only one page information at a time to the client.This is recomnaded when there is more no of records.
functions are used for computations .As procedures can be used for performing business logic.
function must return for single value.Procedure ned not be.function return a value and procedure returns multiple values..(max1024) A procedure may modify object ,where a function can only returns a value.function praarameters are always In.no out possible.
s.p is a compilation object which is user to increase the performence of ur application.s.c is a programe which is stored in db
udf:-userdefined function is routine encapsulates useful logic for use the other quires.It can have multiple select statements
Typed Dateset :-
A Typed dataset is a class inherited from dataset class with additional properties & mtds called as strongly typed properties & methods. Fuatures of typed dataset...1) it will make developer job easier.2)It provides more clarity to the application.3) It will change the datatype of the application

difference between trigger and stored procedure

Actually triger in action which is performed automatically before or after a event occur and stored procedure is a procedure which is executed when the it is called. Stored procedure is module.

1. Triggers are implicitly called by DB itself while SP has to be manually called by user.
2. SP can pass the parameters which is not a case with Triggers.
3. While creating a Trigger, triggering event n action has to be specified, which isn’t a case with SP.
4. A Trigger can call the specific SP in it but the reverse is not true.

Stored procedures are compiled collection of programs or SQL statements that live in the database. A stored procedure can access and modify data present in many tables. Also a stored procedure is not associated with any particular database object. But triggers are event-driven special procedures which are attached to a specific database object say a table. Stored procedures are not automatically run and they have to be called explicitly by the user. But triggers get executed when the particular event associated with the event gets fired. For example in case of a database having say 200 users and the last modified timestamp need to be updated every time the database is accessed and changed. To ensure this one may have a trigger in the insert or update event. So that whenever any insert or update event of the table gets fired the corresponding trigger gets activated and updates the last modified timestamp column or field with the current time. Thus the main difference between stored procedure and trigger is that in case of stored procedure the program logic is executed on the database server explicitly under eth user’s request but in case of triggers event-driven procedures attached to database object namely table gets fired automatically when the event gets fired.

Tuesday, July 31, 2007

oracle date functions

Date functions

Months_between (’01-sep-95’,’11-jan-94’) =====19.67774194
Add_months(’11-jan-94’,6)------’11-jul-94’
Next_day(’01-sep-95’,’friday’)----’08-sep-95’
Last_day(’01-feb-95’)--------’28-feb-95’



Using date functions

Assume sysdate = ’25-jul-95’;

Round(sysdate,’month’) – 01-aug-95
Round(sysdate,’year’) – 01-jan-96
Trunc(sysdate,’month’) – 01-jul-95
Trunc(sysdate,’year’) – 01-jan-95



YYYY ---- full year in numbers
YEAR ----YEAR SPELLED OUT
MM --- TWO DIGIT VALUE FOR MONTH
MONTH ----FULL NAME OF MONTH
MON -----THRE LETTER ABBREVIATION OF THE MONTH
DY-----THREE LETTER ABBREVIATION OF THE DAY OF THE WEEK
DAY ------FULL NAME OF THE DAY OF THE WEEK
DD- NUMERIC DAY OF THE MONTH


TYPES OF JOINS

EQUIJOIN
Non equijoin
Outer join
Self join
Cross joins
Natural joins
Using clause
Full ot two sided outer joins
Arbitrary join conditions for outer joins

If u want to join n tables together you need a minimum of n-1 conditions

Equijoins:

Equi joins are also called simple join or inner joins

Select * from employees,departments where employye.dept_id = departments.dept_id

Non equi joins:

Select * from employee e,job_grades j where e.salary between j.lowest and j.highest

Outer Joins Syntax:

You use an outer join to also see rows that do not meet the join condition
The outer join operator is the plus sign(+)

Select table1.column,table2.column from table1,table2 where table1.column (+) = table2.column

Self Joins :

Some times you need to join a table to itself . To find the name of each employee’s manager, you need to join the employees table to itself or perform a self join

Creating Cross Joins :

The cross join clause produces the cross product of two tables
This is the same as a Cartesian product between the two tables

Select last_name, department_name from employees,departments;

Natural Joins :

The natural join clause is based on all columns in the two tables that have the same name
It selects rows from the two tables that have equal values in all matched columns
If the columns having the same names have different data types, an error is returned


The natural join can also be written as an equi join



CREATE OR REPLACE TRIGGER ex
AFTER INSERT ON ex2
FOR EACH ROW
DECLARE
ex1 number(10);
ex22 number(10);
BEGIN
ex1 := :NEW.ex1 ;
ex22 := :NEW.ex22 ;
insert into ex3
VALUES(ex1,ex22);
end;


SELECT EX1,
DECODE (LEN(EX2,0),
3,***,
4,****,
5,*****,
6,******,
7,*******,
8,********) HAI
FROM EX4

asp.net interview questions

§ ASP Question & Answers

1. JavaScript File?
Java Script file is a collection of sub programs, which provides reusability for set of WebPages.
2. What is the Basic Function of Web Server?
Managing resources and responding to client request is basic function of server.
3. Web Server?
It is software for managing web pages this will accept HTTP request and responds with HTTP response hence it is called as HTTP server.
- Web server will provide security for the file system.
- Web server will provide server side execution for communicating with database server so on
- Microsoft:
· Personal web server (PWS)
· Peer web server
· Internet Information services (IIS)
4. IIS?
Internet Information services, It will carry website. It is called as default website. It will map to physical path C:\Inetpub\wwwroot
5. Virtual Directory?
Virtual directory is an alias for physical directory managed by web server. This is required to perform categorization of web pages for faster access and to implement security.
6. Inetmgr.exe?
Internet Services Manager, Tool for configuring web server.
Creating virtual directory or creating website
And Changing physical path of website.
7. ASP?
Active Server Page, Is not a language. It can be called as technology integrated with web server IIS. This comes in the form of a DLL file called ASP.DLL.
This ASP provides server side execution.
It provides collection of objects called as ASP objects (Response, Request, Session, Application, Server, AspError)
8. ASP page?
Its Extension is .asp. It can have HTML Tags, Text, Client side Scripting
9. Response & Request Objects?
When client makes a request to the web server lot of information will be transmitted from client system to the web server. This information includes IP Address of the client system, browser information, form data…etc.
Request Object is required to read the information, which comes with client.
Response object is required to send information from the web server system to the client browser.
10. What is submission of Data?
When client is providing data to the web server then it is called as submission of data or page submission.
Page submission: 1) HTML Page---------ASP Page
2) ASP Page ----------- ASP Page
11. What is Postback Implementation?
When the page is submitting to the itself then it is called as postback implementation. Ex: sum.asp-------sum.asp
12. ASP.Net?
ASP.Net is a technology integrated with .Net framework for web based application development.
NET Framework installation will configure web server with a run time module called as ASPNET_ISAPI.DLL. This will act as a mediator between web server and .NET framework.
ISAPI- Internet server Application Programming interface.
· In ASP.Net by default method will be post.
· ASP.Net web page will support only one form with runat server
· ASP.Net web page will support only one .Net language through out web page.
13. Differences between ASP 3.0 & ASP.NET?
ASP
ASP.NET
It supports scripting languages VB, Java Script. These languages are interpreter based. This makes execution slow which will affect performance of the server.
It supports .NET languages VB.NET,C#.NET … .These languages are compiler based. This makes execution faster. It will improve the performance of server.
No proper memory management.
Provides proper memory management
It does not support server side controls. This makes developer job complex.
It supports server side controls. This make developer job easier & more clarity comes into coding.
It supports only Inpage technique.
It supports Inpage technique & code behind technique.
It requires manual coding to perform validations.
It does not require manual coding to perform validation. This makes application development faster.
It supports only inprocess session & optimization of session of state is not supported.
It supports inprocess, outprocess session & optimization of session state is supported
It supports ADO library for database connectivity ADO doesn’t support complete disconnected architecture & XML integration.
It supports ADO.NET for database connectivity ADO.NET supports complete disconnected architecture & XML integration.
It supports only entire page caching towards client system.
It supports 3 types of caching
1. Output caching
2. Fragment caching
3. Data caching
It doesn’t provide built in security.
It provides built in security in the form of authentication and authorization. It supports 3 types of authentication.
1. Windows based
2. Forms based
3. Passport Authentication
It does not support setup creation.
It supports setup creation
It does not support business-to-business communication.
It supports business to business communication with XML web-services

14. Base Class Libraries?
The Libraries, which comes with .Net framework installation, are called as base class libraries.
This will be around 64 libraries developed by Microsoft with using c# . These will be common libraries for all the .Net languages.
Ex: System.Dll,
System.Data.Dll,
System.Web.Dll (for ASP.Net)
Microsoft.Visualbasic.Dll
15. Is C# case Sensitive language?
Yes.
16. What is InPage Technique?
When the designing part & logic part is maintained within a single file called as ASPX then it is called as Inpage Technique This is required for the migration of projects. I.e. converting ASP page to ASP.Net.
17. What is Code Behind Technique?
When the designing part is maintained with in ASPX file & logic part is maintained within a DLL file then it is called as code behind technique. This supports parallel development of designing part & logic part, this makes application development faster and the security is provided to the logic part.
18. Features of Server side control?
i. It will reduce burden on the developer.
ii. It provides more clarity into the web page.
iii. It supports view state implementation.
iv. Server side control will produce HTML content. i.e., client side control to the browser
Microsoft is providing two types of web server controls.
1) HTML Server controls.
2) Web Server Controls
19. HTML Server Control?
1) This control will follow similar syntax of HTML client side controls.
2) It does not support extensibility. Microsoft does not provide new controls into this category in the future versions of ASP.Net.
3) The purpose of HTML server controls is to be making migration easier.

System.web.Dll:
System.web.ui.HTMLControls
HTML Control is a base class for all the HTML server controls.
HTML Input Controls: Button, Textbox
HTML Container: Form, select, Button, Span
HTML Image etc.

· In ASP.Net by default method will be post.
· ASP.Net web page will support only one form with runat server.
· ASP.Net web page will support only one .Net Language through out web page.
20. Web Server Controls?
1) These controls are advanced controls compared to HTML server controls.
2) These Controls are called as smart controls; these controls will produce HTML contents based on requested browser.
3) These Controls will support extensibility where the Microsoft can provide new controls in the future versions & developer can create user defined web server controls.
4) These controls will support data binding.
5) These controls will support XML based Syntax.
6) Web server controls can be categorized into four types.
· Basic controls: label,textbox,checkbox,radiobutton,button
· Rich Controls: AdRotator, Calendar.
· List Controls: Data grid,Repeater,Datalist.
· Validation Controls: Required field validator, Range validator, compares valuator
21. View State Architecture?
View state is a concept of maintaining controls properties under post implementation. This is implemented using the hidden fields

1) It will reduce burden on the developer, as it does not require any programming from the developer.
2) It will not reserve the memory permanently at client side or server side.
3) The problem with the view state is more amount of date transmission will take place.
4) The view state can be controlled i.e. configured at 3 levels
· Control level.
· Page level.
· Application level.
22. ASP .Net Worker Process?
ASP.Net Worker process can be called as ASP.Net run time.
This will maintain HTTP application factory & page handler factory.
HTTP application factory will maintain all the application names, which are load into worker process.
Page Handler factory will maintain all the web page names for which DLL exists.
When client makes a request to the web server. It will forward the request to ASPNET-ISAPI.DLL.
ASPNET-ISAPI.DLL will send application name & web page name to worker process. ASP.Net worker process will verify application name with HTTP application factory. If it is not available then it will create a block of memory & files related to the application will be loaded into memory.
This memory block is called application domain.
The requested web page will be verified with page handler factory if it is not available the request will be forwarded to the HTTP pipeline.
HTTP Pipeline is a collection of .Net framework classes, which will produce DLL file for the web page.
The request will be forwarded to HTTP runtime, this will create an object of web page class & makes a call to process request method.
This process request method will start the page execution. It will perform following things.
· Initializing memory.
· Loading viewstate Data & executing post back event.
· Producing i.e. Rendering HTML content.
· Releasing Memory.
The set of events will be executed for the page class towards process request. Method execution. These events are called as page lifecycle events.
Init Event
Load Event
Pre Render Event
Unload Event

23. Difference Between Web Matrix and Visual Studio.Net?
Web Matrix
VisualStudio.NET
It supports only web based application development i.e., ASP.Net web page or ASP.Net web service.
It supports different types of .NET application development.
It will consume less amount of memory.
It will consume more amount of memory.
It does not support intellisense.
It supports intellisense.
It does support debugging.
It supports debugging.
It does not require IIS. It will carry a personal web server called as CASSINI server.
It requires IIS for ASP.Net web page creation.


24. Response. Redirect?
It will send the instruction to the browser to call a particular web page.
Response. Redirect will have an overhead of request & response. This will make communication slow; this problem can be overcome using Server. Transfer method.
25. Server. Transfer?
Server.Transfer is applicable to redirection of the page within the application. If it is between applications. Response.Redirect is applicable.
26. Auto Post Back?
By default postback functionality i.e., making request to the server is provided with button link button & image button. When we want to provide postback functionality to other controls Auto PostBack property is required.
This property is not provided with HTML server controls.
27. Use of Validation Controls?
· It will reduce burden on the developer and makes application development faster.
· Developer will lose certain flexibility.
· It supports client side validation or server side validation.
· When it is client side validation the controls are browser dependents. I.e., supported by only Internet explorer.
· More than one validation control can be used with a single textbox.
· When the validation fails within the web page. The page submission will not take place.
· The server side validation can be performed by providing enable client script property as FALSE
28. How the Compare Validator Works?
It Support 3 types of validations.
· Data Type Checking
· Comparing Textbox data with constant using relational operator.
· Comparing two textboxes using relational operator.
29. XML file?
The Extensible Markup Language (XML) is a general-purpose markup language. Its primary purpose is to facilitate the sharing of data across different information systems, particularly via the Internet.
It is a simplified subset of the Standard Generalized Markup Language (SGML), and is designed to be relatively human-legible. By adding semantic constraints, application languages can be implemented in XML. These include XHTML, RSS, MathML, GraphML, Scalable Vector Graphics, MusicXML, and thousands of others. Moreover, XML is sometimes used as the specification language for such application languages.
The World Wide Web Consortium recommends XML. It is a fee-free open standard. The W3C recommendation specifies both the lexical grammar, and the requirements for parsing.
30. Advantages of Code Behind Technique?
· It Support parallel development of designing part & logic part. This makes application development faster.
· If provides security for the logic part by maintaining in the form of DLL file.
31. What is Impression Tag in advertisement on Web page?
Impression tag will specify priority or importance of the advertisement. The advertisement with more impression will be given to more number of clients.
If there is no impressions for the advertisement one advertisement after another advertisement will be given to clients.
32. What is Frameset?
Frameset is used to split a browser window into different partitions. Where each partition is called as a frame. A frame can display one web page information.
33. What is Required Field Validator?
Textbox should not be blank.
34. What is Range validator?
It will validate textbox data within a particular Range only.
35. Validation control Architecture?
When client makes a request to the web page concern java script file webuivalidation.js (say) file will be downloaded to the client system and validation control will produce span tag. This span tag will make a call to JavaScript junction present within webuivalidation.js file to validate textbox.
36. Regular Expression Validator?
Textbox data will be validated based on a particular pattern (or) expression.
Ex: Expression:\d{5}------ only 5 digit number
\d{1,5}----1-5 digit number
\D {5}------String with 5 characters
[A-Z]{5}—Upper Case only 5 char
[a,e,i,o,u]{3}—
37. Custom validator control?
· This control supports client-side validation & server –side validation.
· The developer has to provide logic for validation.
· When the developer wants to synchronize custom validation with validation controls, then custom validator control is required.
38. Validation summary control?
It will display all the error messages at one place. It will show in a single page. It will not show individual error messages.
· If show summary is true in property then error messages will be displayed on the browser window.
· If show message box is true in property then error messages will be within dialogbox
· If all the validations within a web page is successful, isvalid property of the page class will be true..
39. Various Techniques of State Management?
1) Page submission, query string (appending data to the URL).
Asp.Net supports only Post-back implementation i.e. submitting page to itself. Asp.Net 2.0 supports cross-page submission.
2) View State (New in ASP.Net), hidden field.
3) Cookies
4) Session
5) Application
6) Cache (new in ASP.Net)
40. Cookies?
Cookie can be defined as small amount of memory used by the web server within client system.
The purpose of cookies is to maintain personal information of the client i.e., username, password, no. of visits last visit date etc.,
The cookies can be classified into two types.
1) Inmemory cookie
2) Persistent cookie.
41. What is Inmemory Cookie?
When the cookie is represented within browser process memory then its is called as in-memory cookie. This will be a temporary cookie.
42. What is Persistent Cookie?
When the cookie is maintained on the hard-disk memory, then it is called as persistent cookie. This will be provided with a particular life-time.
43. Restrictions in using Cookies?
1) No security for cookies.
2) A cookie can represent maximum of 4kb data only.
3) Browser will support maximum of 20 cookies towards a web-side.
4) If the requirement is more than 20 cookies, the solution will be “Dictionary Cookie”(Multi value cookie).
5) Dictionary cookie can be defined as collection of key and value pairs
44. Object models in Database connectivity by Microsoft?
Driver provider will act as an interpreter between client application and database server. When the developer is using API functions, lot of manual coding is required this will be a burden for the developer to reduce this burden. Microsoft is providing object models.
· DAO
· RDO
· ADO
45. What is DAO?
DAO (data Access Objects) DAO is a layer designed above Jet Driver.
DAO has become bulky library with 124 objects. It is not recommended for the remote database communication. This has been let to the invention of RDO library.
46. What is RDO?
RDO (Remote Data Objects) is designed based on ODBC driver programming for remote DB connectivity.
RDO is a thin layer; above ODBC this will provide faster communication. It will improve the performance of application.
The main problem with RDO is maintenance will not be easier because, ODBC driver will be maintained in the client system.
Requirement:
· Single technology for accessing any type of data.
· The technology should be maintained on the server machine.
Towards this requirement Microsoft has introduced OLEDB technology. Which will replace ODBC
47. What is ADO?
ADO (Activex Data Objects) is designed based on OLEDB (Object linking Embedded Data Base) provider programming for accessing any type of data i.e., universal data access.
Problems with ADO:
· It is based on COM; COM is a binary standard to windows operating system, so it is platform dependent.
· It does not support compete disconnected architecture.
· It does not support integration with XML.
· It requires performance improvement
These problems has been over come under .NET framework, by introducing ADO.NET
48. What is Connected and Disconnected Architecture?
When the application is maintaining Database Table information by maintaining connectivity with database server, then it is called as connected architecture.
When the application maintains Database Table information without maintaining connectivity with database server, then it is called as disconnected architecture.
49. What is ADO.NET?
System.Data.DLL
· .Net managed –Data provider—It provides connected architecture.
· Dataset—Data storage – It provides complete disconnected Architecture with XML Integration
.Net Managed Data provider:-
Microsoft is providing 4 .Net managed Data providers.
1. OLEDB.NET from .Net 1.0
2. SQLSERVER.NET from .Net 1.0
3. ORACLE.NET from .Net 1.1
4. ODBC.NET from .Net 1.1
Oracle Corporation is providing a .Net managed data provider called as ODP.Net. This is called as third party .Net managed data provider.
This is compatible with oracle 9i & later versions of Oracle.
50. OLEDB.NET?
OLEDB.Net will communicate with COM based code, this requires set of conversions internally, this will consume more time for processing, this will effect the performance of the application.
Developer is bounded to use OLEDB.Net, in following cases.
· To communicate with Oracle version less than 8i.
· To communicate with SQL-Server version less than 7.0
· To communicate with local Data Bases.


51. OLEDB Connection?
Dim Con as new OLEDBConnection (“Provider=; User Id=; password=; Data Source=”)
Con.open ()------It will establish connection
Con.close ()-----It will close connection
Provider Name:-
· MSDAORA.1 --------------------------Oracle
· SQLOLEDB.1 -------------------------SQL Server
· Microsoft.Jet.OLEDB.3.5.1 or 4.0---JET (Dbase, foxpro, Access)
· MSIDXS.1------------------------------Index server
52. OLEDB Command?
It will represent SQL statements.
Dim Cmd as new OLEDBCommand (“SQL statement”, Con)
53. DataReader?
Data Reader will read only one record at a time into the client application process, this will allocate less amount of memory, within the client application process i.e., only one record memory will be allocated.
Data reader is strongly recommended when the application has to read data only once & there is large amount of data.
Dim Dr as OLEDBDataReader
Dim cmd As New OLEDBCommand (“select * from Dept”,con)
Dr.= cmd.ExecuteReader

Data Reader is connection oriented it will make use connection exclusively.
A Database server will support only one memory block for the connection; this makes datareader-using connection exclusively.
SQL Server 2005 will support more than one memory block for a single connection in this case; connection will not be used by datareader exclusively
54. Stored Subprogram?
Stored subprogram (procedure) can be defined as unit of compiled code maintained by database server with a particular name.
Advantages:-
· It will reduce network traffic
· It provides reusability
· Better performance, execution faster.
· Better maintenance.
· It provides security for Database tables. The privilege can be given on the stored sub program without providing access to database tables.
55. DataSet?
Towards Business to business (B2B) Requirement Record Set can not be used for the following reasons.
· Record set will manage data in the form of single table format. If the requirement is multiple tables information joint condition is required, This will break the normalization it occupies more memory and manipulation will not be supported.
· Record set can not maintain data from multiple databases.
· Recordset does not support constraints.
· Recordset will manage data internally in the form of ADTG format [Active Data Table Gram Format] this is binary format.
· This is a binary standard format i.e., O/S specific, so it can transmitted only under windows network.
These all problems have been over-come under ADO.Net by introducing DataSet.
DataSet:
· Dataset can be defined as inmemory database for the client application process. This will maintain collection of tables called as data tables.
· Dataset is purely disconnected implementation with XML representation of Data storage.
56. DataAdapter?
Data Adapter will act as a mediator between dataset and database server, this will maintain collection of command objects.
Data Adapter will perform two things
· It will read Data from Database into Dataset
· It will update dataset manipulations to database sever.
57. Oracle.Net?
Oracle.Net will implement native protocol programming of oracle Database server. This provides faster communication; It will improve the performance of application.
According to M/S testing it will provide 60 to 70% performance gain over OLEDB.NET.
It is supported with Oracle 8i and later versions.
Ex:
Dim Con as new OracleConnection(“User id=Scott;password=tiger;data source=servername”)
Dim Da as new Oracle DataAdapter (“Select * from emp”,Con)
Dim Ds as new DataSet
Da.Fill(Ds,”emp”)
Ds.Tables(“emp”)
58. Datatable fill method by dataadapter?
· It will establish connection to database server.
· It will send select statement to database server using datareader. It will read record by record into dataset memory.
· It will close connection


59. When Paging with Data Grid is recommended?
Paging is a concept of maintaining dataset table information into different blocks where each block is called as page information at a time to the client. This is recommended when there is more no. of records.

60. Why DataGrid does not support paging with datasource as datareader?
Because DataReader doesn’t have a property to provide total no. of records.
61. What are the Columns in DataGrid?
· Bound Column----default
· Template column
· Edit command column.
· Button column
· Hyper link column.
62. What is Template Column in DataGrid?
This column will act as a container for placing web-server control within datagrid.
This provides two templates
· Item template (Item template will be presented when the record is in normal mode. Edit)
· Edit item template (item template will be presented when the record is in edit mode)
Using find control method can access the Control within the template column.
63. What is Typed DataSet?
A typed Dataset is a class inherited from dataset class with additional properties & methods called as strongly typed properties & methods.
Features of Typed Dataset:
· It will make developer job easier.
· It provides more clarity into application
· Data type checking will be done at compilation time.
· Primary key constraint will be applied for the dataset table if the back end table having primary key column.
Ex:
Dim Ds as new dataset------untyped dataset
Ds.Tables(“emp”)
Ds.Emp ----X
Ds.Tables(“emp”).Rows(0).Item(0)
Ds.emp(0).empn-------X

Searching Record.
Dim R as DataRow
R=Ds.Tables(“emp”).Rows.find(---)
R=Ds.Emp.FindByEmpno(--)

Class dataset1 inherits dataset
Properties..
Methods…
End class
64. What is UnTyped DataSet?
· When there is a possibility of changing the tables structure. It is not recommended to go with typed dataset because it will not be reflected on the typed dataset table. I.e.,
Dim Ds as new Dataset1
· When the method call is returning a dataset it can be ferenced by using untyped dataset.
65. What is Edit Command Column?
It is a collection of 3 buttons Datagrid
Edit itemindex-----property
· -1 --------All the rows will be proved with edit button.
· >=0-------Row will be provided with save, cancel buttons and bound columns will be provided with textboxes.
Edit Button:
· This will perform post-back, edit command event of the datagrid will be executed. This event will provide row index selected by the user. Private sub DataGrid_EditCommand(__,e __)
Response.Write(e.item.itemindex)
Datagrid1.edititemindex=e.item.Itemindex
Call fillgrid()
End sub
66. What is DataList?
· It will provide more no. of templates compared to repeater control.
· It will provide collection of styles, this styles will apply formatting for template data Header Template-----Headerstyle Item Template--------Itemstyle.
· It will provide two important properties
1. Repeat Columns
2. Repeat Directions
When user selects a button post-back will take place item command event of DataList will be executed. This event will provide button selected by the user.
Repeater Control is considered as a light weight control compared to datalist control.
67. Set of Rules for preparing XML Document?
1. XML is case sensitive
2. It supports only container tags.
3. XML supports user defined tags.
4. XML supports only one root element.
5. XML supports only 5 named entities. >,&lt,&,&apos,&Guot

XML as a data storage is required for two things.
· Offline storage (it will avoid database communication)
· Transmission of Data
XML used for Documents
Ordinary XML Document for Data
Well-formed XML Document for Structure +Data ---- DTD or XML Schema
68. What is XML Parser?
XML parser is software, which will act like an interpreter for XML document. There are two types of Parsers.
· DOM Parser
· SAX Parser
69. What is DOM Parser?
DOM (Document Object Model) parser will verify, complete XML document, then it will be loaded into temporary memory, in the form of hierarchical representation. Microsoft implements this in different software.
70. What is SAX Parser?
SAX (Simple API for XML) This SAX parser will provide data to the client application based on event occurrence, hence it is also called as event based parser. SunMicroSystem implements this towards JAVA.
71. How Table Tag performs?
Presentation of Data can be in Single Record Display and Multiple Record Display. In Multiple Record Display Table tag will perform number of iterations based on number of records present in the memory location. The row within thread will be considered for the first iteration.
72. Paging?
· Client Side (Table Tag)
· Server Side (Data Grid)
When there is less no. of records it is recommended to implement client side paging to reduce burden on server, When there is more no. of records downloading process will take more time & client system should have sufficient memory for maintaining the records. So it is recommended to implement server-side paging.
73. Web Assistant Wizard tool in SQL Server?
This is recommended when the static data has to be presented to the user. This will reduce burden on the webserver. When the table undergoes manipulations, It will be reflected on the web page this will be taken care by SQL-Server. This is applicable when the web server & DabaBase server are present in the same system.
Web assistant job is an application maintained by SQL Server. This will monitor database table. Changes to the table will be updated to the web page.
74. DataSet Serialization & Deserialization?
Serialization is a process of converting object in the form of a stream.
Deserialization is a process of reading the stream & constructing object.
Serialization & Deserialization is required in two cases.
· Persisting object on the hard disk memory.
· Transmitting object on the network between two systems.
Recordset supports serialization & Deserialization in terms of ADTG format. This is a binary standard towards window (O/S) Operating system.
Dataset supports serialization & Deserialization in terms of XML format, This is platform independent stream.
75. Caching?
Caching is a concept of storing frequently used data into temporary memory for faster access. This is called as optimization technique to improve the performance of the webserver.
Caching is recommended when the webpage is having database communication for presenting data of expected with more number of requests.
ASP 3.0 supports entire page caching towards client system.
ASP.Net supports 3 types of Caching
1. Output Caching.
2. Fragment Caching
3. Data Caching
76. What is Output Caching?
When the entire output of web page is stored into temporary memory then it is called as output caching.
Output Caching directive is required to implement output caching
<% @ Outputcache Duration =”N” varyByParam=”Name\parametername”
Location=”Clientserverserver and clientanyname”
VaryByCustom=--
VaryByHeader=”Accept-Language”%>
Duration will specify lifetime of the cache content. Location will specify memory area for cache content. If it is any cache, content will be maintained within web-server system. Proxy server system & client system.
VaryByCustom will accept string as browser; it will maintain cache content based on requested browser.
VaryByHeader can be used to maintain multiple cache content for a single web page based on culture.
Multiple cache content for a single web-page can be maintained using “VaryByParam” Attribute.
77. User Defined Control?
When the developer is creating a web server control than it is called as user defined control. This provides reusability.
A User Defined Control can be created in two ways.
· Webuser control
· Custom control
78. What is Web User Control?
Web user control is similar to web form it can not be accessed direectrly it requires a container as web form.
79. What are Differences between WebUser Control and Custom control?

It will be represented in the form of ASCX file.
It will be represented in the form of DLL file
It is not a compiled content. So control will not appear on the toolbox.
It is a compiled content. So it will appear on the toolbox.
It will be local to the application.
It will be global to set of applications
It supports caching
Doesn’t support caching
It doesn’t support scratch level control creation.
It supports scratch level control creation.

80. How many types of layout web form supports?
Web form supports two types of layouts
· Grid lay-out
1) Grid layout will support absolute positioning of controls.
2) In Flowlayout controls will be placed one after another.
· Flow lay-out
1) Web user control supports only flow layout.
2) Gridlayout can be implemented using gridlayout panel of HTML server Control.
81. What is Caching WebUser Control?
When the WebUser control is having Database communication, in terms of reading data then it is recommended to apply caching. This can be implemented by output cache directive.
When the caching is applied for webuser control and webpage the webpage duration will be given to webuser control.
82. What is Fragment Caching?
When the caching is applied to different portions of the web page then it is called, as fragment caching each portion of the web page is a webuser control.
83. State Management?
· Session
· Application
· Cache [Data Caching]
Session Memory:- When Client makes a Ist request to the application ASP.Net runtime will allocate a block of memory unique to the client. This memory is called as session memory. This memory will be maintained with the time-out of 20minutes.
“Session Object” can be used to access session memory from ASP.Net webpage.
Ex. SessionObject
1) Add(key,value)
Session.Add(“A”,100)
Or
Session(“A”)=100
A=100.
2) Remove(key)
3) Abandon() It will be close session.
4) TimeOut
5) SessionID


84 Session Tracking?
It is a concept of identifying session belonging to the client. This is implemented based on inmemory cookie concept. Webserver-àSessionàRequires unique identificationàSessionId.(120 bit number(15bytes)), 2120 Unique sessionID’s will be maintained.
Web server will provide session Id to the client browser in the form of inmemory cookie.
When it comes to subsequent request client will submit session ID to the web server based on this session belonging to the client will be identified.
85. Application Memory?
When the Ist client, lst request comes to the application ASP.Net runtime will allocate a block of memory. This memory is called as the “Application Memory”.
This memory will be common to all the clients. This memory will be maintained till the application is running under worker process.

Application object can be used to access application memory for ASP.Net webpag.
Methods:-
1. Add(key,value)
Application.Add(“A”,100) or Application(“A”)=100
2. Remove (key)
3. Lock()
4. Unlock()
Each client request to the webserver is considered as a “Thread”.
Equal processor time will be provided for all the threads.
When one than more thread is accessing application memory data it will provide improper result.
This can be overcome through the synchronization of threads.
This can be implemented using lock & unlock methods.
86. Session and Application Events?
Session Events:-
1. Onstart
2. OnEnd
Onstart:- Onstart Event procedure will be executed when the session is created.
OnEnd:- OnEnd event procedure will be executed when the session is closed.

Application Events:-
1. OnStart ----------from ASP 3.0
2. OnEnd -----------from ASP 3.0
3. Begin Request – new in ASP.Net
4. End Request ----new in ASP.Net
BeginRequest & EndRequest will be executed towards each client request.
These event procedures has to be placed within a special file called as global.asax

87. Session and Application Events?
When the memory varial is stored into caching object i.e, temporary memory, then it is calledas the “DataCaching”.
This variable will be common to all the users. It will provide application level state.
This is similar to application memory.
Datacaching is an enhancement over application memory under ASP.Net
88.Differences between Application Memory and Data Caching?
It is not a thread safe where the locking has to be applied explicitly.
It is a thread safe where the locking will be applied implicitly
It will apply lock to all the variables
It will apply lock to the variable under editing only
It doesn’t support expiry polity
It supports the expiry policy

89. Expiry Policy?
1. File Based expiry or filebased dependency
When the cache variable life is based on Timestamp of the file then it is called as the filebased expiry
2. Timebased expiry or Timebased dependency
· Absolute Time Expiry (From the time of storage)
· Sliding Time Expiry (From the time of Last Access)
Create a web application, which has to display products information from Access Database. This information has to be refreshed at a regular interval of 5 minutes.
Create a web application to maintain global message. The message has to be maintained with the timeout of 5minutes.
90. Configuratio Setting?
· Session Mode
· Session Timeout
· Culture
The properties of webapplicatio based on which the bahaviour of the web-application will take place.
This properties are called as configuration settings.
Microsoft is providing default settings i.e. properties for web application with in Machin.config file. This file comes with the installation of .Net framework.
C:\WinNT\Microsoft.Net\framework\v1.1.4322\config.
The developer of the web application can change the settings by providing web.config.
ASP 3.0 supports only web server level setting. It doesn’t support application level settings.

This problem has been overcome under ASP.Net by supporting webserver level settings i.e, Machine.config & application lvel settings i.e., web.config.
ASP.Net supports inheritance based configuration settings.


91. Customer Error Setting?
When the developer is providing a webpage towards error then it is called as customError page.
This can be provided using custom errors settings under web.config purpose of custom error page is providing user-friendly message.
DefaultRedirect=”CommonErrorPage”>


If mode is ‘On’ Custom error pages will be provided for localhost client & remote client.
If it is’Off’ custom errors will be disabled.
If it is ‘RemoteOnly’ custom error page will be presented for remote client & local host client will be provided with built in error page.
This option is useful when the website is live website.
Error Numbers:-
· 400 ----------à Bad Request
· 401-----------à UnAuthorized Access
· 404-----------à Resource Not found
92. Enhancements to Session State?
· Process Independent Session
· Cookieless session
· Optimization of Session state
93. Process Dependent Session?
When the session is maintained within application domain under worker process than it is called as process dependent session.
The problems with process dependent session are.
· It does not provide reliability when the application domain is recycled sessions will be lost. The application domain will be recycled when you save web.config or Restarting web-server.
· It does not provide solution for web forming Web forming is a concept of grouping collection of websites as a one unit. The website will be running under different web-servers.
This will be implemented as part of load balancing.
When user is navigating from one website to another website A common session can’t be maintained i.e., a single session can’t be maintained.
Asp 3.0 supports only process dependent session. The solution for above problem will be maintaining data within a file or database server. Temporarily, this requires manual coding. This manual coding is avoided in ASP.Net by supporting process independent session.
94. Process Independent Session?
When the session is maintained external to the worker process then it is called as “Process Independent Session or OutProcessSession.
The external process can be state server or SQL server.

95. State Server?
State server will maintain Data as a inmemory storage. This comes with the installation of .Net Framework. As a service for the operating system.
Start-àRun-àServices.mscàOK
When the state server is restarted sessions will be lost. When the requirement is more reliability then goes with SQL server. This requires more financial investment
96. SQL Server?
It will maintain session data as a persistant storage in the form of table.
Microsoft is providing Transact SQL file called “Install persist SQLstate.sql” this comes with .Net framework installation.
When you execute this file it will configure SQL – server with Database, table & stored sub-programs required for maintaing session state i.e., session Data.
Sql file can be executed in two ways
· Ostart.exe command prompt utility.
· QueryAnalizer of SQL-server
97. How many types of Sessions ASP.Net supports?
1. InProcess
2. StateServer
3. SQLServer
Inprocess will provide better performance.
Sql server provides more reliability
ASP & ASP.Net can not maintain common session for the client.
98. What is Cookieless Session?
When the client disable cookies with the browser the session will not be maintained for the client. In ASP 3.0 developer has to perform manual coding for maintaining client-data.
This problem has been overcome in ASP.Net by supporting cookieless session.
The session Id will be provided to the client browser in the form of Query string by appending to the URL this called as cookieles session.
Sessionstate App---àWeb.Config--à


The problem with cookieless session is when client changes URL session ID will be lost.
This makes a new session will be created for the client towards next request.
99. What is Impersonation in ASP.Net Security?
When client makes a request to the web-server, web-server will attach a user-account to the client request based on this user account webpage processing will take place & resources will be accessible on the network.
The default user account will bbe “IUSR_SYSTEMNAME”
Ex: IUSR_srini.
This is a guest user account provided by the operating system.
When this user account is changed then it is called as the “Impersonation”
This can be implemented through web.config using “identity tag”

*Web.config

100. Authentication & Authorization?
It is a process of getting credentials of the clients. The credentials includes username, password, security token.
Authorization:-
It is a process of verifying credentials to provide access to requested web.page.
ASP.NET is supporting 3 types of Authentication.
1. Windows based Authentication
2. Forms based Authentication
3. Passport Authentication
101. What is Windows Based Authentication?
When the client is authenticated based on network level login parameters then it is called as windows based authentication.
This is applicable only towards Internet based implementation i.e., private web site of the organization.
102. What is Forms Based Authentication?
When the user is authenticated based on custom login page by verifying with database server, then it is called as forms based authentication. This is applicable for intranet based & Internet base implementation.
Web server will issue security token to the client as an identity of an authenticated client.
The client should submit security token for subsequent request.
Forms authentication class has following methods:
· Redirect form login page
· GetAuthcookie
· GetRedirectUrl
RedirectFormLoginPage:
(Username, createpersistant)
This method will perform two things
1. It will redirect client to the requested webpage
2. It will provide security token to the client in the form of cookie
If 2nd parameter is true cookie will be persistent else InMemory.
Note: The default cookie name will be “.ASPXAuth”. The default lifetime will be provided as 50years. This can be changed according to requirement by coding.
GetAuthCookie:
This will return reference to security token cookie object.
GetRedirectUrl:
It will return url of requested webpage.
Note: When client makes a direct request to login.aspx, the client will be redirected to “default.aspx”. If it is not available it will respond with error message.


103. What is Passport Authentication?
When the client is authenticated based on passport website provided by the Microsoft then it is called as passport Authentication.
In this Authentication client will login only single time & access websites configured with passport authentication so it is called as single signon service.
To implement passport Authentication two things has to be performed.
· Provide authentication mode as passport under web.config.
· Install passport SDK within web-server system.
104. EMAIL Server?
Microsoft is providing Email server called SMTP server. [i.e, simple mail transmission protocol] This comes with the Installation on IIS.
CDONTS is supporting storing emails & retrieving Emails from SMTP server.
System.Web.Mail is supporting only storing emails.
Note:-
· Attachment can be implemented by using attach file method of new mail class.
· SMTP server will support local domain & remote domain.
Remote domain will map to another email server.
.Net--à Default SMTP virtual server, Local Domain, Remote Domain
105. What is Tracing?
Org--àWebsite--àmaintenance-àno. of cookies, monitoring clients
In ASP 3.0 developer should go with manual coding & it will be distributing to clients.
If it is a live web-site.
This problem has been overcome in ASP.Net by introducing ‘Tracing’.
Tracing is a technique to get the complete information towards client request execution. This can be classified into
1. Request Details:- Request type, Requst Time, SessionId Status code.
2. Trace Information:- It will display order of event eecution & text printed with trace class.
3. Trace class:- 1)Trace.Write(---) 2) Trace.wardn(----)
4. Control tree:- It will display all controls within the web-page all with memory size.
5. Cookie collection:- It will display all cookies information.
6. Server Variables:- It will display client & server information . This includes IP Address of client system, browser information , serve IP Address, Server software version, physical path of a site, port number of website etc.
Tracing is applicable of 2 levels,
· Page Level:- <%@ Page – Trace=”true/false”>
· Application Level:-
i. It will apply tracing for all the web pages within the application.
ii. It will provide set of options required for the live website.
iii. Application level tracing can be implemented through web.config.
Web.config--à

Note: If ‘Localonly’ is true tracing will be applied only for the local host client i.e., developer.
If pageoutput is true the client will be provided with normal page output along with tracing information.
If page output is false client will be provided with normal page output & tracing information will be stored into a file called ‘Trace.Axd’
106. What is Localization & Globalization?
Culture-à Language code ----------------- Country Code

En US English USA
Te IN Marathi-India
Hi IN Hindi-India
Fr FR France
Each culture will have its own set of standards in terms of date format, time format; calendar format currency format…
When you design an application supporting only one culture than it is called as localization.
When you design an application supporting multiple culture than it is called as globalization.
By default application will be provided with English US culture.
Globalization:- It can be implemented in two ways.
1. Designing unique website towards each culture.
2. Designing a single website for multiple cultures.
107. How to Designing Single website supporting multiple culture?
When the website content is changing from one culture to another culture in terms of set of standards i.e., date format, time, format so on then this option is recommended.
Each client request to the web server is considered as a thread by default, thread will be provided with English US culture.
This has to be changed dynamically based on culture submitted by client
108. Distributed Technology?
It is a concept of distributing services i.e., sub programs to different client applications on the network.
The advantage of maintaining services, separately from application will be reducing burden on the webserver & provides better maintenance along with security for database.
In ASP 3.0 services can be managed by MTS i.e.[Microsoft Transaction Server]
MTS will act as a container for COM component. This will provide three features as follows
· Connection Pooling:-
MTS will maintain set of active connections within block of memory called as ‘Pool Memory’.
When client makes a request the connection will be attached to the client request & communication takes place with Database server.
After the request is processed the connection will be placed back into the pool memory.
· It supports DCOM
· It supports Transaction Handling
Problem of MTS:-
The problem with MTS is it can provide services only under Microsoft environments towards only Microsoft application.
So it is not applicable for the Business to Business to communication. This problem has been overcome under .Net framework i.e., ASP.Net by supporting Web-Services.
109. What is XML Web Services?
XML + Web + Services
When you publish services with web-server with XML based date, representation for transmission than it is called as XML Web Services.
This will support heterogeneous application communication under heterogeneous platform.
Web-services can be taken with 4 things
· WSDL Web Services Description Language:- It will provide description of services with XML based arrangements, the arrangement standards is provided by “:W3C”.
· Data Representation:- It will be represented in the form of XML based formation. This is platform independent stream.
· Formatting Protocol:- SOAP(Simple Object Access Protocol). It will provide set of standards for arrangement of XML based stream the standards are provided by “W3C”.
· Transmission Protocol:-HTTP , Platform independent.
Web-services is designed based on platform independent stream i.e., XML based with open industry standards provide by “W3C”.
So Web-services is given by W3C The standards are accepted by different vendors like Microsoft, sun Microsystems..

Microsoft---------à XML Web Services
SunMicrosystem-à Java Web Services.
Oracle-------------à PL/SQL Web Services.
110. WebService Class?
When the web service requires ASP.Net intrinsic objects, it can’t be accessed directly to access directly web-service should inherit, web service class
111. XML Namespace?
A web service internally considered as a XML document. When the XML document is exchanged between two different companies it is strong recommended to provide uniqueness the ‘Tags’.
This uniqueness to be provided with XML namespace concept.
XML Namespace is a logical one to provide uniqueness for the ‘Tag’
112. WebService Attribute Class?
It will provide namespace for the web-service i.e., XML; namespace.
It will provide description for the web-service.
When the web-service has to provide database table information to the client application. The information has to be arranged in the form of dataset.
113. Caching WebMethod?
When the Web method output is stored into temporary memory than it is called as “Caching WebMethod’. This will improve the performance of the web server.
114. Wire Formats Supported by Web Service?
WireFormat:- Wire + Format
‘WireFormat’ can be defined as arrangement of data which has to be transmitted on the network from one end to another end.
Web-service supports different wire formats.
· HTTP Post
· HTTP Get
· SOAP
HTTP Post & HTTP Get will provide standards for basic data types, data arrangement.
Where as SOAP is providing standards for arranging different types of data.
*Basic DataTypes (Integer, String), Complex Type (Array), User Defined Type
115. SOAP?
(Simple Object Access Protocol). SOAP is a formatting protocol which provides set of standards for arranging request & response . This provide communication between client application & web-service.
SOAD standards are provided by W3C. So it is called as open industry standards.
SOAP standards are provided in the year 2000, The year 2000 also .NetFwBeta is released.
Client App Web Service
Proxy Stub
SOAP SOAP
HTTP <=========================è HTTP
SOAP OVER HTTP
When Client application makes a method call the request will go to proxy. Proxy will package complete method information. This includes method name, parameter names values so on.
This information will be forwarded to SOAP. SOP will encode this information into XML based arrangement called as SOAP message.
This SOAP message will be given to HTTP. HTTP will carry SOAP message on the network to the server machine.
In the web server machine an object will be created & method execution will take place. The result of the method will be given to stub.
Sub will forward result to SOAP. SOAP will encode result into XML based arrangement called as SOAP message.
This SOAP message will be given to HTTP.
HTTP will carry to client system.
SOAP Header will contain any additional information, which has to be sent with the method call.
This includes authentication information like user name, password.
SOAP Body will contain method information OR Result of the method.
SOAP Fault will contain error information.
116. Security Web Service?
· IP Address & Domain Name Restriction:- When to provide access to the webservice based on IP Address or & Domain Name of the client system than We required IP Address & Domain Name restriction Security.
· SOAP Header Security.
· SSL Secured Socket Layer
117. SOAP Header Security?
When you want to provide access to the web-service based on login parameters than apply ‘SOAP Header Security’.
Note:-
· Mustunderstand=true Soap Header information is required to access web method.
· If DidUnderstand=True SOAP will produce SOAP Body with the result of the method.
· If DidUnderstand=False SOAP will produce SOAP Fault with Error msg.
118. SSL (Secured Socket Layer)?
SSL provides secure communication between client application & web-service this is strongly recommended when the sensitive data is transmitted between client application & web service.
This secure communication can be provided through encryption & decryption.
Third party called as ‘certification authority’ will provide the encryption & decryption services.
The Well-known certification authority will be ‘verisign & Awte’ www.verisign.com/awte.com.
When the bit level is more security will be more.
The certification Authority will be charging for providing services. When you purchase a certificate from certification authority it comes with public key & private key.
This certificate has to be configured with website to implement SSL communication.
119. Configuring Website with SSL?
Note: The website configured with SSL will provide communication with ‘HTTPS’ protocol. This protocol will be working with 443-port number. The website has to be configured with SSL port number as 443.
When client makes a request to the website, web-server will send public key to the client browser when client submits data, it will be encrypted with public key, then it will be transmitted to web server. Web server will perform decryption with the matching private key than the request will be processed. Then the response will be encrypted with private key than it will be transmitted to client browser.
Browser will perform decryption with the matching public key.
120. Discovering Webservice?
Providing location of the webservice to the client.
1) Local to Application [i.e., website]
2) Global to Industry (Uddi Registry)
Local to Website:-
When you provide webserver location to the users of the website, than it is called as local to website.
The webservice information can be provided in the form of discovery file. This is an XML based content common to all the vendors (platform)
Note: Microsoft is providing a proprietary standard discovery file. This will be provided with extension .VSDISCO
A discovery file can contain only one web-service information where as VSDISCO can contain more than one web service information.
Discovery file can be placed on any web-server. It is open industry std.
Where as VSDISCO file is only supported by IIS with ASP.Net Run time.
UDDI Registry:-
(Universal Description Discovery Integration)
UDDI Registry will act as a search engine for web-services. The major contribution comes from Microsoft & IBM.
www.UDDI.org----à It will allow Registering Webservce.
It will provide webservices to client i.e., consuming webservce.
Microsoft & IBM are maintaining their own UDDI Registries. These registries are called as mirrored Registries. since they can be reflected towards each other.
121. Mobile Application?
Mobile Gateway will act as a interpreter i.e., mediator between mobile device & web-server.
This will convert mobile request into HTTP request & HTTP response into mobile device understandable code.
There are 2 Gateways.
1) WAP Gateway.
2) IMode Gateway.
WAP Gateway:- It is implemented in European countries this will support WML Content.
IMode Gateway:- It is implemented in Japan this will support CHTML content.
Mobile device will be enabled with microbrewer by integrating chip-set.
Open waves system will provide chip-set for major mobile devices this open wave system can be called as phone.com.
This like companies Nokia, Sony will produce their own chipset.
The developer has to consider following things towards mobile web-page designing.
1) Mobile devices comes with a small screen it can present 4 to 5 lines where each line can have maximum of 20 characters.
2) Mobile device comes with small amount of memory where less content to be down loaded.
3) Mobile device doesn’t support cookies.
4) There is no proper standardization of mark-up languages.
· WML --------à Wireless Markup Language
· CHTML -----à Compact HTML
· HTML 3.2
· XHTML ----à Extended HTML
· Mobile device will support, Java script & WML – script
· Mobile device goes with very slow transmission bandwidth will be 9 to 10 kbps.
WML:- It is XML based content which supports certain tags of HTML.
A WML file is called as ‘DECK’. This will contain collection of cards where each card will contain 4 to 5 lines of content.
A mobile device can present only one card at a time.
The navigation between the cards will takes place through hyperlink.
When it comes to ASP page, the developer should detect mobile device based on that markup language has to be generated.
This has to be done manually this will be complex for the developer to avoid this complexity Microsoft has provided a software under .Net framework called as ‘MMIT’ i.e., Microsoft mobile Internet Toolkit.
.Net 1.0 is not provided with MMIT. It is provided as a free download from Microsoft website.
.Net 1.1 comes with MMIT
122. Mobile Emulator?
When you want to display mobile web page on mobile device then we require mobile Emulator.
Mobile Emulator is an application which will display mobile device as a browser.
Mobile Emulator is provided as a free download from mobile device company web-site.
www.form.Nokia.com, www.SonyEricsson.com,www.Developer.openwaves.com,www.ASPNet (Mobile(Tag))
Note: Mobile Webpage can have collection of forms where each form is similar to a card in WML.
Mobile device can present only one form at a time.
123. XML Based Documentation?
When you implement 3 single guoats, quators for commenting, then it is called as XML Based Documentation.
At the time of compilation compiler will place all the XML based documentation into a separate file.
This is XML document file. This will avoid manual Documentation. So it is also called as (XML based Automatic Documentation.

vb.net questions

§ VB.Net Question & Answers

1. CLR?
Common Language Runtime, It can understand only one language code i.e., intermediate language code (IL Code). IL code is similar to assembly language syntax. It is very complex to developer to write IL code to avoid this complexity Microsoft is providing set of high-level languages support under .Net framework.
IL code, it support set of types, Types supported by CLR-àCTS
CLR is platform dependent.
IL code is platform independent.
2. CTS?
Common Type System,
Ordinary Types:- Byte, Int16,Uint16,Int32,Uint32.
User defined type:- Structure, class, interface.
Pointer Type
3. CLS?
CLS (common language specification), It is a subset of CTS
No user defined Types
No pointer types
Any company can develop high level language compiler towards .Net environment the compiler should produce IL code with minimum support of CLS
4. High Level Languages?
VB.NET, C#. NET, VC++. NET, VJ#.NET-à all language compilers has been designed by Microsoft.
Third party .NET language compilers COBOL.NET, PASCAL.NET, FORTRAN.NET
Nearly 25 languages support is provided by .NET framework.
In the market different applications are exiting based on different languages, this application can be migrated to .Net framework if the similar language is present under .Net framework. This will improve market for .Net framework
5. VB.Net?
· It is not case sensitive.
· It will reach CLS standards.
· File extension will be .VB
· Compiler for VB.Net is VBC.exe
· VB.Net is object oriented programming
6. Application Development?
VB.Net-----> Application
Module M1
Sub Main ()
---
---
End sub
End Module

Class Demo
Public shared Sub Main ()
---
---
End sub
End Module

· Module is similar to class by default methods will be shared.
· VB.Net is purely object oriented programming language ( As without class or module we can’t make a application)

7. ILDASM Utility?
ILDASM (Intermediate Language De-Assembler),
Ex:- E:- \vbnet56\First.vb [notepad]
Module M1
Suh main()
System.console.writeline(“First VB App”)
End sub
End Module

-compilation-

E:-\vbnet56>vbc first.vb [It will produce first.exe]
-Execution-
E:-\first
O/p-à First VB App
Note:- Exe is containing IL code.
8. Base class Libraries?
(Framework class libraries)
(.Net Framework API)
· System.Dll (All basic Classes)
· System.Windows.Forms.Dll (for GUI programming all classes)
· System.Data.Dll (ADO.Net) (For Database Connectivity)
· System.web.Dll (web based App) (ASP.Net)à All Classes for ASP.
The Libraries, which comes with .Net framework installation, are called as base class libraries. These will be around 64 libraries developed by micro soft using c# language.
These libraries will be common to all the .Net languages.
9. Namespace?
Namespace can be defined as a logical container for collection of user defined types. This will support arranging classes in the hierarchical representation. This will make accessing faster & naming collusion can be avoided.
The Collusion at the namespace level can be avoided by providing root namespace as company name.
Note:- The root namespace for base class libraries will be system (System)
Importing Namespace:- To avoid repetition of namespace or namespace.classname
· Imports Namespace1,Namespace2
· Imports Namespace.classname
· Imports Alias=Namespace,
· Imports PF=peers.First (for example)
XF=xyz.first
Imports are a request to compiler so the performance of the application will not be affected.

10. Data Types supported by VB.Net?
VB 6.0 -à Ordinary Type à Basic Data Types-àByte, Integer
-à Object Type---à Class
In VB.Net only object type is supported i.e., everything is considered as an object type.
VB.Net-à object Type-à Value TypeàObject will be stored on stack memory.
-àReference Typeà Objects will be stored on heap memory.
11. What is Stack Memory?
*Stack memory as faster access for only small amount of data.
Stack Memory:- The memory will be allocated by the compiler.
It does not support dynamic allocation & destruction.
It does not support hierarchical representation of data i.e., inheritance.
12. Heap Memory?
It supports dynamic allocation & destruction of memory. It supports hierarchical representation of data i.e. inheritance.
13. Data Types, CLR Specific, Language Specific?
DataTypes-àCLR specific Type-àCTS\CLS-àint16,int32
àLanguage Specific type-----------à short,integer
Language specific[VB.Net] types
· Byte -----à 1 Byte ---à0 to 255
· Short -----à 2 Bytes ---àNumeric Data without (.) decimal point
· Integer -----à 4 Bytes
· Long -----à 8 Bytes
· Single -----à 4 Bytes ---à 7 Decimal
· Double -----à 8 Bytes ---à 15 Decimal
· Decimal----à 16Bytes ---à 32 Decimal (5 to 7 will support Numeric data with decimal points.)
· Boolean----à True/False
· Date -----à 8 Bytes (Format – mm\dd\yy Range – 01\01\0001 to 12\31\9999)
· Char ----à 2 Bytes ---à 0 to 65535 English Alphabets à 0-255 ASCII – Format
Above 1 to 10 are value types

Note:- .Net framework supports different cultures when the language is other than English it requires no. more than 255. This is called as Unicode format.
It can represent any language character.
· String Data Type-à It can represent up to 2 billion characters.
· Object Data type-à 4 Bytes It can represent any kind / type of Data.
Above two are Reference Type.
Note:- Vb.Net is not supporting by VB 6.0.
Vb.Net is supporting two new data types short & char.
Ex: Dim A as Byte=200
VB 6.0 -à Not supported
VB.Net-à Supported
Dim A,B as Byte
VB 6.0 à Aàvariant, BàByte
VB.Netà AàByte,BàByte

14. What is the difference in declaring a variable with Dim and Private?
Dim & private are similar. Dim does not support constant variable declaration where as private will support constant variable declaration i.e.,
Dim const PI as single=3.14 ----à Not supported
Private const PI as single=3.14 ---à allowed
15. Option Explicit ONOFF?
ON à Variable declaration is mandatory.
OFFà Variable declaration is not mandatory.
Note:- The variable without declaration is provided with object data type. The storage of the data will be taken on the heap memory.
16. What is Boxing & UnBoxing?
When the value type data is represented as a reference type on the heap memory then it is called as Boxing.
When the reference type is converted into value type then it is called as UnBoxing.
When the application performs Boxing & UnBoxing it requires more processing type. This will affect the performance of the application.
The variable without declaration is recommended for marinating reference type data. This will not affect the performance of the application
17. What is Type Casting?
Converting one type of data into another type is called type casting.
VB 6.0-à It supports type casting conversion function.
· C Byte (expression) ex: C Byte(“100”) -à O/p -à 100 Byte
C Byte(“100.55)-àO/p à101
· C Int (expression) -à To Integer
· C Lng(‘’)-à Converting to Long
VB.Net-à It supports conversion functions of VB 6.0. this required for migration projects i.e., converting VB 6.0 application into VB.Net application.
It supports C Type function, this will implement type casting for the basic data types & user defined types.
C type(variable, type)
Ex: Sum.vb
Res=Ctype(A,short)+B
18. Array?
It can be defined as collection of similar data under one name.
Each element can be identified with a unique index:
Array is considered as a reference type where the storage will be heap memory/
Types:
There are three types of Array
1. Single Dimension Array.(Only one row with n no. of columns)
2. Multidimensional Array.
3. Jagged Array
Note: In VB 6.0 Lower bound can be any number. In Vb.Net it is fixed to zero(0). Only
A.length-à o/p—3 (to see the number of element in array)

Array Class:-
--à Methods
1. Sort (Array) ---Ascending order
2. Reverse (Array)----Descending order
3. Copy (Source Array, DestArray,N)
4. Clear (Array, Index,N)
Dynamic Array:-
When the size of the array is defined at run time then it is called as dynamic array. This can be implemented using (Redim) reading statement (Redim)
Multidimensional Array:-
In multi dimensional array all the rows will have same no. of columns.
Jagged Array:-
This will support different no. of columns for different rows. This can be called as array of array.
19. Visual Studio.Net?
VS.Net is a designer application provided by the Microsoft towards .Net Framework application development. This will reduce lot of burden on the developer & makes the application development much faster.
IDEL(Integrated Development Environment)
It is a collection of windows.
VS.Net will provide a common IDE for all the .Net languages.
· .Net 1.0 -à VS.Net2002
· .Net 1.1 -à VS.Net2003
· .Net 2.0 -à VS.Net2005

VS.Net 2003:
VB.NET,VC#.NET, VC++.NET, VJ#.NET, Crystal Report Designer.
Application center Test [ACT]--àTesting Tool
VS.Net:
Application --à Solution file[.sln]
VB.Net Project will produce exe.
Note: A solution file will act as a logical container for collection of projects belonging to different .Net languages.
VB.Net Projects:-
· Console Application à To develop CUI(DOS based) based Application.
· GUI Application i.e, Windows Application To develop GUI Application.
· Class Libraryà To Develop DLL file
· Windows Control Libraryà To create user defined control
· ASP.Net Web Application ASP.Net

20. Sub Programs?
A unit of code identified by a particular name is called as sub program.
Advantages:-
· Reusability
· Better Maintenance
· Debugging will become easier.
VB.Net supports two types of sub programs.
i) Sub procedure
ii) Function
Sub Procedure :- To perform a task. It doesn’t return value directly to the calling environment.
Syntax:-
PrivatePublic sub(ByValByRef as ,….)
-----
-----
Exit sub
End sub
Function :- It returns value directly to the calling environment.
ex:
Private sub Demo(ByVal a ---,ByRef b ---)
a=a+5
b=b+5
End sub

Calling Evn
A1=10
B1=20
Call Demo(A1,B1)
A1à10
B1à25
Note:-
1. If it is ByVal changes to the formal parameter will not be reflected on actual parameters.
2. If it is ByRef changes to the formal parameter will hbe refleted on actual parameter.
3. In VB 6.0 default is ByRef . But in Vb.Net it s ByVal



Note:-
1. In VB 6.0 it is not mandatory to initialize optional parameter. But in VB.Net it is mandatory.
2. The Optional parameters should be right most in the parameters declaration.



Note:- To hold the window console Read has to be taken.
Note:-
Optional Parameters: - It may or may not receive value from calling environment.

21. Problems with structured programming?
1) It does not provide security for data.
2) It does not provide proper reusability.\
3) It is not applicable for distributed application development where object-to-object communication is required.
These problems have been overcome by introducing object oriented programming.
22. Object Oriented Programming?
Set of rules or principles
· Data Encapsulation
· Data Abstraction
· Inheritance
· Polymorphism
These rules should be followed to be oops language.
Data Encapsulation:- Binding data with related subprograms as a one unit is called as data encapsulation.
Data Abstraction:- Data abstraction is a concept of providing set of interfaces to the user without presenting complexity of execution.
Inheritance:- Acquiring properties of one entity into another entity is called as inheritance. This provides reusability.
Polymorphism:- Poly + Morphism ---à many + forms
Many forms of a single object is called as polymorphism
OOP--à 2 types
· Object Based S/Wà No Inheritance support.
· Object Oriented S/Wà Inheritance Supported
1. VB 4.0 à Data Encapsulation, Abstaction àSo Object based software
2. VB 5.0 àData Encapsulation, Abstraction, Interface & Interface Inheritance à partially object oriented.
3. VB 6.0 à same as VB 5.0
4. VB.Net is a object oriented software.
VB.Net is supporting data Encapsulation in two ways.
· Structure
· Class

23. Difference Between Structure and Class?
Structure
Class
It is a value type where the object will be maintained on the stack memory.
It is a reference type where object will be maintained on the heap memory.
It does not support Inheritance.
It supports Inheritance.
Accessing will be faster so it will improve the performance.
Accessing will be slow. It doesn’t provide better performance.
All members are by default public.
All members are by default private.

Note:-
When there is a small amount of data without inheritance then go with structure. All the data types except string and object are internally structures.
A Class can be defined as logical representation of data with related sub programs.


24. Object?
Object can be defined as a physical representation of data based on class. This can be called as instance of class.
Dim obj as New
New àIt allocates memory based on class data.
25. Constructor?
· Constructor name should be “new”
· Constructor should be sub procedure
· Constructor can be overloaded.
· Constructor can’t be called explicitly using object variable.
· Runtime will include a default constructor into the class.
This will not be included by runtime when the developer including constructor with parameters.
Constructor:-
Dim A as Byte=100
Dim obj as new Emp(100,500) àrequires constructor
A constructor can be defined as sub program of the class, which will be called implicitly when the object of the class is created.
The purpose of constructor is to initialize object data.

26. Method Overloading?
When the sub program is provided with more than one signature then it is called as method overloading.
The signature will depend on 2 things
1. Number of parameters.
2. Data types of parameters.
Ex:-
Sum(a as Byte, b as Byte)
Sum(a as Byte, b as Byte, c as Byte)
Sum ( s1 as string, s2 as string)
Sum ( a --,b---,c optional ---=0)
27. Method Overriding?
When the derived class is providing the same method name of the base class with the same signature then it is called as method overriding. This concept is called as virtual function concept.
Note:-
· In Java by default all the functions are virtual.
· In VB.Net by default all the functions are not virtual i.e., not overridable.


28. Shared Data?
The data attached to the class is called as shared data.
The memory allocation will take place only single time throughout the application execution.
This memory will be common to all the objects.
29. Shared Method?
The method attached to the class is called as “shared method”. This method can access only shared data.
30. Shared Constructor?
The shared constructor will be executed only once for the application execution.
This is required for initialization-shared data.
Class Oracle
Public shared con as OLEDB Connection shared sub new()
Con=new OLEDB Connection(“---“)
Con.open
End sub
End class

Dim obj1 as new oracle
àShared constructor will be executed
àOrdinary constructor will be executed
Dim obj2 as new Oracle
Ordinary constructor will be executed

31. Type of Inheritance?
1. Simple or single level inheritance [c1](base class) à[c2](Derived class.
2. Multi Level Inheritance [c1]à[c2]à[c3]
3. Hierarchical Inheritance (only one base class)
4. Multiple Inheritance
5. Hybrid Inheritance (more than one base class)
Note:-
VB.Net does not support more than one base class for the derived class it is avoided purposefully by the Microsoft to have a proper designing of classes.
32. Method Overloading, with Inheritance?
When the derived class is providing the different signature, then it is called as method overloading with inheritance.
This is not supported in C++ but it is supported by Java.
Class base
--
public sub accept(a1)
---
end class
class derived : inherits base
---
public overloads sub accept(a1,b2)
---
end class
33. MyBase Keyword?
MyBae is a reference to the base class object present within derived class.
This will be created by the runtime. This is required in two cases.
1. To call base class constructor from derived class constructor.
2. To call base class method from derived class method towards method overriding.
In terms of Java it is called super keyword.
34. MustOverride Method & MustInherit class?
When the method is defined without any functionality then it is called as must override method.
In C++ it is called as pure virtual function. In Java it is called as Abstrafct Method.
When the class does not support object creation then it is called as must – inherit class.
Java--à It is called as Abstract Class.
The class should be declared as a must inherit. If it is containing must override method.
Note:-
The derived class should provide functionality for must override method of the base class.
If it is not providing functionality then it should be declared as must inherit class.


35. Polymorphism?
1. Static polymorphism (compile time)
It is implemented through method overloading.
2. Dynamic Polymorphism (Run Time)
The base class variable can maintain a reference to derived class object this variable can access the methods inherited from base class.
When it comes to must override method the functionality will be loaded dynamical at run time based on derived class object.
This implementation is called class object.
This will consume less amount of memory resources.
The advantage of abstract method & abstract class is dynamic polymorphism implementation.

36. Not Inheritable class(sealed class)?
Syntax:- NotInheritable class
----
End class
The class which can not act as a … is called as NotInheritable
This provides security for the class.
In terms of Java it is called as Final Class.
37. Interface?
An Interface can be defined as collection of methods without any functionality i.e., prototypes of methods. This provides security for class.
Syntax:-
Interface
Sub 9….)
Function (….) as
End interface.
1. The methods within the interface does not support access specifier by default it will be public.
2. The class, which implements interface, should provide functionality for all the methods of interface.
3. An object can’t be created for the interface. The variable of the interface can reference class object, which is implementing interface.
Interface is similar to must inherit class.
Interface will support multiple inheritance where as must inherit class does not support multiple inheritance so it is strongly recommended to approach with interface when the method does not have functionality.
Note:-
1. One interface cannot implement another interface.
2. One interface can inherit another Interface.
38. GUI Programming?
When it comes to SDK Programming the developer has to write the code for designing part & logic part.
This will be more burdens on the developer & requires more time for application development.
To overcome these problems Microsoft has introduced VB1.0 in the year 1991.
*.Net
System.windows.forms.dll
System.windows.forms
(Namespace)
Form class:-
It will act as a container for collection of controls.
39. Even Driven programming?
ControlàObject
It can identify set of Actions (events)
The action identified by the object is called as an event.
When the action takes place with the object then it s called as event occurrence.
The sub procedure attached in a particular action is called as event procedure.
When the software supports code execution based on the actions then its is called as event driven programming.
Button Control:- To perform Action -àclick[event]
40. Debugging and Error Handling?
Application àErrorsà3types
· Syntax Error
· Runtime Error
· Logical Error
Syntax Error:- When the developer is not following syntax of the language then it leads to syntax error.
Runtime Error:- When the statement can not be processed by the run-time, then it leads to runtime error.
Logical Error:- When the output of the application is not matching to the developer exception, then it is called as logical error.
It is very dangerous in application. This logical error can be called as BUG.

Debugging is a process of identifying logical errors within the application. This goes with line-by-line execution.

VB.Net is providing following options to implement Debugging.
1. Step Into:- It will execute one line and cursor will be taken to next line.
2. Step Over:- It will skip sub-program for the debugging process.(Line by line execution)
3. Step Out:- It will stop debugging process.
4. Toggle Break Point:- It will stop normal execution at a particular line & control will enter into debugging process.

41. SQL Server?
· It is more compatible with Microsoft products.
· It provides better performance compared to oracle
· It is more user friendly, compared to oracle
· Problem with SQL-Serve is it can be installed only on Windows environment
It will maintain Databases, A database will maintain collection schema objects i.e., tables, views
SQL Server.Net will implement native protocol programming of SQL Server, This provides faster communication. This will improve the performance of the application.
According to Microsoft testing it will provide 60 to 70% performance gain over OLEDB.Net. It is applicable towards SQL Server 7.0 & later versions.
42. SQL Connection?
Dim Con as new SQLConnection (“userid=sa;password=;Database=Company56 or Intial catalogue=company56 data source=
Con.open()
Con.close()
For Windows Based Authentication :
Dim Con as new SQLConnection
..
..

43. Error Handling?
ApplicationàRuntimeà By Default it will be handled by Runtime.
· It will provide technical message
· Abnormal termination: To over come this problems developer will provide solution for error, this is called as error handling. It can be classified into two types
1) Unstructured Error handling
2) Structured error handling
Unstructured Error Handling:- Before .Net framework different languages of the Microsoft will support different approach for error handling this is called as unstructured error handling.
This does not support cross language error handling
This problem has been overcome under .Net framework by supporting structured error handling called exception handling.
VB.Net supports unstructured error handling. Unstructured error handling is required for migration projects.
44. Exception Handling?
Exception à Trapable Error à Error, which can be handled by the developer.
In .Net Framework all the errors information will be maintained in the form of classe4s called exception classes. This will be common to all the .Net languages. This will support cross language error handling.
Exception Classà
· OverFlow Exception
· Invalid cast Exception
· FileNotFound Exception
Syntax:-
Try
---
Catch
--
End Try
1. A Try block an have any no. of catch blocks which are mutually excvlusive i.e., only one catch block will be executed.
2. Multiple Try Blocks are supported.
3. Nested TryBlock is supported
Note:
1. Exception manager will verify with the catch blocks. If there is no catch block it will terminate the application & technical msg will be provided to the end user.
2. catch block with exception class can handle any type of exception because base class variable can be reference derived class object. Accept
---
Try
---
Catch ovf as
Catch e1 as Exception
Masgbox(e1.message)
It will display built in messages.
Catch block with exception class can be taken as 1st catch block, the control will not reach to followed by catch blocks.
Finally Block:-
Try
---
catch
-- (on error)
Finally
-- (other error or No error)
End Try
Finally block will be executed before the control comes out of try-bock.
This is required to release resources i.e., closing Database connection clsing File stream..
A try block will support only one finally block

45. User Defined Exception?
InvoideAppàTransactionàQOH<100àErroràIdentified by Developer
The error idenfied by the developer w.r.t an application is called as user defined exception.
The developer has to perform 3 things
1. Creating Exception class:- Class My Exception Inherits Exception sub new(str as string)
Mybase.new(str)
End sub
End Class
2. Throwing the Exception:-
Throw new MyException(“error message”)àIt will provide object to exception manager.
3. Handling Exception:- Handling exception with catch block

46. What is ADO?
ADOàRecordSet
· It supports Bi Directional Navigation
· It supports manipulations
· It doesn’t support constraints.
· It doesn’t support purely disconnected implementation.
· If supports Dynamic cursors.
· It will maintain data in ADTG format i.e., Active Data table gram format.
· It is a binary standard towards windows operating system so it does not support cross platform transmission.
47. What is ADO.Net?
ADO.NetàDataSet
· It supports bi-directional navigation
· It supports manipulations
· It supports constraints
· It supports purely disconnected implementation
· It does not support dynamic cursor.
· It will maintain data in XML based implementation. It is platform independent. It supports cross platform transmission.
48. Dataset?
Dataset can be defined as inmemory database for the client application process this will maintain collection of tables called as datatables.
Dataset is purely disconnected with XML storage.
49. Data Adapter?
DataAdapter will act as a mediator between dataset & database server. DataAdapter will maintain collection of command object. Data adapter will perform 2 things
· It will read data from database into dataset
· It wil update datast manipulations with database server.
Dim DA as new SQLDataAdapter(select * from emp”, con)
Dim DS as new Dataset
DS.fill(DS,”emp”)

Fill Method:-
Fill method will perform 3 things
1. It will establish connection
2. It will send select statement to the database sever using datareader. It will read record by record into dataset memory.
3. It will close the connection.
DS.Tables(“emp”).Row(0).Item(2)
DS.Tables(“emp”)Rows.Count
It will give total records.
50. Data Binding?
When address of the memory location is provided to the control, then it is called as data binding.
That control is called as bounded control.
Data Binding will reduce manual coding for the developer this makes developer job easier & application development faster.
Data Binding is applicable for windows application & ASP.Net web application . For other application we have to go through manual coding.ADO àsupports Data Binding.
Set t1.datasource=rc
T1.datafield=”empno”
a. The recordset column data will be given to text property of the textbox this can’t be changed.
b. A textbox can’t be related with more than one column of the recordset. These problems has been overcome within ADO.Net databinding.

Each windows form will maintain binding context object, a binding context object will manage collection of currency manager objets.
Currency manager will act as a pointer to dataset table. This will support manipulations & navigations with dataset table.
According to the record pointer bounded controls will be refreshed.
51. DataAdpter Wizard?
a. DataAdapter wizard can be used with windows application & ASP.Net web application.
b. It will create objects local to form.
DataAdapter will not be configured with delete command & update command if the back-end table is not having primary key column
52. DataGrid?
To display multiple records in a tabular format.

DataGrid will support all the manipulations; these manipulations
will be reflected on the dataset table through the currency manager.
Sorting with Data Grid:- When user clicks on the column header it will perform sorting in the ascending order. It it is second click it will perform sorting in descending order.
If red only property is true data grid does not support manipulations.
53. Data view?
Dataview can be defined as a virtual table based on , dataset tables this will support all the manipulations which will be reflected on dataset table & vice-versa.
Dataview will support following.
· Filtering datset table based on particular criteria.
· It will support sort in based on particular column.
· It will provide security for dataset table by restricting manipulations.
54. Data Relation?
When you want to apply foreign key relation between dataset table columns then we required data relation.
DataRelation will provide 3 features
i. Child record will not be accepted if there is no parent record.
ii. The parent record can’t be deleted if the child records exist or the parent record can be deleted along with corresponding child records.
iii. The child records can be accessed based on parent record.
If the requirement is 1st two things Data Relation is recommended.
It will consume more amounts of memory resources.
55. Dynamic Cursor?
When the database table manipulation is reflected implicitly within record set memory then it is called as Dynamic cursor implementation.
This Dynamic cursor is supported by only SQL-Server where the database server will manage the record set.
· ADO.Net does not support dynamic cursor implementation because Dataset is purely disconnected implementation. when the .Net application require dynamic cursor implementation the solution will be ADO Library.
56. COM?
Components object Model.
Component?
A component can be defined as unit of binary standard code, represented in the form of DLL or EXE or OCX
Component will provide following:-
a. Reusability.
b. Better Maintenance
c. Application startup will be faster.
d. Language Interoperability
The requirement in the industry is component concept with object oriented programming. The solution provided by the Microsoft is COM.
COMà 1) Set of RulesàCOM interfaces
2) Set of subroutinesàCOM Runtime.
· COM rules have to be implemented by the developer for designing component.
· COM Runtime is provided for providing component services to different client applications.
· COM comes as a built in with windows operating system.
· COM Interfaces:
IUnknown Interface.
Udispatch Interface
IUnknown Interface:
· ADDRef
· Release
· Query Interface
A com component should maintain a counter variable called as ref. Count. When a reference is provided for the COM object AddRef method will increment reference count variable. When a reference is removed for the COM object, release method will decrement reference count variable. If the ref. Count becomes zero, COM object will be destroyed.
Query Interface will provide access to other interfaces supported by Com.
Iunknown interface is called as standard COM Interface.
This has to be implemented by every COM component. As it carries lifetime methods for components.
Note:
VC++ , will support the COM directly where as visual Basic will support com indirectly through activex platform.

A COM component requires a unique identifier called as GUID ie., Global Unique Identifier. This GUID will be 128 bit no in the hexadecimal format, this will provide uniqueness for the COM components.
After attaching GUID the source code can be compiled into DLL or Exe.
COM supports two type of components
1) In process Com Component
2) Out process Com Component
Inprocess component will provide faster communication i.e., better performance compared to out-process component. Out process component is required to implement automation & distributing services through DCOM
COM Component should be registered under windows registry.
57. InProcess COM Component?
When the COM component is loaded into the client application process, then it is called as inprocess COM component. This will be represented in the form of DLL server.
58. Out-Process COM Component?
When the component is external to the client application process, then it is called as out-process component. This will be represented in the form of EXE.Server

59. COM Drawbacks?
· COM is a binary standard towards windows.
· COM component is invalid without registry entry.
· COM doesn’t support inheritance it is object based.
· Versioning problem: Windows Registry can’t maintain multiple versions of same COM components. This is called as versioning problem. It can be termed as “DLL HELL”
This problems has been overcome in .Net Framework by introducing “Assemblies”

60. Assemblies?
Assembly can be defined as a small unit of code for deployment.
This provides reusability, security & versioning.
Assembly will contain collection of user defined types & resource information . The user defined types will be grouped under logical container called as “Namespace”
Assemblyà
1. EXEàApplicationàNo Reusability
2. DLLàLibraryàReusability
Friend class:- The class which is accessible only within the assembly is called Friend Class.
Public Class:-The class which is accessible outside the assembly is called as public class
Friend Method:- The method which is accessible with the instance created within the assembly, then it is called as Friend Method.
Protected Friend:- This is similar to Friend method, It is accessible outside the assembly within derived class only.
Assembly can be classified into three types.
1) Private Assembly:- The Assembly local to a particular folder is called as “private Assembly”. This assembly will be accessible to all the applications present in the same folder. Private Assembly is recommending when the assembly is required for a specific application.
2) Shared Assembly
3) Satellite Assembly

61. Probing?
It is a concept of runtime locating assembly required for the application execution.
The default probing of private assembly will be implemented in two places
1) Application Folder ( E:\VBNET56)
2) Subfolder with the name of Assembly(E:\VBNET56\MYDLL)
The probing can be extended by providing set of instructions to the run time in the form of configuration file.
.
62. Assembly Architecture?
Manifest

Type
IL

Meta Data
code
Resource Info


Manifest:- Manifest will contain Metadata of the Assembly. This includes title of the assembly, description of the assembly public key, company Name, version no so on.
Manifest will maintain the files required fort the assembly.
Compiler will prepare the manifest & It is required for the run time
CmdPrompt:> ILDASM MYDLLCLIENT.EXE
Type Metadata:- It will maintain description of namespaces & types supported by assembly.
IL Code:- The compiler will convert .Net high-level language code into IL-code.
This is understandable to the CLR (common Language Runtime).
This is not a executable code. It is a platform independent code which will be interpreted by CLR into operating system native code.

63. What is Shared Assembly?
When the assembly is placed into a repository called as “GAC” then the assembly is called as “Shred Assembly”.
A single copy of Assembly will provide services to different Client applications through out the system hence it is also called as “Machine wide Assembly”.
When the Assembly is required for set of applications then always go with ‘shared Assembly’.

64. Generating Public Key?
Microsoft is providing strong Name utility i.e, [SN.Exe]
E:\VBNET56> sn –k(lower case k)
E:\> SN –k keyfile1.snk
It will produce keyfile1.snk
Containing publickey.
E:\dir> SN –tp keyfile.snk
Public key is …..
…. Public key token is 12AB-----
Public key:- Public key is a very lengthy number. It will occupy around 160 bytes of memory; it will under go hashing and produces 8 byte number called as “public key token”.
This public key token will be given to each client application.
.
_______________________________________68 page
65. Strong Name?
When “xxxx“assembly is Build then It will produce xxxx.dll signed with public key.
When the assembly signed with public key, then it is called as strong named Assembly.
Strong Name is a collection of 4 things.
· Assembly Name
· Public key
· Version number
· Culture (English USA default)
This strong name will provide uniqueness for Assembly
66. What is GAC (Global Assembly Cache)?
GAC will act as a registry of .Net framework for maintaining shared Assembly. This comes with the installation of .Net Framework.
Location:- C:\WinNT\AssemblyàGAC[Global AssemblyName verson …]
GAC is applied with security options.
1. It will accept only strong Name assemblies.
2. It is accessible to the user with administrator privilege.
Placing Assembly into GAC:-
1. Windows Explorer.
E:\VBNET56\Sassembly56\Bin\Sassembly56.Dll…. drag and drop at c:\WinNT\Assembly
2. Command prompt UtilityàGacutil.exe
Cmd:\> Gacutil –i “E:\VBNET56\Sassembly56\bin\Sassembly56.dll”
Assembly will be placed into GAC.
Cmd:\> Gacutil –u Sassembly56
To delete from GAC
Windows Registry will maintain location of COM component where GAC will contain Assembly.
Windows Registry cannot maintain multiple versions of COM component where as GAC can contain multiple version of Assembly.
When the DLL is placed into version folder, then the assembly will be displayed with built in assembly list, under ADD Reference.
67. CLR Architecture?
.Net àRuntimeàCLRàMscoree.dll
c:\winNT\System32
CLR is platform dependent different Operating systems will be provided with different Runtimes i.e., CLRs
When you execute .Net application the request will go to operating system, o/s will take care of loading CLR. The application, which will load CLR, is called as “RunTimeHost”
The RunTimeHost for desktop application is an API function called “CORBINDTORUNTIME”
The RunTimeHost for web-based application is an ASP.Net WORKER Process i.e.,[ASPNet_wp.exe]
ClientApp.exeàAassembly.DLL
CLR is a collection of resources i.e., services.
Assembly Resolve will read the manifest of the application. It will identity private assemblies & shared Assemblies required for the application it will forward request to assembly loader.
68. What is Assembly Loader?
· Assembly loader will load the assembly into application process.
69. What is Type Checker?
Type checker will verify all the types used in the application with CTS or CLS standard.
This provides type safety
70. What is Debug Manager?
Debug manager service will provide line by line execution. This will support debugging process
71. What is Garbage Collector?
It will release the memory of unused objects. This will provide automatic memory management.
72. COM Marshaller?
It will provide communication with COM runtime.
This will support inter-operatability with COM
73. What is Thread Support?
This service will maintain more than one execution path within application process.
This will provide equal processor time to all the execution paths this will support multi-threading.
IL to Native Compiler is called as ‘JIT’ compiler [i.e., Just in Time Compiler]
This will convert intermediate language code into operating system native code.
74. What is Versioning Assembly?
When you want to differentiate older content of the assembly with the newer content of the assembly then we require version number. I.e.,., versioning Assembly.
This provides Uniqueness for the Assembly.
Version number comes with 4 parts
1) Major.Minor.Build.Revision
When the subprogram logic is modified the version number of the assembly has to be changed towards revision part.
When new sub-programs are added version number has to be changed towards build part.
When the interface names are changed i.e., method names & class names.
Version number has to be changed towards minor part.
When new classes are added into the assembly, version number has to be changed towards major part.
Runtime will provide compatibility towards revision & build parts.
75. What is Side-by-Side Execution?
When more than one application is executed side by side using the same Assembly by side using the same Assembly with different version numbers, than it is called as side-by-side Execution.
This is supported because GAC can maintain multiple versions of same Assembly
76. What is Interoperatibility With COM?
· Managed Code:- The code which will be executed under the control of CLR than it is called as managed code.
· Unmanaged code:- The code which will be executed outside the CLR is called as unmanaged code …
· Unsafe Code:- This is a managed code which is not recommended to use in the application development. This is pointer programming.
Note: This is not supported by VB.Net It is supported by C#.
When managed code is communicating with unmanaged code then it is called as interoperatibility.
Interopertibility is required towards migration projects. I.e., converting VB 6.p application into VB.Net Application.
77. Converting Type Library into Type Metadata?
Type Library can be converted into type metadata in two ways
· Using Visual studio.Net
· Using Command prompt utility àILBIMP.ExeàType Library Importer utility.
Note: CLR will maintain a proxy i.e., software to communicate with COM runtime. This proxy is provided with a name called as RCW i.e., Runtime callable Wrapper..Net Application is dependent on COM based DLL.
· CLR services will not be provided for component.COM object will be destroyed by itself. Garbage collector service will not be provided.
· Inheritance is not supported.

78. What is Type Library Importer Utility?
VS.Net will produce Private Assembly from COM based DLL.
If the requirement is shared Assembly then go with type library importer utility.
Cmd:\> TLBIMP KEYFILE:KEYFILE1.SNKNAMESPACE:vbmATH56Netout:vbMath56Net.dll vbMath56.Dll
It will produce VBMath56Net:Dll [.Net Assembly]
Singed with public key.
Cmd:\> Gacutil –I VBMath56Net.Dll
VB6.0 application can take the services of .Net Assembly.
MicroSoft is providing two utilities for converting TypeMetaData into TypeLibrary.
a. Type Library Exporter utility i.e.,[TLBEXP.EXE]
b. Register Assembly [RegAsm.exe]
“TLBEXP” will not regster COM based DLL under windows registry where as “RegASM” will register Under Windows registry
E:\VBNET56 àMYDLL.DLL[.NET]
Cmd:\> RegASM tlb:mydllcom.dll
It will produce my DLLCOM.DLL
79. What is CCW (COM callable Wrapper)?
CLR will maintain a proxy to receive COM request. This proxy is provided with a name called as CCW i., COM Callable Wrapper.
· When .Net application is calling windows API function then it is called as pinvoke i.e., platform invoke.
· COM based component can be developed directly from visual studio. Net
80. Windows Control Library?
To create user defined control it provides reusability.
The user defined control can be created in two ways.
· Inherited Control: - Extending functionality of existing control.
· User Control:- Grouping collection of existing controls.
Note:-
Raise Event will make a call to event procedure provided by the application developer.
VB 6.0 supports user defined control creation with activex control project.



81. Difference between ActiveX Control and Windows Control Library?

ActiveX Control
Windows Control Library
It will be represented in the form of OCX file i.e., OLE Control Extension It is a COM based Component. It requires registry entry.
It will be represented in the form of DLL file It is a .Net component It doesn’t require registry entry.
It does not support Inherited control creation because COM doesn’t support inheritance.
It supports Inherited control & user control creation.
It doesn’t support scratch level control creation.
It supports scratch level control creation using Graphics [GUI]

82. What is Delegate?
C , C++ àFunction pointer . It will maintain Address of the sub programs.
· In C++ function pointer is provided in the form of ordinary statement. It is not provided with object oriented approach.
· In C++ function pointer can not maintain address of member functon.
· In C++ function pointer does not provide Type safety.
This ploblems has been overcome under .Net Framework by providing ‘Delegate’
Delegate is a user defined type for maintaining address of the sub program.
This acts like ‘function pointer’
Syntax:-
Privatepublic Delegate subFunction ( para…..)
Private delegate sub
Any method withstring (s as string)
It will be inherited from system.delegate
Dim ptr as AnyMethodWithString
Ptr=Addressof
The delegate variable can maintain address of the sub program where the sub program type & signature should match with delegate type.
Ptr.Invoke(---)
It will call subprogram.
Delegate is required to implement callback functionality.
In this case one sub program will be send as a parameter to another sub-program.

Microsoft has applied Delegate concept in different areas of .Net f/w
1. Event Handling
2. Multithreading
3. Distributed Application
Even Handling Architecture:- It will maintain address of subprogram i.e.àDelegate
Microsoft is providing a delegate towards each event. The application developer should provide sub-procedure to the event delegate.
This sub-procedure should match with signature of the delegate.
For this reason it is mandatory to provide two parameters for the event procedure.
VB.Net is supporting two types of event Binding.
1. Static Event Binding.
2. Dynamic Event Binding.
Static Event Binding:- When address of the sub program is provided to the event delegate at compilation time, then it is called as static event binding. This can be implemented using handles keyword.
A single sub-program can act as a event procedure for more than one control event.
The First parameter will provide reference to the control which is making a call to sub-provide additional information based on the action performed by the user.
Advantages:-
1. It provides reusability
2. It provides better maintenance
VB 6.0 supports control array this will provide one event procedure for set of controls. The controls should belong to same category.
VB.Net does not support control array. The same can be implemented with ‘Delegate’ concept. It provides more flexibility.
Dynamic Even Binding:- When the sub-program address is provided to the event delegate at Runtime, then it is called as Dynamic event binding.
This is required when the control creation takes place at runtime.
This can be implemented using two methods
1. Add Handler:- Attaching subprogram to Event Delegate
2. Remove Handler:- Removing sub-program from event Delegate.
83. Crystal Report Designer?
Report à Presentation of Data in a formatted manner.
The Data will be presented in different sections
· Report Header section
· Group Header section
· Page Header Section
· Details Section
· Page Footer section
· Group Footer Section
· Report footer section
Crystal Report:- VB6.) Supports crystal report designer & data Reprot Designer.
Crystal Report
Data Report
It is a third party software provided by Seagate software.
This is provided by Microsoft it comes as build in with VB6.0
It doesn’t support Dynamic SQL i.e., select statement can’t be provided to the report through programming.
It supports Dynamic SQL.
It supports complex report generation
It supports Basic report generation.
VB.Net supports only crystal Report Designer. This comes as build-in with .Net Framework.
Microsoft is maintains a team called as crystal Decisions Team this will take of enhancements towards crystal report Designer under .Net framework.
Crystal Report Designer is supported with desktop application & web based application.

84. Crystal Report Viewer Control?
This control will act as a container for presenting crystal report & it is provided with set of build in options for printing, zooming, navigation buttons.
85. Packaging & Deployment?
When comes to Xcopy deployment client has to perform set of manual operations in terms registering DLL files creating programs menu so on.
To avoid this manual operations setup creation has been introduced.
When you create a setup for the application then it is called as ‘packaging’
VB6.0 supports CAB based setup[i.e. Cabinet File setup] this will support maintaining application in a single CAB file or multiple CAB files.
The problem with this is, it will not perform uninstallation, if the installation is terminated in the middle.
This problem has been over come with “Windows Installer package setup” i.e., MSI setup.
This will support maintaining the application only in a single file.
.Net framework supports the different types of projects for setup creation.
Setup Creation:-
1. Setup projectàMSI setup for Desktop Application.
2. Web Setup ProjectàMSI setup for Web Application
3. CAB setup Project
4. Merge Module Project
It will package Assembly or Assemblies in the form of ‘MSMFile’
This is not a independent setup it has to be related with MSI setup
Or CAB setup project.
If the application is communicating with oracle or sql-server database the ‘export file’ has to be created. This export file can be carried along with the setup to client system the tables can be imported in the client system.
Exporting Oracle Data:-
D:\Oracle\orac90\Bin> Exp
Username = scott
Password = tiger
Exportfile :> H:\VbNet56\ORATABLES.DMP
“ T
“ EMP
All the tables struction & data will be stored into a Dump File Called ORATABLES.DMP.
This file should be carried to the client system.
In the client system using import utility i.e., Imp.exe.
The data can be imported from dump file into oracle database server.
Deploying Application in Client System:- Client system requires CLR & Base class libraries for executing .Net Application.
Microsoft is providing a redistributable package called as ‘dotNetfx.exe’
When you Run this exe, it will install CLR & Base class libraries.
This is provided with windows component update CD & it is free download from Microsoft website.
86. Multi Threading?
Thread:-
A thread can be defined as unit of code maintaining its own execution path.
When the application is executed only one execution path then it is called as “single threaded application”
When the application is maintaining more than one execution path then it is called as ‘multithreaded application’.
When the application is having task which can be finished without user interaction then approach with threading implementation.
This will improve the performance of the application.
Ex. Printing job
Clientserver app.
Asynchronous Connection
Asynchronous Query
Graphics
Note:- CLR is maintaining a service called ‘thread support service’ this service will manage more than one execution path within .Net application process.
It will distribute equal processor time for all the threads within application process.
Methods:
1. Start() à It will maintain execution path for sub-program.
2. Sleep(milliseconds) à It will halt thread execution for N millisecs.
3. Suspend()
4. Resume()
5. CurrentThread() àIt will return thread under execution.
6. Join()àIt will attach child thread with the main thread so that main thread will be alive till all the child threads are dead.
7. Abort() à It will stop thread execution
Note:- Multi threaded application will provide different results for the different executions. It will be based on Hardware of the system & number of process handled by the operating system.
87. Asynchronous Connection?
When the application is waiting for the response of database server than it is is called as synchronous connection.
When the application is not waiting for the response of database server, then it is called as Asynchronous connection.
This will improve performance of the application.
Asynchronous connection is only recommended when the fallowed by statements are not dependent on the connection.
ADOà It supports Asynchronous Connection.
Dim Con as new connection
Con.open “provider name”,”username”,”password”,adAsyncConnect
à It will implements Asynchronous connection.
Note:- ADO.Net does not support Asynchronous connection, this can be implemented through “multithreading”.

88. Synchronization of Threads?
When the threads are executed one after another than it is called as synchronization of threads.
This is required when more than one thread is assigned with the same task.
This will provide proper result.
89. Distributed Application Development?
Application goes with 3 things presentation logic, Business logic, data storage.
Arrangement of these 3 things will go with 3 types of Architectures.

1. Single Tire-Architecture or monolithic Architecture.
2. Two Tire-Architecture or Client-Server Architecture.
3. Three Tire-Architecture.
90. Single Tire Architecture?
When a single user operates application then goes with single tire implementation.
If different users operate the application in different systems where the centralization data is required, and then go with ‘Two-Tier’.
91. Two Tire Architecture?
· In two tier Architecture business logic will be repeated in each client system so the maintenance will not be easier & no security for database tables. It is recommended to maintain business logic with database server in the form of stored sub-program. This is called as 2 ½ type Architecture
92. 2 ½ Tire Architecture?
When it comes to enterprise level where more no. of clients will be existing in different locations, it is not recommended to maintain business logic with database server for the following reasons.
· More burden on database server
· Client side software of database should be installed in each client system so the organization has to purchase more no. of client side licenses. This will be financial burden for the organization.
· Providing Database location to the client system is not recommended for the security reason. And the application communicating with database directly will create the maintenance problem.
· The solution for this problem is creating database independent application; this is possible with 3 tier Architecture.
93. Three Tier Architecture?
When the business logic is maintained independent of client application and data base server, then it is called as three-tier architecture.
Microsoft is supporting 3 tier architecture with D-COM.
Sun micro system is supporting three tier Architecture with RMI.
94. DCOM?
Distributed COM. It will distribute business logic to different client applications on the network.
It will produce 3 files
i) .Tld file is a type library file this will contain description of methods required for client application.
ii) .Vbr file will contain DCOM services required for the client application.
‘Tld & Vbr’ files are required in the client system to communicate with server system.
When Client makes a request proxy will convert request into stream, this is called as serialization. This stream will be arranged in a particular format by attaching IP Address to the network level, transmission. This is called as “MARCHALING”.
When the request is provided to the strub object it will perform unmarshaling & Deserialization of data & then makes a call to actual method on server machine & vice versa.
95. DCOM Drawbacks?
· It will produce N/W based stream, this is platform dependent. So transmission is supported under Windows NT.
· The arrangement of stream is proprietary std. So communication is possible between m/s applications.
· It supports only client activation mode. The object will be created towards each client request.
This will be burden for the server in certain cases.
These problems have been overcome under .Net FW by supporting remoting and XML web services.
96. Remoting?
It will provide .Net application to .Net application communication under homogeneous or heterogeneous platforms.
A ‘Channel’ is a means of communication between two applications ‘Remoting’ is supporting two types of channels.
i) TCP channel
ii) HTTP Channel
‘HTTP Channel” will produce XML based stream this is platform independent stream. This is required for cross platform transmission.
97. Difference between TCP Channel and HTTP Channel?
TCP Channel
HTTP Channel
It will produce binary standard stream. It is a compressed format stream. It will consume less amount of memory so transmission will become faster. This provides faster communication.
It will produce XML based stream. It is a text-based format It will consume more amount of memory so transmission will become slow. This makes communication slow.
It is applicable for intranet-based implementation.
It is for intranet based & internet based implementation when it comes to internet based implementation is has to be related with web server.
It requires manual coding to implement security
It doesn’t require manual coding to implement security will be provided by web server.
98. Remoting Serialization & Deserialization?
This can be implemented using ‘formatter classes’
i) Binary formatter
ii) SOAP formatter
Objectàformatter (serialization)àstream
Streamàformatter (de-serialization)àobject
Binary formatter will produce binary standard stream, this is used by TCP channel.
SOAP formatter will produce XML based stream, this is used by ‘HTTP channnel’
99. Remoting Activation modes?
Remotingàmarchal by value
àmarchal by referenceàserver activated àsinglecall
àsingleton
ClientActivated
1. When it comes to marshal by value the object will be created within server application process. This object will be transmitted to client application process.
2. When it comes to marshal by reference the object will be maintained by the server application process & client application will communicate with the object.
3. When the client makes a method all then the object is created makes a method call then the object is created within server application process, this is called as server activated implementation or server activated object.
If it is ‘single call’ the object will be destroyed after method execution. This is purely stateless implementation.
If it is ‘single ton’ the same object will provide services to different clients.
This object will be maintained by the life time 5 min. default.

· .Net àSystem.RunTime.Remoting.DLLà
Creating a channelàsystem.Runtime.remoting.channels.TCPHTTP namespace.
Dim t as new TcpChannel(PortNumber)
A portnumber is a logical one which will provide uniqueness for a particular service.
This will connect client request with a particular service.
This is called as End-point for the communication.
The portnumber should be in the range of ‘0 to 65535’ ‘1024’ ports are Reserved.

HTTP à80 port number
FTP à21
SMTP à25
NNTP à118
HTTPS à443
ORACLE à1521

Registering with O/S
System.Runtime.remoting.channels (namespace)àcahnnel services calssàRegister channel(+)
Registering Type with Remoting Registryà system.Runtime.remoting(Namespace)àremoting configuration calssàregisterwillknownservicetype(type,uri,mode)
* SystemàmarshalbyrefobjectclassàIt will provide for lifetime of object.
àIt will provide logic for stream generation.
When you want to distribute a class the class should be inherited from Marshal ByRefObjectClass.

100. Resource Management?
Non executable data of the application is called as resource information of the application. It is recommended to maintain external to the application sothat the maintenance will become easier & it can be loaded into the application Dynamicaly. It is not recommaned to maintain this information in the form of textfile for the security reason.
It has to be maintained in the binary standard format, this is called as resource file.

H:\vbnet56àMyResources.txt[notepad]
ADDR=Ammerpet, Hyd
Constr=Provider=MSDAORA.1;user id=scott;password=tiger;Datasource=sever

Microsoft is providing resource generator utility to compile text-file into resource file.
>Resgen MyResources.txt
MyResources.Resources:

The Resource information can be packaged in the form of an assembly called as “satellite Assembly”
The Assembly which maintains only resource information is called as “Satellite” Assembly or Resource only Ass.
Satellite Assembly can be generated by using Assembly linker utility i.e.,(AL.exe)

101. What is Static Assembly?
When the Assembly information is available under manifest of the application then the assembly is called as ‘Static Assembly’
102. What is Dynamic Assembly?
When the Assembly information is not available under manifest of the application but the assembly is loaded dynamically at Runtime, Then it is called as Dynamic Assembly.
The satellite Assembly can be loaded dynamically into the Application.
103. What is Loading Assembly?
Dim A as System.Reflection.Assembly
A=system.Reflection.Assembly.Loadfile(“E:\VbNet56\RAssembly.DLL”)
Dim Rm as new system.Resources.Resourcemanager(“MyResources”,A)
Rm.Getstring(“Addr”)
104. What is Localization & Globalization?
* CultureàLanguage code-----Country code

Each culture will have its own set of standards in terms of dae format time format, currency format so on..
When you design an application specific to culture then it is called as localization.
When you design an application supporting multiple cultures then it is called as Globalization.
The default culture will be English US.(en US)