Dot Net Framework

1. What is .NET Framework?
Dot Net Framework is an environment for building, running, deploying Web Applications, Desktop Applications & Web services. Dot Net Framework is an API for building applications on windows.

The .NET Framework has two main components: Common Language Runtime (CLR) and Framework Class Library (FCL).
CLR is an agent that manages code at execution time, providing core services such as memory management, thread management, remoting, code verification, compilation, and other system services, also enforcing strict type safety.
FCL is an Object-Oriented collection of reusable types that we can use to develop applications ranging from traditional command-line or graphical user interface (GUI) applications to applications based on the latest innovations provided by ASP.NET such as Web Forms and XML Web services.

2. What are CLR, CTS, and CLS?
The .NET Framework provides a runtime environment called the Common Language Runtime or CLR (similar to the Java Virtual Machine or JVM in Java) which handles the execution of code and provides useful services for the implementation of the program.
The managed code that targets CLR benefits from useful features such as cross-language integration, cross-language exception handling, versioning, enhanced security, deployment support and debugging.

Common Type System (CTS) describes how types are declared, used and managed in the runtime and facilitates cross-language integration, type safety and high performance code execution.
The CTS Specification defines all possible Datatypes and Programming constructs supported by the CLR and how they may or may not interact with each other. Because of this feature, the .NET Framework supports development in multiple programming languages.

Common Language Specification(CLS) is simply a specification that defines the rules to support language integration in such a way that programs written in any language can interoperate with one another taking full advantage of inheritance, polymorphism, exceptions and other features.

What is common language Specification?What is difference between CTS and CLS?
The Common Language Specification (CLS) describes a set of features that different languages have in common.
The CLS includes a subset of the Common Type System (CTS).
The CTS defines the rules concerning data types.
Any program which uses CLS-compliant types can interoperate with any .NET program written in any language.
C# supports both CLS and CTS.


3. Is .NET a runtime service or a development platform?
Ans: It's both. .NET framework’s SDK consists of two parts: the .NET common language runtime and the .NET class library. SDK also includes command-line compilers for C#, C++, JScript, and VB. We use these compilers to build applications and components. These components require the runtime to execute so .Net is development and runtime platform.

4. What is MSIL?
While compiling managed code, the compiler translates your source code into Microsoft intermediate language (MSIL), which is a CPU-independent set of instructions that can be efficiently converted to native code. MSIL includes instructions for loading, storing, initializing, and calling methods on objects, as well as instructions for arithmetic and logical operations, control flow, direct memory access, exception handling, and other operations.
Microsoft intermediate language (MSIL) is a language used as the output of a number of compilers and as the input to a just-in-time (JIT) compiler. The common language runtime includes a JIT compiler for converting MSIL to native code.
Can I do things in IL that I can't do in C#?
Yes. A couple of simple examples are that we can throw exceptions that are not derived from System.Exception and can have non-zero-based arrays.

5. What is strong name?
A name that consists of an assembly's identity which includes text name, version number, and culture information (if provided).

6. What is portable executable (PE)?
The file format defining the structure that all executable files (EXE) and Dynamic Link Libraries (DLL) must use to allow them to be loaded and executed by Windows.

7. Which namespace is the base class for .net Class library?
Ans: system.object

8. Why do I get errors when I try to serialize a Hashtable?
XmlSerializer will refuse to serialize instances of any class that implements IDictionary, e.g. Hashtable. SoapFormatter and BinaryFormatter do not have this restriction.

9. What are the contents of assembly?
In general, a static assembly can consist of four elements:
1. The assembly manifest, which contains assembly metadata.
2. Type metadata.
3. Microsoft intermediate language (MSIL) code that implements the types.
4. A set of resources.

10. What are the different types of assemblies?
Private, Public/Shared, Satellite

11. What is serialization in .NET? What are the ways to control serialization?
Serialization is the process of converting an object into a stream of bytes. Deserialization is the opposite process of creating an object from a stream of bytes.
Serialization/Deserialization is mostly used to transport objects during remoting. Serialization can be defined as the process of storing an object’s state to a storage medium. During this process, public and private fields of the object, name of the class, including the assembly containing the class are converted to a stream of bytes which is then written to a data stream. When the object is deserialized, an exact clone of the original object is created.
• Binary serialization preserves type fidelity, which is useful for preserving the state of an object.
• XML serialization serializes only public properties and fields and does not preserve type fidelity. This is useful when we want to provide or consume data without restricting the application that uses the data.
There are two separate mechanisms provided by the .NET class library - XmlSerializer and SoapFormatter/BinaryFormatter. Microsoft uses XmlSerializer for Web Services, and uses SoapFormatter/BinaryFormatter for remoting.

12. Define Assembly. How many types of assemblies are there?
Assembly is a collection of compiled or executable components which is versioned and deployed as single implementation unit.
Assemblies are the fundamental unit of deployment, version control, reuse and security permissions for a .NET-based application. Assemblies take the form of an executable (.exe) file or dynamic link library (.dll) file, and are the building blocks of the .NET Framework.
All managed types and resources are contained within an assembly and are marked either as accessible only within the assembly or as accessible from code in other assemblies.
Assemblies can be static or dynamic. Static assemblies can include .NET Framework types (interfaces and classes), as well as resources for the assembly (bitmaps, JPEG files, resource files, and so on). Static assemblies are stored on disk in PE files. You can also use the .NET Framework to create dynamic assemblies, which are run directly from memory and are not saved to disk before execution. You can save dynamic assemblies to disk after they have executed.

Assemblies are of three types
1. Private assembly- can be accessed only by single application and is stored in the application's directory
2. Shared assembly-can be accessed by multiple applications in a system and is stored in the global assembly cache.
3. Satellite assemblies- are used to deploy language-specific resources for an application and are stored in a language-specific subdirectory for each language.

13. In .NET Compact Framework, can I free memory explicitly without waiting for garbage collector to free the memory?
Yes, you can clear the memory using gc.collect method but it is recommended that u should not call this coz we don’t know the exact time when the GC will be called automatically.
In Dot net u cannot explicitly call a garbage collector; it can be called through CLR.

14. How can I change private assembly to shared assembly?
Yes, you can change from Private to Shared.
- Get the SN using sn.exe?
- Add the SN to the Assembly
- Put the Assembly in GAC.

16. How many classes can a single .NET DLL contain?
Unlimited

18. What is a Manifest?
Manifest describes the assembly itself, providing the logical attributes shared by all the modules and components in an assembly.
The manifest contains the assembly name, version number, locale and an optional strong name that uniquely identifies the assembly. This manifest information is used by the CLR.

19. What is a Metadata?
Metadata is used to describe other data. Data definitions are sometimes referred to as metadata. Examples of metadata include schema, table, index, view and column definitions.

Metadata is information stored in the assembly that describes the types and methods of the assembly and provides other useful information about the assembly. Assemblies are said to be self-describing because the metadata fully describes the contents of each module.

20. What is a Strong Name?
A strong name is a way to ensure that a shared assembly's name does not conflict with another shared assembly.
A strong name contains assembly name, a public key and a private key.
For installing an assembly into GAC you need to give it a strong name. First generate a key pair using 'sn.exe' command line utility and write the key file name as AssemblyKeyFileAttribute in a code file of the assembly.

21. Creating a Key Pair
To create a key pair uses the dot net command line tool sn.exe
sn.exe -k mykey.snk
This filename is used as the attribute value for AssemblyKeyFileAttribute in one of the code files of assembly. It generates a strong named assembly which could be installed into the GAC.

22. What is GAC?
GAC stands for Global Assembly Cache. It is used for storing shared assemblies. It stores all versions of a particular assembly so that on updating an assembly the existing applications which use the earlier version do not break.
For storing an assembly into the GAC you need to sign the assembly with a strong name. For this purpose follow these steps:
1. Use sn.exe command line utility to generate a key pair
2. Add the key file name to the assembly as value for AssemblyKeyFileAttribute.
3. Build the assembly.
4. Use gacutil.exe -i command on the command prompt to install it in the cache.

23. What is Reflection?
Reflection is a namespace in .net which allows you to access metadata for loaded types and objects.
It also allows you to create new types and their objects at runtime.
Reflection is the process by which a program can read its own metadata or metadata from another program. A program is said to reflect on itself or on another program, extracting metadata from the reflected assembly and using that metadata either to inform the user or to modify the program's behavior.
For the attributes in the metadata to be useful, you need a way to access them, ideally during runtime. The classes in the Reflection namespace, along with the System.Type class, provide support for examining and interacting with the metadata.
Reflection is generally used for any of four tasks.

Viewing metadata
This might be used by tools and utilities that wish to display metadata.

Performing type discovery
This allows you to examine the types in an assembly and interact with or instantiate those types. This can be useful in creating custom scripts. For example, you might want to allow your users to interact with your program using a script language, such as JavaScript, or a scripting language you create yourself.

Late binding to methods and properties
This allows the programmer to invoke properties and methods on objects dynamically instantiated, based on type discovery. This is also known as dynamic invocation.

Creating types at runtime (reflection emit)
The ultimate use of reflection is to create new types at runtime and then to use those types to perform tasks. You might do this when a custom class, created at runtime, will run significantly faster than more generic code created at compile time.

24. What are Attributes?

Attributes are part of metadata for a class.
Attributes are used to specify assembly information like key file name, or for specifying security related information. You can create new attributes for your specific needs or ideas.
Attributes are a mechanism for adding metadata, such as compiler instructions and other data about your data, methods, and classes, to the program itself. Attributes are inserted into the metadata and are visible through ILDasm and other metadata- reading tools.

25. When is Marshalling not necessary?
Marshalling is the process of packaging and sending interface method parameters across thread, process or machine boundaries.
When Ever component runs with in client App Domain process then marshalling is not necessary. Marshalling is nothing but gathering or packaging the information into message for transferring across the network required in distributed environment.

26. What is JIT (just in time)? How it works?
When Assembly is executed for the first time on a new computer,the IL will be compiled into machine language optimized for the machine's language which is called as JIT(Just-In-Time Compilation).

27. What is Application Domain?

The primary purpose of the AppDomain is to isolate an application from other applications. Win32 processes provide isolation by having distinct memory address spaces.
All memory in the AppDomain is managed by the .NET runtime, so the runtime can ensure that AppDomains do not access each other's memory.

Objects in different application domains communicate either by transporting copies of objects across application domain boundaries, by using a proxy to exchange messages.

MarshalByRefValue When a remote application references a marshal by value object, a copy of the object is passed across application domain boundaries.


MarshalByRefObject is the base class for objects that communicate across application domain boundaries by exchanging messages using a proxy.


28. What is the managed and unmanaged code in .net?

Code that you develop with a language compiler that targets the runtime is called managed code; it benefits from features such as cross-language integration, cross-language exception handling, enhanced security, versioning and deployment support.

29. How do you create threading in .NET? What is the namespace for that?
System.Threading.Thread
30. Describe the Managed Execution Process?
> Choosing a compiler.
> Compiling your code to Microsoft intermediate language (MSIL).
> Compiling MSIL to native code.
> Executing your code.

31. What are Namespaces?
The namespace keyword is used to declare a scope. This namespace scope lets us organize code and gives you a way to create globally-unique types. Even if you do not explicitly declare one, a default namespace is created.

SQL Server 2000

Databases

A database is a storage place for data. For most types of data files, a database does not present information directly to a user; rather, the user runs an application that accesses data from the database and presents it to the user in an understandable format.

Relational Databases

Although there are different ways to organize data in a database, a relational database is one of the most effective systems. A relational database system uses mathematical set theory to effectively organize data. In a relational database, data is collected into tables (called relations in relational database theory).

Table: A two-dimensional object consisting of rows and columns that is used to store data in a relational database. Each table stores information about one of the types of objects modeled by the database. For example, an education database might have one table for teachers, a second for students, and a third for classes.

Functions

A function encapsulates frequently performed logic in a subroutine made up of one or more Transact-SQL statements. Any code that must perform the logic incorporated in a function can call the function rather than having to repeat all of the function logic.

SQL Server2000 supports two types of functions:

Built-in functions. These functions operate as defined in Transact-SQL and cannot be modified. The functions can be referenced only in Transact-SQL statements.

User-defined functions. These functions enable you to define your own Transact-SQL functions by using the CREATE FUNCTION statement.

Built-In Functions

The Transact-SQL programming language contains three types of built-in functions: rowset, aggregate, and scalar.

Data Types

A data type is an attribute defining the type of data that an object can contain. Columns, parameters, variables, functions that return data values and stored procedures that have a return code all have data types. Transact-SQL includes a number of base data types, such as varchar, text, and int.

Types of User-Defined Functions

The Transact-SQL programming language supports two types of user-defined functions: scalar and table.

Scalar Functions.

Scalar functions return a single data value of the type defined in a RETURNS clause. You can use all scalar data types, including bigint and sql_variant. The timestamp data type, user-defined data type, and non-scalar types (such as table or cursor) are not supported. The body of the function, defined in a BEGIN...END block, contains the series of Transact-SQL statements that return the value. The return type can be any data type except text, ntext, image, cursor, and timestamp.

Table Functions

Table functions return a table. There are two types of table functions: inline and multi-statement. For an inline table function, there is no function body; instead, the table is the result set of a single SELECT statement. For a multi-statement table function, the function body, defined in a BEGIN...END block, contains the Transact-SQL statements that build and insert rows into the table that will be returned.

Inner join: The INNER JOIN returns all rows from both tables where there is a match. If there are rows in Employees that do not have matches in Orders, those rows will not be listed.

Left join: The LEFT JOIN returns all the rows from the first table (Employees), even if there are no matches in the second table (Orders). If there are rows in Employees that do not have matches in Orders, those rows also will be listed.

Right join: The RIGHT JOIN returns all the rows from the second table (Orders), even if there are no matches in the first table (Employees). If there had been any rows in Orders that did not have matches in Employees, those rows also would have been listed.

Outer join: it may be desirable to include rows from one table even if it does not have matching rows in the other table. This is done by the use of an OUTER JOIN. OUTER JOINs are used when we want to keep all the rows from the one table, such as Course, or all the rows from the other, regardless of whether they have matching rows in the other table.

Indexers:

It is the job of the query optimizer to determine which indexes will be the most useful in processing a specific query. Although indexes may speed up queries in large tables, indexes will slow update operations (insert, delete, update), because every update causes a rebuild of the index. We begin by introducing the "simple" CREATE INDEX statement.

Stored procedure: A stored procedure is a group of Transact-SQL statements that is compiled one time and that can then be executed many times. This functionality increases performance when the stored procedure is executed because the Transact-SQL statements do not have to be recompiled.

CREATE PROCEDURE sp_GetInventory
@location varchar (10)
AS
SELECT Product, Quantity
FROM Inventory
WHERE Warehouse = @location

EXECUTE sp_GetInventory 'FL'

Triggers: A trigger is a special type of stored procedure that a user does not call directly. When the trigger is created, it is defined to execute when a specific type of data modification is made against a specific table or column.

Why triggers? – to extend data integrity and to implement complex business logic.

Two classes of triggers:

1) Instead of – this bypass the triggering action and run in their place.

2) After

default trigger class

After trigger fire as a supplement to the triggering actions.

Move then one allowed on a table.

Syntax:

Create Trigger trigger_name

ON table_name or view_name

FOR trigger_class and trigger_types

AS T-SQL statement

Constraints

Constraints enable us to define the way that SQL Server automatically enforces the integrity of a database. Constraints define rules regarding the values allowed in columns and are the standard mechanism for enforcing integrity. Using constraints is preferred to using triggers, rules, or defaults.

A constraint is a property assigned to a column or the set of columns in a table that prevents certain types of inconsistent data values from being placed in the column(s). Constraints are used to enforce the data integrity. This ensures the accuracy and reliability of the data in the database. The following categories of the data integrity exist:

· Entity Integrity

· Domain Integrity

· Referential integrity

· User-Defined Integrity

· Entity Integrity ensures that there are no duplicate rows in a table.

Domain Integrity enforces valid entries for a given column by restricting the type, the format, or the range of possible values.
Referential integrity ensures that rows cannot be deleted, which are used by other records (for example, corresponding data values between tables will be vital).
User-Defined Integrity enforces some specific business rules that do not fall into entity, domain, or referential integrity categories.

Each of these categories of the data integrity can be enforced by the appropriate constraints. Microsoft SQL Server supports the following constraints:

· PRIMARY KEY

· UNIQUE

· FOREIGN KEY

· CHECK

· NOT NULL

Rules

Rules are a backward-compatibility feature that performs some of the same functions as CHECK constraints. CHECK constraints are the preferred, standard way to restrict the values in a column. CHECK constraints are also more concise than rules; there can be only one rule applied to a column, but multiple CHECK constraints can be applied. CHECK constraints are specified as part of the CREATE TABLE statement, while rules are created as separate objects and are then bound to the column.

User Defined functions:

A Scalar user-defined function returns one of the scalar data types. Text, ntext, image and timestamp data types are not supported. These are the type of user-defined functions that most developers are used to in other programming languages. You pass in 0 to many parameters and you get a return value. Below is an example that is based in the data found in the NorthWind Customers Table.

CREATE FUNCTION whichContinent
(@Country nvarchar(15))
RETURNS varchar(30)
AS
BEGIN
declare @Return varchar(30)
select @return = case @Country
when 'Argentina' then 'South America'
when 'Belgium' then 'Europe'
when 'Brazil' then 'South America'
when 'Canada' then 'North America'
when 'Denmark' then 'Europe'
when 'Finland' then 'Europe'
when 'France' then 'Europe'
else 'Unknown'
end

return @return
end

Index: INDEX is used to create a new index on some column in an existing table. The following is the general syntax for the CREATE INDEX statement:

CREATE INDEX index_name
ON Table_name (column [ASC | DESC])
 
There are clustered and nonclustered indexes.
A clustered index is a special type of index that reorders the way records in the table are physically stored. Therefore table can have only one clustered index. The leaf nodes of a clustered index contain the data pages.

A nonclustered index is a special type of index in which the logical order of the index does not match the physical stored order of the rows on disk. The leaf node of a nonclustered index does not consist of the data pages. Instead, the leaf nodes contain index rows.


Views:

A database object that can be referenced the same way as a table in SQL statements. Views are defined by using a SELECT statement and are analogous to an object that contains the result set of this statement.

Data type:

An attribute that specifies what type of information can be stored in a column, parameter, or variable. SQL Server provides system-supplied data types; you can also create user-defined data types.

Union:

The UNION command is used to select related information from two tables, much like the JOIN command.

Drop Index

You can delete an existing index in a table with the DROP INDEX statement.

Connection Pooling:

Connection pooling is the ability of re-use your connection to the Database. This means if you enable Connection pooling in the connection object, actually you enable the re-use of the connection to more than one user.

The connection pooling is enabled by default in the connection object. If you disable the connection pooling, this means the connection object which you create will not be re-used to any other user than who create that object.

SqlConnection testConnection = new SqlConnection(@"Data Source=(local)\SQLEXPRESS;Initial Catalog=DEMO;Integrated Security=SSPI;");

long startTicks = DateTime.Now.Ticks;

for (int i = 1; i <= 100; i++)

{

testConnection.Open();

testConnection.Close();

}

long endTicks = DateTime.Now.Ticks;

Console.WriteLine("Time taken : " + (endTicks - startTicks) + " ticks.");

testConnection.Dispose();

Object Pooling:

Object pools (otherwise known as resource pools) are used to manage the object caching. A client with access to a Object pool can avoid creating a new Objects by simply asking the pool for one that has already been instantiated instead. Generally the pool will be a growing pool, i.e. the pool itself will create new objects if the pool is empty, or we can have a pool, which restricts the number of objects created.

It is desirable to keep all Reusable objects that are not currently in use in the same object pool so that they can be managed by one coherent policy. To achieve this, the Reusable Pool class is designed to be a singleton class.

Object Pooling is a service that is defined as "A performance optimization based on using collections of pre-allocated resources, such as objects or database connections." It is also mentioned that pooling results in more efficient resource allocation.

SQL: Standard computer language for accessing and manipulating database systems.

DML (Data Manipulation Language): select, update, delete & insert into.

DDL (Data Definition Language): Create table, alter table, drop table, create index, drop index/
IN: used when exact value we want to return for at least are of the column.

The SqlCommand class provides three main methods:

·ExecuteNonQuery Executes the command and returns the number of rows affected by the statement.

· ExecuteScalar Executes the command and returns a single value.

· ExecuteReader Builds a SqlDataReader that can be used to read a set of records.

Web Service & Remoting

Web Services are applications delivered as a service on the Web. Web services allow for programmatic access of business logic over the Web. Web services typically rely on XML-based protocols, messages, and interface descriptions for communication and access. Web services are designed to be used by other programs or applications rather than directly by end user. Programs invoking a Web service are called clients. SOAP over HTTP is the most commonly used protocol for invoking Web services.

  1. Are Web Services a replacement for other distributed computing platforms?
    No. Web Services is just a new way of looking at existing implementation platforms.
  2. In a WebService, need to display 10 rows from a table. So DataReader or DataSet is best choice?
    A: WebService will support only DataSet.
  3. How to generate WebService proxy? What is SOAP, WSDL, UDDI and the concept behind Web Services? What are various components of WSDL? What is the use of WSDL.exe utility?
    SOAP is an XML-based messaging framework specifically designed for exchanging formatted data across the Internet, for example using request and reply messages or sending entire documents. SOAP is simple, easy to use, and completely neutral with respect to operating system, programming language, or distributed computing platform.
    After SOAP became available as a mechanism for exchanging XML messages among enterprises (or among disparate applications within the same enterprise), a better way was needed to describe the messages and how they are exchanged. The Web Services Description Language (WSDL) is a particular form of an XML Schema, developed by Microsoft and IBM for the purpose of defining the XML message, operation, and protocol mapping of a web service accessed using SOAP or other XML protocol. WSDL defines web services in terms of "endpoints" that operate on XML messages. The WSDL syntax allows both the messages and the operations on the messages to be defined abstractly, so they can be mapped to multiple physical implementations. The current WSDL spec describes how to map messages and operations to SOAP 1.1, HTTP GET/POST, and MIME. WSDL creates web service definitions by mapping a group of endpoints into a logical sequence of operations on XML messages. The same XML message can be mapped to multiple operations (or services) and bound to one or more communications protocols (using "ports").
    The Universal Description, Discovery, and Integration (UDDI) framework defines a data model (in XML) and SOAP APIs for registration and searches on business information, including the web services a business exposes to the Internet. UDDI is an independent consortium of vendors, founded by Microsoft, IBM, and Ariba, for the purpose of developing an Internet standard for web service description registration and discovery. Microsoft, IBM, and Ariba also are hosting the initial deployment of a UDDI service, which is conceptually patterned after DNS (the Internet service that translates URLs into TCP addresses). UDDI uses a private agreement profile of SOAP (i.e. UDDI doesn't use the SOAP serialization format because it's not well suited to passing complete XML documents (it's aimed at RPC style interactions). The main idea is that businesses use the SOAP APIs to register themselves with UDDI, and other businesses search UDDI when they want to discover a trading partner, for example someone from whom they wish to procure sheet metal, bolts, or transistors. The information in UDDI is categorized according to industry type and geographical location, allowing UDDI consumers to search through lists of potentially matching businesses to find the specific one they want to contact. Once a specific business is chosen, another call to UDDI is made to obtain the specific contact information for that business. The contact information includes a pointer to the target business's WSDL or other XML schema file describing the web service that the target business publishes.
    • How to generate proxy class other than .net app and Wsdl tool?
      To access an XML Web service from a client application, you first add a Web reference, which is a reference to an XML Web service. When you create a Web reference, Visual Studio creates an XML Web service proxy class automatically and adds it to your project. This proxy class exposes the methods of the XML Web service and handles the marshalling of appropriate arguments back and forth between the XML Web service and your application. Visual Studio uses the Web Services Description Language (WSDL) to create the proxy.

  1. What is a proxy in web service? How do I use a proxy server when invoking a Web service?
  2. Asynchronous web service means?
  3. What are the events fired when web service called?
  4. How will do transaction in Web Services?
  5. How does SOAP transport happen and what is the role of HTTP in it? How you can access a web service using soap?
  6. What are the different formatters can be used in both? Why?.. binary/soap
  7. How you will protect / secure a web service?
    For the most part, things that you do to secure a Web site can be used to secure a Web Service. If you need to encrypt the data exchange, you use Secure Sockets Layer (SSL) or a Virtual Private Network to keep the bits secure. For authentication, use HTTP Basic or Digest authentication with Microsoft® Windows® integration to figure out who the caller is.
    these items cannot:
    • Parse a SOAP request for valid values
    • Authenticate access at the Web Method level (they can authenticate at the Web Service level)
    • Stop reading a request as soon as it is recognized as invalid
  8. How will you expose/publish a webservice?
  9. What is disco file?
  10. What’s the attribute for webservice method? What is the namespace for creating webservice?
    [WebMethod]

    using System.Web;
    using System.Web.Services;
  11. What is Remoting?
    The process of communication between different operating system processes, regardless of whether they are on the same computer. The .NET remoting system is an architecture designed to simplify communication between objects living in different application domains, whether on the same computer or not, and between different contexts, whether in the same application domain or not.
  12. Difference between web services & remoting?
  13. Can you pass SOAP messages through remoting?
  14. CAO and SAO.
    Client Activated objects are those remote objects whose Lifetime is directly controlled by the client. This is in direct contrast to SAO. Where the server, not the client has complete control over the lifetime of the objects.
    Client activated objects are instantiated on the server as soon as the client request the object to be created. Unlike as SAO a CAO doesn’t delay the object creation until the first method is called on the object. (In SAO the object is instantiated when the client calls the method on the object)
  15. Singleton and single call.
    Singleton
    types never have more than one instance at any one time. If an instance exists, all client requests are serviced by that instance.
    Single Call types always have one instance per client request. The next method invocation will be serviced by a different server instance, even if the previous instance has not yet been recycled by the system.
  16. What is Asynchronous Web Services?
  17. Web Client class and its methods?
  18. Flow of remoting?

Where on the Internet would you look for Web services?

UDDI.org - Universal Description, Discovery language.

What is the transport protocol you use to call a Web service SOAP?

HTTP is prefered for Soap while tcp for binary ie.

HTTP is used in web services and tcp works well in remoting.