521+ .NET Interview Questions And Answers 2020

Spread the love

Table of Contents

521+ .NET Interview Questions And Answers For Freshers & Experienced 2020

What Is The Microsoft.Net?

.NET is a set of applied sciences designed to rework the web right into a full scale distributed platform. It gives new methods of connecting methods, data and gadgets by way of a set of internet companies.It additionally gives a language unbiased, constant programming mannequin throughout all tiers of an software.

The objective of the .NET platform is to simplify internet growth by offering all the instruments and applied sciences that one must construct distributed internet functions

What Is The .web Framework?

The .NET Framework is ready of applied sciences that kind an integral a part of the .NET Platform. It is Microsoft’s managed code programming mannequin for constructing functions which have visually gorgeous consumer experiences, seamless and safe communication, and the power to mannequin a variety of business processes.

The .NET Framework has two major parts: the frequent language runtime (CLR) and .NET Framework class library. The CLR is the muse of the .NET framework and gives a typical set of companies for initiatives that act as constructing blocks to construct up functions throughout all tiers. It simplifies growth and gives a strong and simplified setting which gives frequent companies to construct software. The .NET framework class library is a set of reusable sorts and exposes options of the runtime. It incorporates of a set of courses that’s used to entry frequent performance

What Is Clr?

The .NET Framework gives a runtime setting referred to as the Common Language Runtime or CLR. The CLR might be in comparison with the Java Virtual Machine or JVM in Java. CLR handles the execution of code and gives helpful companies for the implementation of this system. In addition to executing code, CLR gives companies resembling reminiscence administration, thread administration, safety administration, code verification, compilation, and different system companies. It enforces guidelines that in flip present a strong and safe execution setting for .NET functions

What Is Cts?

Common Type System (CTS) describes the datatypes that can be utilized by managed code. CTS defines how these sorts are declared, used and managed within the runtime. It facilitates cross-language integration, kind security, and excessive efficiency code execution. The guidelines outlined in CTS can be utilized to outline your personal courses and values.

What Is Cls?

Common Language Specification (CLS) defines the principles and requirements to which languages should adhere to as a way to be suitable with different. NET languages. This allows C# builders to inherit from courses outlined in VB.NET or different .NET suitable languages

What Is Managed Code?

The .NET Framework gives a run-time setting referred to as the Common Language Runtime, which manages the execution of code and gives companies that make the event course of simpler. Compilers and instruments expose the runtime’s performance and allow you to put in writing code that advantages from this managed execution setting. The code that runs inside the frequent language runtime is known as managed code

What Is Msil?

When the code is compiled, the compiler interprets your code into Microsoft intermediate language (MSIL). The frequent language runtime features a JIT compiler for changing this MSIL then to native code.

MSIL incorporates metadata that’s the key to cross language interoperability. Since this metadata is standardized throughout all .NET languages, a program written in a single language can perceive the metadata and execute code, written in a special language.MSIL consists of directions for loading, storing,initializing, and calling strategies on objects,in addition to directions for arithmetic and logical operations,management circulate,direct reminiscence entry, exception dealing with, and different operations

What Is Jit?

JIT is a compiler that converts MSIL to native code. The native code consists of {hardware} particular directions that may be executed by the CPU.

Rather than changing the complete MSIL (in a transportable executable[PE]file) to native code, the JIT converts the MSIL as it’s wanted throughout execution. This transformed native code is saved in order that it’s accessible for subsequent calls

What Is Portable Executable (pe)?

PE is the file format defining the construction that each one executable recordsdata (EXE) and Dynamic Link Libraries (DLL) should use to permit them to be loaded and executed by Windows. PE is derived from the Microsoft Common Object File Format (COFF). The EXE and DLL recordsdata created utilizing the .NET Framework obey the PE/COFF codecs and likewise add extra header and knowledge sections to the recordsdata which might be solely utilized by the CLR.

What Is An Application Domain?

Application area is the boundary inside which an software runs. A course of can comprise a number of software domains. Application domains present an remoted setting to functions that’s just like the isolation offered by processes. An software operating inside one software area can’t instantly entry the code operating inside one other software area. To entry the code operating in one other software area, an software wants to make use of a proxy

How Does An Appdomain Get Created?

AppDomains are normally created by hosts. Examples of hosts are the Windows Shell, ASP.NET and IE. When you run a .NET software from the command-line, the host is the Shell. The Shell creates a brand new AppDomain for each software. AppDomains can be explicitly created by .NET functions

Dot Net Interview Questions And Answers

What Is An Assembly?

An meeting is a set of a number of .exe or dll’s. An meeting is the elemental unit for software growth and deployment within the .NET Framework. An meeting incorporates a set of sorts and sources which might be constructed to work collectively and kind a logical unit of performance. An meeting gives the CLR with the knowledge it wants to concentrate on kind implementations

What Are The Contents Of Assembly?

A static meeting can consist of 4 parts:

  • Assembly manifest-Contains the meeting metadata. An meeting manifest incorporates the details about the identification and model of the meeting. It additionally incorporates the knowledge required to resolve references to sorts and sources.
  • Type metadata-Binary data that describes a program.
  • Microsoft intermediate language(MSIL)code.
  • A set of sources

What Are The Different Types Of Assembly?

Assemblies can be personal or shared. A personal meeting is put in within the set up listing of an software and is accessible to that software solely. On the opposite hand, a shared meeting is shared by a number of functions. A shared meeting has a powerful title and is put in within the GAC.

We even have satellite tv for pc assemblies which might be usually used to deploy language-specific sources for an software.

What Is A Dynamic Assembly?

A dynamic meeting is created dynamically at run time when an software requires the categories inside these assemblies.

What Is A Strong Name?

You have to assign a powerful title to an meeting to position it within the GAC and make it globally accessible. A powerful title consists of a reputation that consists of an meeting’s identification (textual content title, model quantity, and tradition data), a public key and a digital signature generated over the meeting. The .NET Framework gives a device referred to as the Strong Name Tool (Sn.exe), which permits verification and key pair and signature technology.

What Is Gac? What Are The Steps To Create An Assembly And Add It To The Gac?

The world meeting cache (GAC) is a machine-wide code cache that shops assemblies particularly designated to be shared by a number of purposes on the pc. You ought to share assemblies by putting in them into the worldwide meeting cache solely when it is advisable.

Steps

Create a robust identify utilizing sn.exe instrument eg: sn -k mykey.snk

in AssemblyInfo.cs, add the robust identify eg: [assembly: AssemblyKeyFile(“mykey.snk”)]

recompile mission, after which set up it to GAC in two methods:

drag & drop it to meeting folder (C:\WINDOWS\meeting OR C:\WINNT\meeting) (shfusion.dll instrument)

gacutil -i abc.dll

What Is The Caspol.exe Tool Used For?

The caspol instrument grants and modifies permissions to code teams on the person coverage, machine coverage, and enterprise coverage ranges.

What Is A Garbage Collector?

A rubbish collector performs periodic checks on the managed heap to determine objects which can be now not required by this system and removes them from reminiscence.

What Are Generations And How Are They Used By The Garbage Collector?

Generations are the division of objects on the managed heap utilized by the rubbish collector. This mechanism permits the rubbish collector to carry out extremely optimized rubbish assortment. The unreachable objects are positioned in technology 0, the reachable objects are positioned in technology 1, and the objects that survive the gathering course of are promoted to greater generations

What Is Ilasm.exe Used For?

Ilasm.exe is a instrument that generates PE recordsdata from MSIL code. You can run the ensuing executable to find out whether or not the MSIL code performs as anticipated.

What Is Ildasm.exe Used For?

Ildasm.exe is a instrument that takes a PE file containing the MSIL code as a parameter and creates a textual content file that comprises managed code.

What Is The Resgen.exe Tool Used For?

ResGen.exe is a instrument that’s used to transform useful resource recordsdata within the type of .txt or .resx recordsdata to widespread language runtime binary .sources recordsdata that may be compiled into satellite tv for pc assemblies.

What Is Boxing And Unboxing?

==Boxing
Value sort to object sort. Allocates reminiscence on Heap.

==UnBoxing
Object sort to worth sort. Allocates reminiscence on Stack.

How Can We Make A Thread Sleep For Infinite Period ?

You may also place a thread into the sleep state for an indeterminate period of time by calling Thread.Sleep (System.Threading.Timeout.Infinite). To interrupt this sleep you possibly can name the Thread.Interrupt methodology

Dot Net Interview Questions And Answers For 8 Years Experience

In Which Format You Can Pass The Value In The Sleep Function?

In milliseconds

What’s Thread.sleep() In Threading ?

Thread’s execution might be paused by calling the Thread.Sleep methodology. This methodology takes an integer worth that determines how lengthy the thread ought to sleep. Example Thread.CurrentThread.Sleep(2000). it’ll paused for two second.

How Can You Reference Current Thread Of The Method ?

“Thread.CurrentThread” refers back to the present thread operating within the methodology.”CurrentThread” is a public static property.

What Does Addressof Operator Do In Background ?

The AddressOf operator creates a delegate object to the BackgroundProcess methodology. A delegate inside VB.NET is a type-safe, object-oriented perform pointer. After the thread has been instantiated, you start the execution of the code by calling the Start() methodology of the thread

Different Levels Of Priority Provided By .web.

  • ThreadPriority.Highest
  • ThreadPriority.AboveNormal
  • ThreadPriority.Normal
  • ThreadPriority.BelowNormal
  • ThreadPriority.Lowest

Is There Any Thread In Our .web Programs?

.NET program at all times has at the least two threads operating one is the primary program and second is the rubbish collector.

Namespace For The Thread Class?

All threading courses are outlined in System.Threading namespace

Can We Have Multiple Threads In One App Domain ?

One or extra threads run in an AppDomain. An AppDomain is a runtime illustration of a logical course of inside a bodily course of. Each AppDomain is began with a single thread, however can create further threads from any of its threads.

Did Vb6 Support Multi-threading ?

While VB6 helps a number of single-threaded residences, it doesn’t assist a freethreading mannequin, which permits a number of threads to run in opposition to the identical set of knowledge.

What Is A Thread ?

A thread is the fundamental unit to which the working system allocates processor time

What Is Multi-threading ?

Multi-threading varieties subset of Multi-tasking. Instead of getting to modify between applications this function switches between completely different components of the identical program. Example you’re writing in phrase and on the similar time phrase is doing a spell examine in background.

What Is Multi-tasking ?

It’s a function of contemporary working techniques with which we are able to run a number of applications at similar time instance Word, Excel and so forth.

What Is Equivalent For Regsvr32 Exe In .web ?

Regasm

How Do We Create Dcom Object In Vb6?

Using the CreateObject methodology you possibly can create a DCOM object. You need to put the server identify within the registry.

Can You Explain What Is Dcom ?

DCOM differs from COM in that it permits for creating objects distributed throughout a community, a protocol for invoking that object’s strategies, and secures entry to the item. DCOM supplies a wrapper round COM, therefore it’s a backwards suitable extension. DCOM makes use of Remote Procedural Calls (RPC) utilizing Open Software Foundation’s Distributed Computing Environment.

What Is Satellite Assembly? And Steps To Create Satellite Assembly?

When you write a multilingual or multi-cultural utility in .NET, and need to distribute the core utility individually from the localized modules, the localized assemblies that modify the core utility are referred to as satellite tv for pc assemblies.

Steps to Create Satellite Assembly

Set the paths for resgen and al.exe:

  • Create a .sources file.
  • Create the satellite tv for pc meeting.
  • The meeting ought to have the naming conference for .NET to have the ability to seek for it.
  • Specify the settings for tradition.
  • Put the satellite tv for pc meeting within the acceptable folder.
  • Once the satellite tv for pc meeting is created, bodily copy it to the suitable listing.
  • Repeat the method for every language during which you’re creating an meeting.

How To Exclude A Property From Xml Serialization?

[XmlIgnore]
(use attribute on the property)

Eg:

[XmlIgnore]
public string Name
{
..
}

What Is Garbage Collector ?

Garbage assortment consists of the next steps:

  • The rubbish collector searches for managed objects which can be referenced in managed code.
  • The rubbish collector makes an attempt to finalize objects that aren’t referenced.
  • The rubbish collector frees objects that aren’t referenced and reclaims their reminiscence.

What Is Difference Between Code Access And Role Based Security?

Code safety is the strategy of utilizing permissions and permission units for a given code to run. The admin, for instance, can disable operating executables off the Internet or prohibit entry to company database to solely few purposes.

Role safety more often than not includes the code operating with the privileges of the present person. This manner the code can’t supposedly do extra hurt than mess up a single person account.

Neither is healthier. It is dependent upon the character of the applying; each code-based and role-based safety might be carried out to an extent.

Dot Net Interview Questions And Answers For 5 Years Experience

What Is Cas?

The CAS safety coverage revolves round two key concepts-code teams and permissions. Each .NET meeting is a member of a specific code group, and every code group is granted the permissions laid out in a named permission set.

See CAS objects — Run ‘caspol -lg’ from command line.
Add CAS objects — caspol -ag 1.3
Change CAS obj — caspol -cg 1.3 FullBelief
Turn Off — caspol -s off

Can We Customize The Serialization Process?

Yes. XmlSerializer helps a spread of attributes that can be utilized to configure serialization for a specific class. For instance, a subject or property might be marked with the [XmlIgnore] attribute to exclude it from serialization. Another instance is the [XmlElement] attribute, which can be utilized to specify the XML aspect identify for use for a specific property or subject.

Serialization through SoapFormatter/BinaryFormatter may also be managed to some extent by attributes. For instance, the [NonSerialized] attribute is the equal of XmlSerializer’s [XmlIgnore] attribute. Ultimate management of the serialization course of might be acheived by implementing the the ISerializable interface on the category whose cases are to be serialized.

Types Of Serialization

  • Binary Serialization – preserves sort constancy, which is beneficial for preserving the state of an object between completely different invocations of an utility.
  • XML Serialization – serializes solely public properties and fields and doesn’t protect sort constancy. This is beneficial whenever you need to present or devour information with out proscribing the applying that makes use of the information.

What Is Serialization?

It is the method of storing the state of an object to a storage medium. During this course of, the private and non-private fields of the item and the identify of the category, together with the meeting containing the category, are transformed to a stream of bytes, which is then written to an information stream. When the item is subsequently de-serialized, a precise clone of the unique object is created.

  • Used to avoid wasting session state in ASP.NET.
  • Copy objects to the Clipboard in Windows Forms.
  • Remoting to cross objects by worth from one utility area to a different.

What Is Namespace?

It is a logical naming scheme for varieties during which a easy sort identify, equivalent to MyType, is preceded with a dot-separated hierarchical identify. Such a naming scheme is totally underneath management of the developer. This idea just isn’t associated to that of an meeting.

What Is Gac? How To Put Assembly In Gac?

The world meeting cache shops assemblies particularly designated to be shared by a number of purposes on the pc. You ought to share assemblies by putting in them into the worldwide meeting cache solely when it is advisable. Assemblies deployed within the world meeting cache will need to have a robust identify. When an meeting is added to the worldwide meeting cache, integrity checks are carried out on all recordsdata that make up the meeting. The cache performs these integrity checks to make sure that an meeting has not been tampered with, for instance, when a file has modified however the manifest doesn’t replicate the change. Use a developer instrument referred to as the Global Assembly Cache instrument (Gacutil.exe), offered by the .NET Framework SDK or Use Windows Explorer to pull assemblies into the cache. To set up a strong-named meeting into the worldwide meeting cache At the command immediate, sort the next command: gacutil I In this command, meeting identify is the identify of the meeting to put in within the world meeting cache.

What Is An Assembly Loader?

  • Checks if the meeting is Strongly signed.
  • If sure it’ll search within the GAC
  • Loader will search the coverage file identify within the format of Policy. Assembly Major Version .Assembly Minor Version .Assembly Name

Eg. MyPolicy.1.2.Assembly1

If such a file exists it’ll look within it if the model of the meeting that we try to load matches the model/variations vary written within the coverage file. If it does, it’ll attempt to load the meeting with the model specified there. If no such coverage file exists, it’ll attempt to load the meeting from the GAC.

  • If it’ll fail to search out it within the GAC, it’ll begin to search within the system’s search path.
  • In internet purposes it’ll additionally embrace the applying’s Bin listing within the search path.

What Is An Assembly Qualified Name

An meeting certified identify is not the filename of the meeting; it is the interior identify of the meeting mixed with the meeting model, tradition, and public key, thus making it distinctive.

Example:

(“”System .Xml .Xml Document, System .Xml, Version =1.0.3300.0, Culture =impartial, PublicKey Token = b77 a5c561934 e089″”)

What Is Partial Assembly Reference

We can dynamically reference an meeting by offering solely partial data, equivalent to specifying solely the meeting identify. When you specify a partial meeting reference, the runtime appears for the meeting solely within the utility listing.

We could make partial references to an meeting in your code one of many following methods:

  • Use a way equivalent to System.Reflection.Assembly.Load and specify solely a partial reference. The runtime checks for the meeting within the utility listing.
  • Use the System.Reflection.Assembly.LoadWithPartialName methodology and specify solely a partial reference. The runtime checks for the meeting within the utility listing and within the world meeting cache.

What Is Full Assembly Reference

A full meeting reference contains the meeting’s textual content identify, model, tradition, and public key token (if the meeting has a robust identify). A full meeting reference is required when you reference any meeting that’s a part of the widespread language runtime or any meeting positioned within the world meeting cache.

What Are The Contents Of An Assembly ?

Type metadata.

  • The meeting manifest, which comprises meeting metadata.
  • Microsoft intermediate language (MSIL) code that implements the kinds.
  • A set of sources.

What Are The Types Of Assembly Available

  • Private: The meeting is meant just for one utility
  • Shared: If the meeting is to be made right into a Shared Assembly
  • Static: These are the .NET PE recordsdata that you simply create at compile time.
  • Dynamic: These are PE-formatted, in-memory assemblies

What Are Attributes?

Attributes are declarative tags in code that insert further metadata into an meeting. There exist two forms of attributes within the .NET Framework: Predefined attributes equivalent to Assembly Version, which exist already and are accessed by means of the Runtime Classes; and customized attributes, which you write your self by extending the System.Attribute class.

Example: Custom Attribute for complete meeting

  • utilizing System.
  • [assembly : MyAttributeClass] class X {}

What Is Manifest?

An meeting manifest comprises all of the metadata wanted to specify the meeting’s model necessities and safety id, and all metadata wanted to outline the scope of the meeting and resolve references to sources and courses. The meeting manifest might be saved in both a PE (Portable Executable) file (an .exe or .dll) with Microsoft intermediate language (MSIL) code or in a standalone PE (Portable Executable) file that comprises solely meeting manifest data.

What Is Jit Compiler

It is a compiler which converts MS IL code to Native Code (ie.. CPU-specific code that runs on the identical pc structure). Just-In-Time compiler- it converts the language that you simply write in .Net into machine language that a pc can perceive.

What Debugging Tools Come With The .web Sdk?

  • CorDBG – command-line debugger. To use CorDbg, you need to compile the unique C# file utilizing the /debug change.
  • DbgCLR – graphic debugger. Visual Studio .NET makes use of the DbgCLR.

What’s The .web Collection Class That Allows An Element To Be Accessed Using A Unique Key?

HashTable.

What Is Cls

It is the gathering of the foundations and constraints that each language (that seeks to realize .NET compatibility) should observe. It is a subsection of CTS and it specifies the way it shares and extends each other libraries.

What Is Clr

It is the runtime that converts a MSIL code into the host machine language code, which is then executed appropriately. It is the execution engine for .NET Frameworkapplications. It supplies a variety of providers, together with:

  • Code administration (loading and execution)
  • Application reminiscence isolation
  • Verification of sort security
  • Conversion of IL to native code.
  • Access to metadata (enhanced sort data)
  • Managing reminiscence for managed objects
  • Enforcement of code entry safety
  • Exception dealing with, together with cross-language exceptions
  • Interoperation between managed code, COM objects, and pre-existing DLL’s (unmanaged code and information)
  • Automation of object format
  • Support for developer providers (profiling, debugging, and so forth}.

What Is Dependency Injection?

It is the mechanism by means of with dynamic capabilities are added within the runtime. Most of the time it might be by means of proxy courses.

Some frameworks on this regard are:
Spring.Net, NInject, Enterprise Library Policy Injection and so forth.

Can You Describe Iuknown Interface In Short?

Every COM object helps at the least one interface, the IUnknown interface.

All interfaces are courses derived from the bottom class IUnknown. Each interface helps strategies entry information and carry out operations transparently to the programmer.

For instance, IUnknown helps three strategies, AddRef, Release(), and QuestionInterface().
Suppose that pinterf is a pointer to an IUnknown.

pinterf->AddRef() increments the reference depend. pinterf->Release() decrements the reference depend, deleting the item when the reference depend reaches zero.

pinterf->QuestionInterface( IDesired,pDesired) checks to see if the present interface (IUnknown) helps one other interface, IDesired, creates an occasion (through a name to CoCreateInstance()) of the item if the reference depend is zero (the item doesn’t but exist), after which calls pDesired->AddRef() to increment the reference depend(the place pDesired is a pointer to IDesired) and returns the pointer to the caller.

Dot Net Interview Questions And Answers For 3 Years Experience

What Is Reference Counting In Com?

Reference counting is a reminiscence administration approach used to depend what number of occasions an object has a pointer referring to it. The first time it’s created, the reference depend is ready to at least one. When the final reference to the item is nulled, the reference depend is ready to zero and the item is deleted.

Care have to be exercised to stop a context change from altering the reference depend on the time of deletion. In the strategies that observe, the syntax is shortened to maintain the scope of the dialogue transient and manageable.

What Is Com?

Microsoft’s COM is a expertise for part software program improvement. It is a binary commonplace which is language unbiased. DCOM is a distributed extension of COM.

When We Use Windows Api In .web Is It Managed Or Unmanaged Code?

Windows API in .NET is unmanaged code

Once I Have Developed The Com Wrapper Do I Have To Still Register The Com In Registry?

Yes

In Which Order The Destructor Is Called For An Inherited Class?

Child class destructor is known as first

In Which Order The Constructor Is Called For An Inherited Class?

Constructor of Parent class is known as

  • Then,
  • Constructor of Child class

What Are Value Types And Reference Types ?

Value varieties immediately comprise their information that are both allotted on the stack or allotted in-line in a construction.

Reference varieties retailer a reference to the worth’s reminiscence tackle, and are allotted on the heap.
Reference varieties might be self-describing varieties, pointer varieties, or interface varieties.

Variables which can be worth varieties every have their very own copy of the information, and subsequently operations on one variable don’t have an effect on different variables. Variables which can be reference varieties can seek advice from the identical object; subsequently, operations on one variable can have an effect on the identical object referred to by one other variable. All varieties derive from the System.Object base sort.

What Is The Difference Between Viewstate And Sessionstate?

ViewState persist the values of controls of explicit web page within the shopper (browser) when post again operation carried out. When person requests one other web page earlier web page information now not out there.

SessionState persist the information of explicit person within the server. This information out there until person shut the browser or session time completes.

ViewState Relate to Controls, it means when Client ship request within the type of Controls’ worth to server,In case any validation drawback regarding Clients information then all the information just isn’t cleaned because it was happen is asp,it could restore the prevailing information within the type of hidden management and render information by server to respective controls,because of this person is not going to enter the entire data once more, the place as SessionState pertains to particular person person,it manages the person associated data and preserve the session between shopper ans server.

Difference Between Machine.config And Web.config?

Machine.config->Configuration file for all of the purposes within the system.
Web.config->Config file for single utility.

How Is .web Able To Support Multiple Languages?

a language ought to adjust to the Common Language Runtime commonplace to change into a .NET language. In .NET, code is compiled to Microsoft Intermediate Language (MSIL for brief). This is known as as Managed Code. This Managed code is run in .NET atmosphere. So after compilation to this IL the language just isn’t a barrier. A code can name or use a perform written in one other language.

What Is View State?

The internet is stateless. But in ASP.NET, the state of a web page is maintained within the web page itself robotically. The values are encrypted and saved in hidden controls. that is performed robotically by the ASP.NET. This may be switched off / on for a single management.

Can The Validation Be Done In The Server Side? Or This Can Be Done Only In The Client Side?

Client aspect is completed by default. Server aspect validation can also be potential. We can change off the shopper aspect and server aspect may be performed.

How To Manage Pagination In A Page?

Using pagination choice in DataGrid management. We need to set the variety of data for a web page, then it takes care of pagination by itself.

What Is Ado .web And What Is Difference Between Ado And Ado.web?

ADO.NET is stateless mechanism. I can deal with the ADO.Net as a separate in-memory database the place in I can use relationships between the tables and choose insert and updates to the database. I can replace the precise database as a batch.

How To Get The Sum Of Last 3 Items In A List Using Lambda Expressions?

Use
int sum = record.Reverse().Take(3).Sum();

You Have Got 1 Million Parking Slots. At A Time A Parking Slot Can Be Free Or Not. To Get Next Slot Easily Which Data Structure To Implement?

  • Use Stack.
  • If you employ Stack, we are able to simply get the following slot through the use of stack.Pop()
  • If you employ List, we’ve got to iterate via all record and test the standing and retrieve. So stack could be advantageous.

Why Can’t Struct Be Used Instead Of Class For Storing Entity?

Struct is of worth sort. If we cross it throughout strategies in layers, a brand new object can be created within the stack thus growing reminiscence and processing requirement.

So class ought to be used for creating entity like Employee, Supplier and so forth.

What Is Assembly Version Series Sequence?

main.minor.construct.revision

What Tool We Have To Use To Install Assembli In Gac Folder.

we are able to use GACUTIL Tool to intall assemby in GAC folder

How We Can See Assembly Information?

We can see the meeting info utilizing ILDASM Tool.

What Is Private And Shared Assembly?

The meeting which is used solely by a single utility is known as as personal meeting. Thus the meeting is personal to your utility.Suppose that you’re making a common objective DLL which gives performance which can be utilized by number of functions. Now, as an alternative of every shopper utility having its personal copy of DLL you’ll be able to place the DLL in ‘world meeting cache’. Such assemblies are known as as shared assemblies.

What Is Type Safety?

Type protected code can entry solely the reminiscence places that it has permission to execute. Type protected code can by no means entry any personal members of an object. Type protected code ensures that objects are remoted from one another.

What Is The Difference Between Datareader And Dataadapter?

  • Data Reader is learn solely ahead solely and far quicker than DataAdapter.
  • If you employ DataReader you need to open and shut connection explicitly the place as in case you use DataAdapter the connection is robotically opened and closed.
  • DataReader is connection oriented the place as Data Adapter is disconnected.

What Is Func In .web 3.5?

Func is a delegate in .Net that returns a price.

The return sort is specified utilizing the TResult argument.

There are 5 variations of Func in .Net.

  • Func<TResult>
  • Func<T,TResult>
  • Func<T1,T2,TResult>
  • Func<T1,T2,T3,TResult>
  • Func<T1,T2,T3,T4,TResult>

What Is Action In C# 3.5?

Action is a built-in delegate which returns void.

There are 5 variations of Action

  • Action Action<T>
  • Action<T1,T2>
  • Action<T1,T2,T3>
  • Action<T1,T2,T3,T4>

What Is The Advantage Of Mvc?

More Manageability, Multiple View Support, More unit testing compatibility.

Advantages Of Vb.web And C#

Advantages VB.NET:

  • Has assist for elective parameters which makes COM interoperability a lot straightforward.
  • With Option Strict off late binding is supported.Legacy VB functionalities can be utilized through the use of Microsoft.VisualBasic namespace.
  • Has the WITH assemble which isn’t in C#.
  • The VB.NET a part of Visual Studio .NET compiles your code within the background.

While that is thought-about a bonus for small tasks, folks creating very giant tasks have discovered that the IDE slows down significantly because the undertaking will get bigger.

Advantages of C#

  • XML documentation is generated from supply code however that is now been included in Whidbey.
  • Operator overloading which isn’t in present VB.NET however is been launched in Whidbey.
  • The utilizing assertion, which makes unmanaged useful resource disposal easy.
  • Access to Unsafe code. This permits pointer arithmetic and so forth, and may enhance efficiency in some conditions. However, it’s not for use evenly, as loads of the traditional security of C# is misplaced (because the identify implies).This is the main distinction you can entry unmanaged code in C# and never in VB.NET

What Is Garbage Collection?

Garbage assortment is a CLR characteristic which robotically manages reminiscence. Programmers overlook to launch the objects whereas coding. CLR robotically releases objects when they’re not referenced and in use. CLR runs on non-deterministic to see the unused objects and cleans them. One aspect impact of this non-deterministic characteristic is that we can’t assume an object is destroyed when it goes out of the scope of a perform. Therefore, we must always not put code into a category destructor to launch sources.

Dot Net Interview Questions And Answers For 10 Years Experience

How Many Types Of Stored Procedures Are There In Sql Server?

User Defined Stored Procedures.

  • Transact-SQL saved process
  • CLR Stored Procedure.

System Stored Procedures

What Is The Purpose Of Linked Server Configuration In Sql Server?

It enabled us to question distant database servers of various suppliers.

Thus we are able to copy or choose desk knowledge between a number of servers.

What Is Difference Between Tostring() Vs Convert.tostring() Vs (string) Cast

There is a straightforward however vital distinction between these three.

ToString() elevate exception when the item is null

So within the case of object.ToString(), if object is null, it elevate NullReferenceException.

Convert.ToString() return string.Empty in case of null object

(string) solid assign the item in case of null

So in case of
MyObject o = (string)NullObject;

But if you use o to entry any property, it should elevate NullReferenceException.

In How Many Ways You Can Invoke Ssrs Reports?

you’ll be able to invoke it in Three methods.

  • Using rs script and command Prompt
  • From internet browser.
  • Using SOAP API

What Is A Static Constructor?

A Static Constructor of a category will get initialised and invoked when the meeting hundreds itself.

Why Do I Get Errors When I Try To Serialize A Hashtable?

XmlSerializer will refuse to serialize situations of any class that implements IDictionary, e.g. Hashtable. SoapFormatter and BinaryFormatter would not have this restriction.

Why Is Xmlserializer So Slow?

There is a once-per-process-per-type overhead with XmlSerializer. So the primary time you serialize or deserialize an object of a given sort in an utility, there’s a important delay. This usually would not matter, however it might imply, for instance, that XmlSerializer is a poor selection for loading configuration settings throughout startup of a GUI utility.

Can I Customise The Serialization Process?

Yes. XmlSerializer helps a spread of attributes that can be utilized to configure serialization for a selected class. For instance, a subject or property may be marked with the [XmlIgnore] attribute to exclude it from serialization. Another instance is the [XmlElement] attribute, which can be utilized to specify the XML ingredient identify for use for a selected property or subject. Serialization by way of SoapFormatter/BinaryFormatter can be managed to some extent by attributes. For instance, the [NonSerialized] attribute is the equal of XmlSerializer’s [XmlIgnore] attribute. Ultimate management of the serialization course of may be acheived by implementing the the ISerializable interface on the category whose situations are to be serialized.

Does The .web Framework Have In-built Support For Serialization?

There are two separate mechanisms supplied by the .NET class library-XmlSerializer and
SoapFormatter/BinaryFormatter. Microsoft makes use of XmlSerializer for Web Services, and makes use of
SoapFormatter/BinaryFormatter for remoting. Both can be found to be used in your personal code

Is The Lack Of Deterministic Destruction In .web A Problem?

It’s actually a difficulty that impacts part design. If you’ve gotten objects that preserve costly or scarce sources (e.g. database locks), you have to present a way for the shopper to inform the item to launch the useful resource when it’s performed. Microsoft advocate that you simply present a technique known as Dispose() for this objective. However, this causes issues for distributed objects – in a distributed system who calls the Dispose() technique? Some type of reference-counting or ownership-management mechanism is required to deal with distributed objects – sadly the runtime provides no assist with this

Why Doesn’t The .web Runtime Offer Deterministic Destruction?

Because of the rubbish assortment algorithm. The .NET rubbish collector works by periodically working via a listing of all of the objects which can be at the moment being referenced by an utility. All the objects that it would not discover throughout this search are able to be destroyed and the reminiscence reclaimed. The implication of this algorithm is that the runtime would not get notified instantly when the ultimate reference on an object goes away – it solely finds out through the subsequent sweep of the heap.

Futhermore, the sort of algorithm works greatest by performing the rubbish assortment sweep as not often as potential. Normally heap exhaustion is the set off for a group sweep.

How Does Assembly Versioning Work?

Each meeting has a model quantity known as the compatibility model. Also every reference to an meeting (from one other meeting) contains each the identify and model of the referenced meeting.The model quantity has 4 numeric elements (e.g. 5.5.2.33). Assemblies with both of the primary two elements completely different are usually considered as incompatible. If the primary two elements are the identical, however the third is completely different, the assemblies are deemed as ‘possibly suitable’. If solely the fourth half is completely different, the assemblies are deemed suitable. However, that is simply the default guideline – it’s the model coverage that decides to what extent these guidelines are enforced. The model coverage may be specified by way of the applying configuration

How Do Assemblies Find Each Other?

By looking listing paths. There are a number of components which might have an effect on the trail (such because the AppDomain host, and utility configuration information), however for personal assemblies the search path is generally the applying’s listing and its sub-directories. For shared assemblies, the search path is generally identical because the personal meeting path plus the shared meeting cache.

Where Is The Output Of Textwritertracelistener Redirected?

To the Console or a textual content file relying on the parameter handed to the constructor.

Why Are There Five Tracing Levels In System.diagnostics.traceswitcher?

The tracing dumps may be fairly verbose. For functions which can be continually working you run the danger of overloading the machine and the onerous drive. Five ranges vary from None to Verbose, permitting you to fine-tune the tracing actions.

What’s The Difference Between The Debug Class And Trace Class?

Documentation appears the identical. Use Debug class for debug builds, use Trace class for each debug and launch builds.

What Does Assert() Method Do?

In debug compilation, assert takes in a Boolean situation as a parameter, and exhibits the error dialog if the situation is fake. The program proceeds with none interruption if the situation is true.

Why String Are Called Immutable Data Type ?

The reminiscence illustration of string is an Array of Characters, So on re-assigning the brand new array of Char is shaped & the beginning handle is modified . Thus retaining the Old string in Memory for Garbage Collector to be disposed.

What Is Side-by-side Execution? Can Two Application One Using Private Assembly And Other Using Shared Assembly Be Stated As A Side-by-side Executables?

Side-by-side execution is the power to run a number of variations of an utility or part on the identical pc. You can have a number of variations of the widespread language runtime, and a number of variations of functions and parts that use a model of the runtime, on the identical pc on the identical time. Since versioning is just utilized to shared assemblies, and to not personal assemblies, two utility one utilizing personal meeting and one utilizing shared meeting can’t be said as side-by-side executables,

Changes To Which Portion Of Version Number Indicates An Incompatible Change?

Major or minor. Changes to the main or minor portion of the model quantity point out an incompatible change. Under this conference then, model 2.0.0.Zero could be thought-about incompatible with model 1.0.0.0. Examples of an incompatible change could be a change to the sorts of some technique parameters or the removing of a kind or technique altogether. Build. The Build quantity is often used to differentiate between every day builds or smaller suitable releases. Revision. Changes to the revision quantity are usually reserved for an incremental construct wanted to repair a selected bug. You’ll generally hear this known as the “emergency bug fix” quantity in that the revision is what is usually modified when a repair to a particular bug is shipped to a buyer.

What Is Partial Assembly References?

Full Assembly reference: A full meeting reference contains the meeting’s textual content identify, model, tradition, and public key token (if the meeting has a robust identify). A full meeting reference is required in case you reference any meeting that’s a part of the widespread language runtime or any meeting positioned within the world meeting cache.

Partial Assembly reference: We can dynamically reference an meeting by offering solely partial info, akin to specifying solely the meeting identify. When you specify a partial meeting reference, the runtime appears for the meeting solely within the utility listing.

We could make partial references to an meeting in your code one of many following methods:

  • Use a technique akin to System.Reflection.Assembly.Load and specify solely a partial reference. The runtime checks for the meeting within the utility listing.
  • Use the System.Reflection.Assembly.LoadWithPartialName technique and specify solely a partial reference. The runtime checks for the meeting within the utility listing and within the world meeting cache.

What Is The Difference Between Finalize And Dispose (rubbish Collection) ?

Class situations usually encapsulate management over sources that aren’t managed by the runtime, akin to window handles (HWND), database connections, and so forth. Therefore, you need to present each an express and an implicit option to free these sources. Provide implicit management by implementing the protected Finalize Method on an object (destructor syntax in C# and the Managed Extensions for C++). The rubbish collector calls this technique sooner or later after there are not any legitimate references to the item. In some instances, you would possibly wish to present programmers utilizing an object with the power to explicitly launch these exterior sources earlier than the rubbish collector frees the item. If an exterior useful resource is scarce or costly, higher efficiency may be achieved if the programmer explicitly releases sources when they’re not getting used. To present express management, implement the Dispose technique supplied by the IDisposable Interface. The shopper of the item ought to name this technique when it’s performed utilizing the item.

Dispose may be known as even when different references to the item are alive. Note that even if you present express management by means of Dispose, you need to present implicit cleanup utilizing the Finalize technique. Finalize gives a backup to stop sources from completely leaking if the programmer fails to name Dispose.

Dot Net Interview Questions And Answers For 4 Years Experience

What Is Reflection?

All .NET compilers produce metadata in regards to the varieties outlined within the modules they produce. This metadata is packaged together with the module (modules in flip are packaged collectively in assemblies), and may be accessed by a mechanism known as reflection. The System.Reflection namespace comprises courses that can be utilized to interrogate the categories for a module/meeting.

Using reflection to entry .NET metadata is similar to utilizing ITypeLib/ITypeInfo to entry sort library knowledge in COM, and it’s used for comparable functions – e.g. figuring out knowledge sort sizes for marshaling knowledge throughout context/course of/machine boundaries. Reflection can be used to dynamically invoke strategies (see System.Type.Invoke Member), and even create varieties dynamically at run-time. (see System. Reflection. Emit.Type Builder).

What Does ‘managed’ Mean In The .web Context?

The time period ‘managed’ is the reason for a lot confusion. It is utilized in numerous locations inside .NET, that means barely various things.Managed code: The .NET framework gives a number of core run-time companies to the packages that run inside it – for instance exception dealing with and safety.

For these companies to work, the code should present a minimal degree of data to the runtime.
Such code is known as managed code. All C# and Visual Basic.NET code is managed by default. VS7 C++ code is just not managed by default, however the compiler can produce managed code by specifying a command-line change (/com+).

Managed knowledge: This is knowledge that’s allotted and de-allocated by the .NET runtime’s rubbish collector. C# and VB.NET knowledge is all the time managed. VS7 C++ knowledge is unmanaged by default, even when utilizing the /com+ change, however it may be marked as managed utilizing the __gc key phrase.Managed courses: This is normally referred to within the context of Managed Extensions (ME) for C++. When utilizing ME C++, a category may be marked with the __gc key phrase. As the identify suggests, because of this the reminiscence for situations of the category is managed by the rubbish collector, however it additionally means greater than that. The class turns into a completely paid-up member of the .NET group with the advantages and restrictions that brings. An instance of a profit is correct interop with courses written in different languages – for instance, a managed C++ class can inherit from a VB class. An instance of a restriction is {that a} managed class can solely inherit from one base class.

What Platforms Does The .web Framework Run On?

The runtime helps Windows XP, Windows 2000, NT4 SP6a and Windows ME/98. Windows 95 is just not supported. Some elements of the framework don’t work on all platforms – for instance, ASP.NET is just supported on Windows XP and Windows 2000. Windows 98/ME can’t be used for improvement.

IIS is just not supported on Windows XP Home Edition, and so can’t be used to host ASP.NET. However, the ASP.NET Web Matrix internet server does run on XP Home.

The Mono undertaking is trying to implement the .NET framework on Linux.

When Was The First Version Of .web Released?

The remaining model of the 1.Zero SDK and runtime was made publicly obtainable round 6pm PST on 15-Jan-2002. At the identical time, the ultimate model of Visual Studio.NET was made obtainable to MSDN subscribers.

When Was .web Announced?

Bill Gates delivered a keynote at Forum 2000, held June 22, 2000, outlining the .NET ‘imaginative and prescient’. The July 2000 PDC had various classes on .NET know-how, and delegates got CDs containing a pre-release model of the .NET framework/SDK and Visual Studio.NET.

What Is .web Remoting?

Netremoting replaces DCOM. Web Services that makes use of remoting can run in anyApplication sort i.e. Console Application, Windows Form Applications,Window Services and so forth. In CLR Object Remoting we are able to name objectsacross community.

How Do You Generate A Strong Name?

.NET gives an utility known as sturdy identify instrument. You can run this toolfrom the VS.NET command immediate to generate a robust identify with an choice “-k” and offering the sturdy key file identify. i.e. sn- -k < file-name >

What Is The Gac? What Problem Does It Solve?

Each pc the place the widespread language runtime is put in has a machine-wide code cache known as the worldwide meeting cache. The world meeting cache shops assemblies which can be to be shared by a number of functions on the pc. This space is often the folder underneath home windows or winnt within the machine.

All the assemblies that must be shared throughout functions must be performed via the Global meeting Cache solely. However it’s not vital to put in assemblies into the worldwide meeting cache to make them accessible to COM interop or unmanaged code.

There are a number of methods to deploy an meeting into the worldwide meeting cache:

  • Use an installer designed to work with the worldwide meeting cache. This is the popular choice for putting in assemblies into the worldwide meeting cache.
  • Use a developer instrument known as the Global Assembly Cache instrument (Gacutil.exe), supplied by the .NET Framework SDK.
  • Use Windows Explorer to pull assemblies into the cache.

GAC solves the issue of DLL Hell and DLL versioning. Unlike earlier conditions, GAC can maintain two assemblies of the identical identify however completely different model. This ensures that the functions which entry a selected meeting proceed to entry the identical meeting even when one other model of that meeting is put in on that machine.

What Is Strong-typing Versus Weak-typing? Which Is Preferred? Why?

Strong typing implies that the sorts of variables concerned in operations are related to the variable, checked at compile-time, and require express conversion; weak typing implies that they’re related to the worth, checked at run-time, and are implicitly transformed as required. (Which is most popular is a disputable level, however I personally desire sturdy typing as a result of I like my errors to be discovered as quickly as potential.)

What Is The Difference Between An Exe And A Dll?

  • You can create an objects of Dll however not of the EXE.
  • Dll is an In-Process Component whereas EXE is an OUt-Process Component.
  • Exe is for single use whereas you should utilize Dll for a number of use.
  • Exe may be began as standalone the place dll can’t be.

Describe The Advantages Of Writing A Managed Code Application Instead Of Unmanaged One. What’s Involved In Certain Piece Of Code Being Managed?

“Advantage includes automatic garbage collection,memory management,security,type checking,versioning Managed code is compiled for the .NET run-time environment. It runs in the Common Language Runtime (CLR), which is the heart of the .NET Framework. The CLR provides services such as security,memory management, and cross-language integration. Managed applications written to take advantage of the features of the CLR perform more efficiently and safely, and take better advantage of developers existing expertise in languages that support the .NET Framework.

Unmanaged code includes all code written before the .NET Framework was introduced-this includes code written to use COM, native Win32, and Visual Basic 6. Because it does not run inside the .NET environment, unmanaged code cannot make use of any .NET managed facilities.”

What Is Public Or Shared Assemblies ?

These are static assemblies that should have a singular shared identify and can be utilized by any utility.

An utility makes use of a personal meeting by referring to the meeting utilizing a static path or via an XML-based utility configuration file. While the CLR would not implement versioning policies-checking whether or not the right model is used-for personal assemblies, it ensures that an utility makes use of the right shared assemblies with which the applying was constructed. Thus, an utility makes use of a particular shared meeting by referring to the particular shared meeting, and the CLR ensures that the right model is loaded at runtime.

Dot Net Interview Questions And Answers For 2 Years Experience

What Is Metadata?

Metadata is machine-readable details about a useful resource, or “”knowledge about knowledge.”” Such info would possibly embrace particulars on content, format, dimension, or different traits of a knowledge supply. In .NET, metadata contains sort definitions, model info, exterior meeting references, and different standardized info.

What Are The Mobile Devices Supported By .web Platform

The Microsoft .NET Compact Framework is designed to run on cellular gadgets akin to cellphones, Personal Digital Assistants (PDAs), and embedded gadgets. The best option to develop and take a look at a Smart Device Application is to make use of an emulator.

These gadgets are divided into two important divisions:

  • Those which can be immediately supported by .NET (Pocket PCs, i-Mode telephones, and WAP gadgets).
  • Those that aren’t (Palm OS and J2ME-powered gadgets).

Can You Declare The Override Method Static While The Original Method Is Non-static?

No, you’ll be able to’t, the signature of the digital technique should stay the identical, solely the key phrase digital is modified to key phrase override.

What Is Boxing And Unboxing ?

Boxing:
The conversion of a price sort occasion to an object, which means that the occasion will carry full sort info at run time and can be allotted within the heap. The Microsoft intermediate language (MSIL) instruction set’s field instruction converts a price sort to an object by making a duplicate of the worth sort and embedding it in a newly allotted object.

Un-Boxing:
The conversion of an object occasion to a price sort.

What Is Msil, Il, Cts And, Clr ?

MSIL: (Microsoft intermediate language):

When compiling to managed code, the compiler interprets your supply code into Microsoft intermediate language (MSIL), which is a CPU-independent set of directions that may be effectively transformed to native code. MSIL contains directions for loading, storing, initializing, and calling strategies on objects, in addition to directions for arithmetic and logical operations, management stream, direct reminiscence entry, exception dealing with, and different operations. Before code may be executed, MSIL have to be transformed to CPU-specific code, normally by a just-in-time (JIT) compiler. Because the widespread language runtime provides a number of JIT compilers for every pc structure it helps, the identical set of MSIL may be JIT-compiled and executed on any supported structure.

When a compiler produces MSIL, it additionally produces metadata. Metadata describes the categories in your code, together with the definition of every sort, the signatures of every sort’s members, the members that your code references, and different knowledge that the runtime makes use of at execution time. The MSIL and metadata are contained in a transportable executable (PE) file that’s primarily based on and extends the revealed Microsoft PE and Common Object File Format (COFF) used traditionally for executable content. This file format, which accommodates

MSIL or native code in addition to metadata, permits the working system to acknowledge widespread language runtime pictures. The presence of metadata within the file together with the MSIL permits your code to explain itself, which signifies that there is no such thing as a want for sort libraries or Interface Definition Language (IDL). The runtime locates and extracts the metadata from the file as wanted throughout execution.

IL: (Intermediate Language):
A language used because the output of various compilers and because the enter to a just-in-time (JIT) compiler. The widespread language runtime features a JIT compiler for changing MSIL to native code.

CTS: (Common Type System):
The specification that determines how the widespread language runtime defines, makes use of, and manages varieties

CLR: (Common Language Runtime):
The engine on the core of managed code execution. The runtime provides managed code with companies akin to cross-language integration, code entry safety, object lifetime administration, and debugging and profiling assist.

What Is Gc (rubbish Collection) And How It Works

One of the great options of the CLR is Garbage Collection, which runs within the background accumulating unused object references, releasing us from having to make sure we all the time destroy them. In actuality the time distinction between you releasing the item occasion and it being rubbish collected is more likely to be very small, for the reason that GC is all the time working.
[The process of transitively tracing through all pointers to actively used objects in order to locate all objects that can be referenced, and then arranging to reuse any heap memory that was not found during this trace. The common language runtime garbage collector also compacts the memory that is in use to reduce the working space needed for the heap.]

Heap:
A portion of reminiscence reserved for a program to make use of for the non permanent storage of knowledge buildings whose existence or dimension can’t be decided till this system is working.

How Do I Unload An Application Domain?

You ought to use the next static technique within the System.AppDomain

class:
public static void Unload(AppDomain area)

The Unload technique gracefully shuts down the required utility area. During shutdown no new threads are allowed to enter the applying area and all utility area particular knowledge buildings are freed. You can’t unload an utility area in a finalizer or destructor.

If the applying area has run code from a domain-neutral meeting, the domains copy of the statics and associated CLR knowledge buildings are freed, however the code for the domain-neutral meeting stays till the method is shutdown. There is not any mechanism to totally unload a domain-neutral meeting apart from shutting down the method.

How Do I Unload An Assembly?

CLR doesn’t present a option to unload an meeting. The solely mechanism to take away the meeting is to unload the applying area wherein the meeting is loaded. If you want to take away an meeting after it has been used, you need to create an utility area, load the meeting into the created utility area, after which unload the applying area if you not want the meeting.

How Do I Run Managed Code In A Process?

The first step in working managed code in a course of is to get the CLR loaded and initialized utilizing a CLR host. Typically, a bunch consists of each managed code and unmanaged code. The managed code which executes within the default area is normally answerable for creating the applying domains wherein the person code exists. All CLR hosts should comprise unmanaged code as a result of execution should start in unmanaged code. The .NET Frameworks gives a set of unmanaged APIs that the host can use to configure the CLR, load the CLR right into a course of, load the hosts managed code into the default area, and transition from the unmanaged code to the managed code. The second step in working managed code in a course of is to create utility domains wherein the person code will execute. The creator of the applying area can specify standards which management code isolation, safety, and loading of assemblies. The third step in working managed code in a course of is to execute person code in a number of utility domains created within the earlier step. All code that’s run within the CLR have to be a part of an meeting. There are three choices for loading assemblies. First, precompiled assemblies may be loaded from disk. Second, precompiled assemblies may be loaded from an array of bytes. Third, assemblies may be constructed dynamically in an utility area utilizing the BCL Reflection Emit APIs.

Note. For an utility launched from the command-line, the shell host executes the steps described above on behalf of the person and hides the complexity from the person.

What Is The Difference Between An Application Domain And A Process?

An utility area is lighter than a course of. Application domains are acceptable for situations that require isolation with out the heavy price related to working an utility inside a course of. A course of runs precisely one utility. In distinction, the CLR permits a number of functions to be run in a single course of by loading them into separate utility domains. Additionally, the CLR verifies that person code in an utility area is sort protected.

Dot Net Interview Questions And Answers For Freshers

What Is A Clr Host?

The Windows working system doesn’t present assist for working a CLR utility. That assist is supplied by a CLR host. A CLR host is an utility that’s answerable for loading the CLR right into a course of, creating utility domains inside the course of, and executing person code inside the utility domains. Examples of hosts that ship with the .NET Framework embrace:

ASP.NET. An ISAPI filter that ships with ASP.NET hundreds the CLR and does the initialization essential to deal with internet requests.

Internet Explorer. A MIME filter hooks into Internet Explorer variations 5.01 and better to execute managed controls referenced from HTML pages.

Shell Executables. When a managed utility is launched from a shell, a small piece of unmanaged code hundreds the CLR and transitions management of the applying to the CLR.

Can We Maintain State In Webservice?

Yes. Webservice have no mechanism.So, It can preserve state. By default, webservice class is derived for state upkeep.

Difference Between Authentication And Authorization?

Authentication is a strategy of figuring out a person primarily based on their credentials(means person id and password).

Authorization is strategy of figuring out whether or not an authenticated person is allowed to entry a particular useful resource or not.

What Is The Purpose Of Enumerable Class In .web?

It comprises numerous extension strategies like Where(), OrderBy() and so forth. for the IList courses.

Inorder to get entry for these strategies, merely we’ve got to incorporate the System.Linq namespace.

In The Page Load Event I Assigned Dropdownlist’s Datasource Property To A Valid List. On The Submit Button Click.. The Same Datasource Property Is Coming As Null. Why?

As ViewState is just not storing the DataSource property.

We have to make use of Items property of DropDownList to get the objects again.

What Is Data Adapter?

Data adapter are objects that join a number of command objects to a dataset object. They present logic that will get the information from the information retailer and populates the tables within the dataset, or pushes the adjustments within the dataset again into the information retailer.

What Is Replication?

Replication is means of retaining knowledge synchronized in a number of databases. SQL server replication has two vital elements writer and subscriber.

Publisher: Database server that makes knowledge obtainable for replication is known as as writer.
Subscriber: Database servers that get knowledge from the publishers is known as as subscribers.

What Are The Different Types Of Remote Object Creation Mode In .web?

There are two sorts of distant object creation mode. They are,

  • SAO(server activated objects)
  • CAO(shopper activated objects)

What Is Application Domain?

In utility domains a number of utility can run in the identical course of with out influencing every othere. If one of many utility domains throws error it doesn’t have an effect on the opposite utility domains.

What Is Thread.sleep()?

Thread’s execution may be paused by calling the thread.sleep technique. This technique takes an integer worth that determines how lengthy the thread ought to sleep.
Eg: Thread.PresentThread.Sleep(2000)

What Is Addressof Operator?

Addressof operator creates a delegate object to a technique.

instance:
Dim pthread1 as new thread(Deal withOf thread1)
Here thread1 is a technique. pthread1 is a delegate object.

What Is Multi-threading?

Multi-threading types subset of multi-tasking as an alternative of getting to modify between packages this characteristic switches between completely different elements of the identical program. For instance, we are able to write in phrase and on the identical time phrase is doing a spell test in background.

What Is Dcom?

DCOM is a distributed extension of COM. It differs from COM in that it permits for creating objects distributed throughout a community, a protocol for invoking that object’s strategies, and safe to the item. DCOM gives a wrapper round COM, therefore it’s a backward suitable extension.

How To Install Or Uninstall A Windows Service?

For Install:-

Go to visible Studio command immediate
(Start => All packages => Microsoft Visual Studio 2005 => Visual Studio Tools => Visual Studio 2005 Command Prompt)

installutil <Path of your Service>
(e.g installutil C:\MyService.exe)

For UN Install:

Go to visible Studio command immediate
(Start => All packages => Microsoft Visual Studio 2005 => Visual Studio Tools => Visual Studio 2005 Command Prompt)

installutil -U <Path of your Service>
(e.g installutil -U C:\MyService.exe)

What Is Jit? What Are The Different Types Of Jit?

JIT stands for Just-in-time compiler.It is part of the runtime execution surroundings. It compiles the intermediate language and execute them. There are three sorts of JIT. They are,

  • Pre-JIT : compiles full supply code into native code in a single compilation cycle. This is completed by on the time of deployment of the applying.
  • Econo-JIT : compiles solely these strategies that they’re known as at runtime. However, These compiled strategies are eliminated when they aren’t required.
  • Normal-JIT : compiles solely these strategies that they’re known as at runtime. These strategies are compiled the primary time they’re known as after which they’re saved in cache. When the identical strategies are known as once more, the compiled code from cache is used for execution.

What Is Delay Signing?

During improvement course of we’ve got to signal sturdy identify with our utility. But it’s not good observe within the safety perspective. For that, we are able to signal it later. It is known as delay signing.

What Is Strong Name?

Strong identify helps GAC(Global meeting cache) to distinguish between two variations.It is just wanted after we deploy the meeting with GAC. It makes use of public key cryptocrophy to make sure that nobody spoof it.

What Is Code Verification?

Code verification make sure that correct code execution and kind security whereas the code runs. It doesn’t enable to carry out unlawful operation reminiscent of invalid reminiscence location.

What Is Code Access Security?

Code entry safety grant rights to this system is determined by safety configuration of the machine. For instance, Program can have entry to create or edit a file however safety configuration of the machine doesn’t enable to delete a file.

What Is Il?

IL stands for Intermediate language. All .Net code is transformed into IL. Then IL is transformed into native code at run time by JIT(simply in time) compiler and executed by them.

What Is Class Library In .internet

class library is a set of prewritten, ready-made software program routines that act as templates for programmers to make use of in writing object-oriented software applications

How To Block A Class From Being Inherited Further?

Use sealed key phrase.

Eg: public sealed class TheClass
{
}

How To Find The Current Application File Path While Runtime?

System.Reflection.Assembly.GetExecutingAssembly().Location

What Is The Base Class Of All Classes In C#?

It is object (Sytem.Object)

You Are Designing A User Control. You Created New Property Called Backgroundimage Which Is Of Type Image. You Wanted To Disable Storing This Property In The User’s Form. How To Achieve This?

Use the attribute:
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]

You Are Creating A Custom Usercontrol, Some Of The Newly Created Properties Are Shown In The Properties Window. How You Can Hide A New Property Named Theme From The Properties Window?

Use the attribute [Browsable(false)] together with the property

[Browsable(false)]
public string Theme
{
get;
set;
}

How To Sort An Int Array In C#?

Array class is having methodology to type any arrays.

Example:
int[] array = new int[] { 10, 9, 8 };
Array.Sort(array);

Additional:
Sort is overloaded methodology with IComparer as argument too.

How To Prevent The Error While Updating Ui Control From Another Thread?

Control.ExamineForIllegalCrossThreadCalls = false;

You Are Designing A Single Person Shooter Game Application. The Player Can Choose Between Multiple Guns. 1) Pistol With 5 Bullets 2) Shotgun With 100 Bullets 3) Grenade Launcher With 20 Grenades Each Gun Will Have Different Sound Effects And Graphics.urgent Ctrl+area Should Rotate Between Guns.which Design Pattern Should You Employ For This?

  • Use Strategy Pattern.
  • Explanation: Each gun having completely different efficiency and graphics.
  • So this may be accomodated within the algorithm.

Strategy sample is greatest fitted to shifting the weapons/algorithms There will probably be a IGun interface carried out by Three courses.

  • Pistol :IGun
  • Shotgun :IGun
  • GrenadeLauncher :IGun

How To Find Whether The Application Is Run From Inside Ide Or Not?

Use System.Diagnostics.Debugger.IsAttached property.If it’s true meaning a debugger is hooked up to the applying else not

Useful: While creating purposes we are able to examine this property and skip the login web page/kind and immediately launch the web page/kind we’re debugging.

What Is The Difference Between Var And Dynamic Types In C# 4.0?

var will get processed within the compile time itself and exhibits any error throughout compile time itself.

dynamic will get processed within the runtime solely and in case of errors it’s hidden till runtime.

dynamic was launched as a part of the DLR (Dynamic Language Runtime)in .Net.

Example:
dynamic d = new MyClass();
d.IncurrentMethod();

Eventhough the strategy “InexistingMethod” isn’t there – it’s going to get compiled and thrown exception in runtime.

How Can You Access A Private Method Of A Class?

Use .Net Reflection. Using reflection we are able to invoke personal strategies too.

Example:

Car automobile = new Car();
Type kind = automobile.GetType();
MethodInfo methodologyInfo = kind.GetMethod(“ShiftGearUp”, BindingFlags.NonPublic | BindingFlags.Instance);
methodologyInfo.Invoke(automobile, null);

Pre: Create a category Car with personal methodology “ShiftGearUp”

Why Linq Is Having Select Clause At The End?

Due to IntelliSense of Visual Studio.

If the choose clause was within the first of LINQ, then the IDE can not populate the properties inside the article.

Eg:from f in db.Forum the place f.Id > Zero choose f.Name;

If the choose was in entrance – the “select f.” couldn’t populate any autocomplete properties or strategies.

Name The Method Of Servicebase Class?

The following are the strategies of ServiceBase class.
• OnBegin
• OnCease
• OnPause
• OnProceed
• OnShutdown
• OnPowerEvent
• OnCustomCommand

Name The Two Classes Are Required For Implementing A Windows Service?

The following two courses are required for implementing a Windows Service:
• System.ServiceProcess.ServiceBase
• System.Configuration.Install.Installer

What Are The Benefits Of Using Windows Services:

The following are the advantages of utilizing Windows Services:
• Network connection administration
• Disk entry monitoring
• Security management of software
• Log messages associated to the applying’s necessities

What Are Windows Services?

Windows providers are lengthy working executable purposes that sometimes don’t possess any consumer interface, are managed by the Service Control Manager (SCM) and might even be configured to start out mechanically after the system boots. They sometimes execute in their very own home windows classes. They can execute even when the consumer has not logged in to the system. They may even be began, paused, re-started manually. These purposes are considerably just like the daemon processes of UNIX within the sense that they continue to be dormant more often than not and execute within the background as and when wanted.

Dot Net Interview Questions And Answers For Experienced

By Default Security Setting In .internet?

nameless entry

Can Namespace Contain The Private Class?

no, having a single personal class doesn’t imply something , it’s relevant solely in case of nested class.

Wcf And What Is Difference Between Wcf And Web Services?

WCF is home windows communication basis identical as webservices. really WCF =webservices + remoting

Is Exe Is Machine Dependent?

sure

What Is Difference Between Il And Dll ?

DLL accommodates the IL and different particulars (metadata) inside.

How Will You Deploy The Dll File In Gac?

first create the sturdy identify for dll and add this sn identify key into the applying then use gacutil command to register the dll in GAC.

If Dll And Exe Files Are Same It Means You Can Deploy Both The Files In Gac?

No, deploying a exe file doesn’t imply something as a result of courses and methodology are uncovered in dll solely and exe file is pure executable, any software cannot name the operate of exe file.

What Is The Task Perform By Clr?

It have the duty like

  • working the rubbish collector
  • Code verification
  • code entry safety
  • executing IL

Suppose Two Interfaces Have Same Method, So How Will You Implement These Methods In Derive Class?

by utilizing interface identify

What Is Using Keyword?

utilizing key phrase can be utilized in two format

  • embody the namespace in file
  • deal with the idisposable objects inside utilizing block.

iFace obj = new myclass()

Myclass obj1 = new myclass()

Obj.hey();
Obj1.hey();

How To Get The Number After Decimal Point In .internet?if The No Is 2.36. Result Should Be 36?

string outcome=quantity.Substring(quantity.inderOf(‘.’)+1);

It will first get the index of ‘.’ after which add 1 to get the index of subsequent charater then with the assistance of substring methodology we are going to get the no after the decimal level to the final

Wht Executescaler Method Is Used?

Executes the question, and returns the primary column of the primary row within the outcome set returned by the question. Additional columns or rows are ignored.

What Is Literal Control

A Literal Web Server management does not have any visible look on a Web Form however is used to insert literal textual content right into a Web Form. This management makes it attainable so as to add HTML code immediately within the code designer window with out switching to design view and clicking the HTML button to edit the HTML.

How Many Languages .internet Is Supporting Now?

When .NET was launched it got here with a number of languages.
VB.NET,
C#,
COBOL
and
Perl, and many others.

How Asp .internet Different From Asp?

Scripting is separated from the HTML, Code is compiled as a DLL, these DLLs might be executed on the server.

What Is Smart Navigation In .internet?

The cursor place is maintained when the web page will get refreshed as a result of server aspect validation and the web page will get refreshed.

What Is View State In .internet?

The net is stateless. But in ASP.NET, the state of a web page is maintained within the within the web page itself mechanically. The values are encrypted and saved in hidden controls. that is executed mechanically by the ASP.NET. This might be switched off / on for a single management.

How Do You Validate The Controls In An Asp .internet Page?

Using particular validation controls which are meant for validation of any controle.We have Range Validator, Email Validator in .NET to validate any management.

How To Manage Pagination In A Page Using .internet?

Using pagination choice in DataGrid management is offered in .NET. We need to set the variety of information for a web page, then it takes care of pagination by itself mechanically.

Observations Between Vb.internet And Vc#.internet?

Choosing a programming language is determined by your language expertise and the scope of the applying you might be constructing. While small purposes are sometimes created utilizing just one language, it isn’t unusual to develop massive purposes utilizing a number of languages.For instance, if you’re extending an software with current XML Web providers, you would possibly use a scripting language with little or no programming effort. For client-server purposes, you’ll most likely select the one language you might be most comfy with for the complete software. For new enterprise purposes, the place massive groups of builders create elements and providers for deployment throughout a number of distant websites, your best option is likely to be to make use of a number of languages relying on developer expertise and long-term upkeep expectations.The .NET Platform programming languages – together with Visual Basic .NET, Visual C#, and Visual C++ with managed extensions, and plenty of different programming languages from varied distributors – use .NET Framework providers and options by way of a typical set of unified courses. The .NET unified courses present a constant methodology of accessing the platform’s performance. If you be taught to make use of the category library, one can find that every one duties comply with the identical uniform structure. You not must be taught and grasp completely different API architectures to put in writing your purposes.

Dot Net Mvc Interview Questions And Answers

Advantages Of Migrating To Vb.internet?

Visual Basic .NET has many new and improved language options — reminiscent of inheritance, interfaces, and overloading that make it a robust object-oriented programming language. As a Visual Basic developer, now you can create multithreaded, scalable purposes utilizing express multithreading. Other new language options in Visual Basic .NET embody structured exception dealing with, customized attributes, and customary language specification (CLS) compliance. The CLS is a algorithm that standardizes things like information varieties and the way objects are uncovered and interoperate. Visual Basic .NET provides a number of options that reap the benefits of the CLS. Any CLS-compliant language can use the courses, objects, and elements you create in Visual Basic .NET. And you, as a Visual Basic consumer, can entry courses, elements, and objects from different CLS-compliant programming languages with out worrying about language-specific variations reminiscent of information varieties.CLS options utilized by Visual Basic .NET applications embody assemblies, namespaces, and attributes.

Advantages Of Vb.internet?

  • First of all, VB.NET offers managed code execution that runs underneath the Common Language Runtime (CLR), leading to sturdy, steady and safe purposes. All options of the .NET framework are available in VB.NET.
  • VB.NET is completely object oriented. This is a serious addition that VB6 and different earlier releases did not have.
  • The .NET framework comes with ADO.NET, which follows the disconnected paradigm, i.e. as soon as the required information are fetched the connection not exists. It additionally retrieves the information which are anticipated to be accessed within the fast future. This enhances Scalability of the applying to an amazing extent.
  • VB.NET makes use of XML to switch information between the varied layers within the DNA Architecture i.e. information are handed as easy textual content strings.
  • Error dealing with has modified in VB.NET. A brand new Try-Catch-Finally block has been launched to deal with errors and exceptions as a unit, permitting applicable motion to be taken on the place the error occurred thus discouraging the usage of ON ERROR GOTO assertion. This once more credit to the maintainability of the code.

Using Activex Control In .internet?

ActiveX management is a particular kind of COM part that helps a User Interface. Using ActiveX Control in your .Net Project is even simpler than utilizing COM part. They are bundled normally in .ocx information. Again a proxy meeting is made by .Net utility AxImp.exe (which we are going to see shortly) which your software (or shopper) makes use of as if it’s a .Net management or meeting. Making Proxy Assembly For ActiveX Control: First, a proxy meeting is made utilizing AxImp.exe (acronym for ActiveX Import) by writing following command on Command Prompt: C:> AxImp C:MyProjectsMyControl.ocx This command will make two dlls, e.g., in case of above command MyControl.dll AxMyControl.dll The first file MyControl.dll is a .Net meeting proxy, which lets you reference the ActiveX as if it have been non-graphical object. The second file AxMyControl.dll is the Windows Control, which permits u to make use of the graphical facets of activex management and use it within the Windows Form Project.

What Is Machine.config In .internet?

Machine configuration file: The machine.config file accommodates settings that apply to the complete laptop. This file is positioned within the %runtime set up path%Config listing. There is just one machine.config file on a pc. The Machine.Config file discovered within the “CONFIG” subfolder of your .NET Framework set up listing (c:WINNT Microsoft.NETFramework{Version Number}CONFIG on Windows 2000 installations). The machine. config,which might be discovered within the listing $WINDIR $Microsoft.NETFrameworkv 1.0.3705CONFIG,is an XML-formatted configuration file that specifies configuration choices for the machine. This file accommodates, amongst many different XML parts, a browserCaps component. Inside this component are various different parts that specify parse guidelines for the varied User-Agents, and what properties every of those parsings helps.

For instance, to find out what platform is used, a filter component is used that specifies easy methods to set the platform property primarily based on what platform identify is discovered within the User-Agent string. Specifically, the machine.config file accommodates:

platform=Win95
platform=Win98
platform=WinNT

What Is Web.config In .internet?

In basic ASP all Web website associated info was saved within the metadata of IIS. This had the drawback that distant Web builders could not simply make Web-site configuration adjustments. For instance, if you wish to add a customized 404 error web page, a setting must be made by way of the IIS admin instrument, and also you’re Web host will possible cost you a flat payment to do that for you. With ASP.NET, nevertheless, these settings are moved into an XML-formatted textual content file (Web.config) that resides within the Web website’s root listing. Through Web.config you may specify settings like customized 404 error pages, authentication and authorization settings for the Web sitempilation choices for the ASP.NET Web pages, if tracing needs to be enabled, and many others. The Web.config file is an XML-formatted file. At the basis degree is the tag. Inside this tag you may add various different tags, the commonest and helpful one being the system.net tag, the place you’ll specify many of the Web website configuration parameters. However, to specify application-wide settings you utilize the tag.

For instance, if we needed so as to add a database connection string parameter we might have a Web.config file like so.

What Is The Difference Between Ado And Ado.internet?

ADO makes use of Recordsets and cursors to entry and modify information. Because of its inherent design, Recordset can impression efficiency on the server aspect by tying up useful assets. In addition, COM marshalling – an costly information conversion course of – is required to transmit a Recordset. ADO.NET addresses three vital wants that ADO does not deal with:

  • Providing a complete disconnected data-access mannequin, which is essential to the Web surroundings
  • Providing tight integration with XML, and
  • Providing seamless integration with the .NET Framework (e.g., compatibility with the bottom class library’s kind system). From an ADO.NET implementation perspective, the Recordset object in ADO is eradicated within the .NET structure. In its place, ADO.NET has a number of devoted objects led by the DataSet object and together with the DataAdapter, and DataReader objects to carry out particular duties. In addition, ADO.NET DataUnits function in disconnected state whereas the ADO RecordSet objects operated in a totally linked state.

In ADO, the in-memory illustration of information is the recordset. In ADO.NET, it’s the dataset. A recordset appears like a single desk. If a recordset is to comprise information from a number of database tables, it should use a JOIN question, which assembles the info from the varied database tables right into a single outcome desk. In distinction, a dataset is a set of a number of tables.

What Is The Difference Between Vb And Vb.internet?

Now VB.NET is object-oriented language. The following are a few of the variations:

Data Type Changes

The .NET platform offers Common Type System to all of the supported languages. This signifies that all of the languages should help the identical information varieties as enforced by widespread language runtime. This eliminates information kind incompatibilities between varied languages. For instance on the 32-bit Windows platform, the integer information kind takes Four bytes in languages like C++ whereas in VB it takes 2 bytes. Following are the principle adjustments associated to information varieties in VB.NET:

  • Under .NET the integer information kind in VB.NET can be Four bytes in measurement.
  • VB.NET has no forex information kind. Instead it offers decimal as a alternative.
  • VB.NET introduces a brand new information kind referred to as Char. The char information kind takes 2 bytes and might retailer Unicode characters.
  • VB.NET wouldn’t have Variant information kind. To obtain a outcome just like variant kind you need to use Object information kind. (Since each factor in .NET together with primitive information varieties is an object, a variable of object kind can level to any information kind).
  • In VB.NET there isn’t a idea of fastened size strings.
  • In VB6 we used the Type key phrase to declare our user-defined buildings. VB.NET introduces the construction key phrase for a similar objective.
  • Declaring Variables

Consider this straightforward instance in VB6:

Dim x,y as integer

What Is A Strong Name In .internet?

A powerful identify consists of the meeting’s identification its easy textual content identify, model quantity, and tradition info (if offered) plus a public key and a digital signature. It is generated from an meeting file (the file that accommodates the meeting manifest, which in flip accommodates the names and hashes of all of the information that make up the meeting), utilizing the corresponding personal key. Assemblies with the identical sturdy identify are anticipated to be an identical.

Strong names assure identify uniqueness by counting on distinctive key pairs. No one can generate the identical meeting identify which you could, as a result of an meeting generated with one personal key has a unique identify than an meeting generated with one other personal key.

When you reference a strong-named meeting, you anticipate to get sure advantages, reminiscent of versioning and naming safety. If the strong-named meeting then references an meeting with a easy identify, which doesn’t have these advantages, you lose the advantages you’ll derive from utilizing a strong-named meeting and revert to DLL conflicts. Therefore, strong-named assemblies can solely reference different strong-named assemblies.

There are two methods to signal an meeting with a powerful identify:

Using the Assembly Linker (Al.exe) offered by the .NET Framework SDK.

Using meeting attributes to insert the sturdy identify info in your code. You can use both the AssemblyKeyFileAttribute or the AssemblyKeyNameAttribute, relying

What Is A Manifest In .internet?

An meeting manifest accommodates all of the metadata wanted to specify the meeting’s model necessities and safety identification, and all metadata wanted to outline the scope of the meeting and resolve references to assets and courses. The meeting manifest might be saved in both a PE (Portable Executable) file (an .exe or .dll) with Microsoft intermediate language (MSIL) code or in a standalone PE (Portable Executable) file that accommodates solely meeting manifest info.

The following desk exhibits the data contained within the meeting manifest. The first 4 gadgets the meeting identify, model quantity, tradition, and powerful identify info make up the meeting’s identification.

Ado Dot Net Interview Questions And Answers

Assembly identify: A textual content string specifying the meeting’s identify.

Version quantity: A significant and minor model quantity, and a revision and construct quantity. The widespread language runtime makes use of these numbers to implement model coverage.

Culture: Information on the tradition or language the meeting helps. This info needs to be used solely to designate an meeting as a satellite tv for pc meeting containing culture- or language-specific info. (An meeting with tradition info is mechanically assumed to be a satellite tv for pc meeting.) Strong identify info: The public key from the writer if the meeting has been given a powerful identify.

Dot Net Interview Questions And Answers For 7 Years ExperienceDot Net Interview Questions And Answers For 7 Years Experience

Creating A Key Pair In .internet?

You can create a key pair utilizing the Strong Name instrument (Sn.exe). Key pair information normally have an .snk extension. To create a key pair At the command immediate, kind the next command:

In this command, file identify is the identify of the output file containing the important thing pair. The following instance creates a key pair referred to as sgKey.snk

What Is The Difference Between “using System.data;” And Directly Adding The Reference From “add References Dialog Box”?

When u compile a program utilizing command line, u add the references utilizing /r change. When you compile a program utilizing Visual Studio, it provides these references to our meeting, that are added utilizing “Add Reference” dialog field. While “using” assertion facilitates us to make use of courses with out utilizing their absolutely certified names.

For instance: if u have added a reference to “System. Data. SqlClient” utilizing “Add Reference” dialog field then u can use SqlConnection class like this:

System.Data.SqlClient.SqlConnection

But if u add a “using System. Data. SqlClient” assertion at the beginning of ur code then u can immediately use Sql Connection class.On the opposite hand if u add a reference utilizing “using System.Data.SqlClient” assertion, however do not add it utilizing “Add Reference” dialog field, Visual Studio will give error message whereas we compile this system

What Is Gac In .internet?

The international meeting cache shops assemblies particularly designated to be shared by a number of purposes on the pc. You ought to share assemblies by putting in them into the worldwide meeting cache solely when you could. Assemblies deployed within the international meeting cache will need to have a powerful identify. When an meeting is added to the worldwide meeting cache, integrity checks are carried out on all information that make up the meeting. The cache performs these integrity checks to make sure that an meeting has not been tampered with, for instance, when a file has modified however the manifest doesn’t mirror the change. Use a developer instrument referred to as the Global Assembly Cache instrument (Gacutil.exe), offered by the .NET Framework SDK or Use Windows Explorer to tug assemblies into the cache. To set up a strong-named meeting into the worldwide meeting cache At the command immediate, kind the next command:

gacutil I

In this command, meeting identify is the identify of the meeting to put in within the international meeting cache.

What Is A Metadata In .internet?

Metadata is details about a PE. In COM, metadata is communicated by way of non-standardized kind libraries.

In .NET, this information is contained within the header portion of a COFF-compliant PE and follows sure tips; it accommodates info such because the meeting’s identify, model, language (spoken, not computera.okay.a., tradition), what exterior varieties are referenced, what inside varieties are uncovered, strategies, properties, courses, and rather more.

The CLR makes use of metadata for various particular functions. Security is managed by way of a public key within the PE’s header.

Information about courses, modules, and so forth permits the CLR to know upfront what buildings are essential. The class loader part of the CLR makes use of metadata to find particular courses inside assemblies, both regionally or throughout networks.

Just-in-time (JIT) compilers use the metadata to show IL into executable code.

Other applications reap the benefits of metadata as properly.

A typical instance is inserting a Microsoft Word doc on a Windows 2000 desktop. If the doc file has accomplished feedback, writer, title, or different Properties metadata, the textual content is displayed as a instrument tip when a consumer hovers the mouse over the doc on the desktop. You can use the Ildasm.exe utility to view the metadata in a PE. Literally, this instrument is an IL disassembler.

What Is Managed Code And Managed Data In .internet?

Managed code is code that’s written to focus on the providers of the Common Language Runtime.
In order to focus on these providers, the code should present a minimal degree of knowledge (metadata) to the runtime.All C#, Visual Basic .NET, and JScript .NET code is managed by default. Visual Studio .NET C++ code isn’t managed by default, however the compiler can produce managed code by specifying a command-line change (/CLR).Closely associated to managed code is managed data–data that’s allotted and de-allocated by the Common Language Runtime’s rubbish collector. C#, Visual Basic, and JScript .NET information is managed by default.C# information can, nevertheless, be marked as unmanaged by way of the usage of particular key phrases.Visual Studio .NET C++ information is unmanaged by default (even when utilizing the /CLR change), however when utilizing Managed Extensions for C++, a category might be marked as managed utilizing the __gc key phrase. As the identify suggests, which means that the reminiscence for cases of the category is managed by the rubbish collector.

In addition, the category turns into a full collaborating member of the .NET Framework neighborhood, with the advantages and restrictions that it brings. An instance of a profit is correct interoperability with courses written in different languages (for instance, a managed C++ class can inherit from a Visual Basic class).An instance of a restriction is {that a} managed class can solely inherit from one base class.

What Is .internet And .internet Framework?

It is a Framework through which Windows purposes could also be developed and run. The Microsoft .NET Framework is a platform for constructing, deploying, and working Web Services and purposes. It offers a extremely productive, standards-based, multi-language surroundings for integrating current investments with next-generation purposes and providers in addition to the agility to resolve the challenges of deployment and operation of Internet-scale purposes. The .NET Framework consists of three important components: the widespread language runtime, a hierarchical set of unified class libraries, and a componentized model of Active Server Pages referred to as ASP.NET. The .NET Framework offers a brand new programming mannequin and wealthy set of courses designed to simplify software improvement for Windows, the Web, and cellular gadgets. It offers full help for XML Web providers, accommodates sturdy safety features, and delivers new ranges of programming energy. The .NET Framework is utilized by all Microsoft languages together with Visual C#, Visual J#, and Visual C++.

What’s A Windows Process?

It’s an software that’s working and had been allotted reminiscence

What’s Typical About A Windows Process In Regards To Memory Allocation?

Each course of is allotted its personal block of accessible RAM area, no course of can entry one other course of code or information. If the method crashes, it dies alone with out taking the complete OS or a bunch of different purposes down.

Why Do You Call It A Process? What’s Different Between Process And Application In .internet, Not Common Computer Usage, Terminology?

A course of is an occasion of a working software. An software is an executable on the onerous drive or community. There might be quite a few processes launched of the identical software (5 copies of Word working), however 1 course of can run simply 1 software.

What Distributed Process Frameworks Outside .internet Do You Know?

Distributed Computing Environment/Remote Procedure Calls (DEC/RPC), Microsoft Distributed Component Object Model (DCOM), Common Object Request Broker Architecture (CORBA), and Java Remote Method Invocation (RMI).

What Are Possible Implementations Of Distributed Applications In .internet?

.NET Remoting and ASP.NET Web Services. If we discuss concerning the Framework Class Library, noteworthy courses are in System.Runtime.Remoting and System.Web.Services.

When Would You Use .internet Remoting And When Web Services?

Use remoting for extra environment friendly trade of knowledge while you management each ends of the applying. Use Web providers for open-protocol-based info trade if you end up only a shopper or a server with the opposite finish belonging to another person.

What’s A Proxy Of The Server Object In .internet Remoting?

It’s a pretend copy of the server object that resides on the shopper aspect and behaves as if it was the server. It handles the communication between actual server object and the shopper object. This course of is also called marshaling.

What Are Remotable Objects In .internet Remoting?

Remotable objects are the objects that may be marshaled throughout the applying domains. You can marshal by worth, the place a deep copy of the article is created after which handed to the receiver. You can even marshal by reference, the place only a reference to an current object is handed.

What Are Channels In .internet Remoting?

Channels signify the objects that switch the opposite serialized objects from one software area to a different and from one laptop to a different, in addition to one course of to a different on the identical field. A channel should exist earlier than an object might be transferred.

What Security Measures Exist For .internet Remoting In System.runtime.remoting?

None. Security needs to be taken care of on the software degree. Cryptography and different safety strategies might be utilized at software or server degree.

What Is A Formatter?

A formatter is an object that’s liable for encoding and serializing information into messages on one finish, and deserializing and decoding messages into information on the opposite finish.

Choosing Between Http And Tcp For Protocols And Binary And Soap For Formatters, What Are The Trade-offs?

Binary over TCP is essentially the most effiecient, SOAP over HTTP is essentially the most interoperable.

What’s Singlecall Activation Mode Used For?

If the server object is instantiated for responding to only one single request, the request needs to be made in SingleCall mode.

What’s Singleton Activation Mode?

A single object is instantiated whatever the variety of shoppers accessing it. Lifetime of this object is decided by lifetime lease.

How Do You Define The Lease Of The Object?

By implementing ILease interface when writing the category code.

Can You Configure A .internet Remoting Object Via Xml File?

Yes, by way of machine.config and software degree .config file (or net.config in ASP.NET). Application-level XML settings take priority over machine.config.

How Can You Automatically Generate Interface For The Remotable Object In .internet With Microsoft Tools?

Use the Soapsuds instrument.

What Are The Consideration In Deciding To Use .internet Remoting Or Asp.internet Web Services?

Remoting is a extra environment friendly communication trade when you may management each ends of the applying concerned within the communication course of. Web Services present an open-protocol-based trade of informaion. Web Services are greatest when you could talk with an exterior group or one other (non-.NET) expertise.

What’s Singlecall Activation Mode Used For?

If the server object is instantiated for responding to only one single request, the request needs to be made in SingleCall mode.

What Do You Mean By A Windows Process In Regards To Memory Allocation?

Each course of is allotted its personal deal with area sometimes 4GB through which it could actually run. No different course of can intrude in that deal with area.

If the method crashes, it dies alone with out taking the complete OS or a bunch of different purposes down.

What Is The Relationship Between A Process, Application Domain, And Application?

A course of is an occasion of a working software. An software is an executable within the laptop. There might be quite a few processes launched of the identical software (5 copies of Word working), however 1 course of can run simply 1 software. Hence, Process is a working occasion of the applying.

How To Decide Which To Use .internet Remoting Or Asp.internet Web Services?

Remoting is a extra environment friendly communication trade when you may management each ends of the applying concerned within the communication course of. Remoting is great in case of intranet applicaton becuase of the velocity.

Web Services present an open-protocol-based trade of informaion. Web Services are greatest when you could ommunicate with an exterior group or one other (non-.NET) expertise purposes.

What Is The Proxy Of The Server Object In .internet Remoting?

Proxy is copy of the server object( a skinny layer) that resides on the shopper aspect and behaves as if it was the server. It delegate calls to the true server object. This course of is also called marshaling.

What Do Mean By Remotable Objects In .internet Remoting?

Remotable objects might be marshaled throughout the applying domains. You can marshal by worth, the place a deep copy of the article is created after which handed to the receiver. You can even marshal by reference, the place only a reference to an current object is handed.

Which Class Does The Remote Object Has To Inherit?

All distant objects ought to inherit from System.MarshalbyRefObject.

What Are Two Different Types Of Remote Object Creation Mode In .internet?

There are two alternative ways through which object might be created utilizing Remoting:

  • SAO (Server Activated Objects) additionally referred to as as Well-Known name mode.
  • CAO (Client Activated Objects).

SAO has two modes “Single Call” and “Singleton”. With Single Call object the article is created with each methodology name thus making the article stateless. With Singleton the article is created solely as soon as and the article is shared with all shoppers.

CAO are stateful as in comparison with SAO. In CAO the creation request is shipped from shopper aspect. Client holds a proxy to the server object created on server.

What Are The Situations You Will Use Singleton Architecture In Remoting ?

If all remoting shoppers need to share the identical information singleton structure will probably be used.

What Is Fundamental Of Published Or Precreated Objects In Remoting?

In eventualities of singleton or single name the objects are created dynamically. But in conditions the place you need to precreate object and publish it you’ll use printed object eventualities.

Dim obj as new objRemote
obj.Initvalue = 100
RemotingServices.Marshal(obj,”RemoteObject”)

As proven in above pattern following adjustments will probably be wanted on server aspect.

Remoting Configuration.Register WellKnown ServiceType is changed by Remoting Services .Marshal (obj,”Remote Object”) the place “obj” is the precreated objected on the server whose worth is initialized to 100.

What Are The Ways In Which Client Can Create Object On Server In Cao Model?

There are two methods by which you’ll be able to create Client objects on remoting server:

Activator.CreateInstance()
By Keyword “New”.

Are Cao Stateful In Nature?

Yes. In CAO remoting mannequin shopper creates a occasion on server and occasion variable set by shopper on server might be retrieved once more with appropriate worth.

Is It A Good Design Practice To Distribute The Implementation To Remoting Client?

It’s by no means advisable to distribute full implementation at shopper, resulting from following causes:

  • Any one can use ILDASM or related utility and get entry to your code.
  • It’s a foul structure transfer to have full implementation as shopper aspect as any adjustments in implementation on server aspect it’s important to redistribute it once more.

So one of the simplest ways is to have a interface or SOAPSUDS generated meta-data DLL at shopper aspect relatively than having full implementation.

Which Config File Has All The Supported Channels/protocol?

Machine.config file has all of the supported channels and formatter supported by .NET remoting.Machine.config file might be discovered at “C:\WINDOWS\Microsoft.NET\Framework\vXXXXX\CONFIG” path. Find component within the Machine. config file which has the channels and the formatters. Below is a determine proven which may give a transparent thought of how the file appears like.

Can Non-default Constructors Be Used With Single Call Sao?

Non-Default constructors cannot be used with single name objects as object is created with each methodology name, there isn’t a strategy to outline Non-default constructors in methodology calls. It’s attainable to make use of Non-Default constructor with Client activated objects as each strategies “NEW” key phrase and “Activator.CreateInstance” present a strategy to specify Non-Default constructors.

How Can We Call Methods In Remoting Asynchronously?

We could make Asynchronous methodology calls by utilizing delegates.

What Is Asynchronous One-way Calls?

One-way calls are a special from asynchronous calls from execution angle that the .NET Framework doesn’t assure their execution. In addition, the strategies utilized in this type of name can’t have return values or out parameters. One-way calls are outlined by utilizing [OneWay()] attribute at school.

Basic Dot Net Interview Questions And Answers

What Is Marshalling And What Are Different Kinds Of Marshalling?

Marshaling is used when an object is transformed in order that it may be despatched throughout the community or throughout software domains. Unmarshaling creates an object from the marshaled information. There are two methods to do marshalling:

Marshal-by-value (MBV): In this the item is serialized into the channel, and a duplicate of the item is created on the opposite facet of the community. The object to marshal is saved right into a stream, and the stream is used to construct a duplicate of the item on the opposite facet with the unmarshalling sequence.

Marshaling-by-reference (MBR): Here it creates a proxy on the shopper that’s used to speak with the distant object. The marshaling sequence of a distant object creates an ObjRef occasion that itself might be serialized throughout the community.

What Is Objref Object In Remoting?

All Marshal() strategies return ObjRef object.The ObjRef is serializable as a result of it implements the interface ISerializable, and might be marshaled by worth. The ObjRef is aware of about location of the distant object, host title, port quantity and object title.

What Is A Web Service?

Web Services are business logic elements which give performance through the Internet utilizing customary protocols comparable to HTTP. Web Services makes use of Simple Object Access Protocol (SOAP) so as to expose the business performance.SOAP defines a standardized format in XML which might be exchanged between two entities over customary protocols comparable to HTTP. SOAP is platform impartial so the patron of a Web Service is due to this fact fully shielded from any implementation particulars concerning the platform exposing the Web Service. For the patron it’s merely a black field of ship and obtain XML over HTTP. So any internet service hosted on Windows can be consumed by UNIX and LINUX platform.

What Is Uddi?

Full type of UDDI is Universal Description, Discovery and Integration. It is a listing that can be utilized to publish and uncover public Web Services.

What Is Disco?

DISCO is the abbreviated type of Discovery. It is principally used to membership or group widespread providers collectively on a server and offers hyperlinks to the schema paperwork of the providers it describes might require.

What Is Wsdl?

Web Service Description Language (WSDL)is a W3C specification which defines XML grammar for describing Web Services.XML grammar describes particulars comparable to the place we are able to discover the Web Service (its URI), what are the strategies and properties that service helps, information sort assist and supported protocols.

Clients can eat this WSDL and construct proxy objects that purchasers use to speak with the Web Services.

What The Different Phase/steps Of Acquiring A Proxy Object In Webservice?

Following are the completely different steps wanted to get a proxy object of a webservice on the shopper facet:

  • Client communicates to UDDI node for webservice both by means of browser or UDDI’s public internet service.
  • UDDI node responds with a listing of webservices.
  • Every service listed by webservice has a URI pointing to DISCO or WSDL doc.
  • After parsing the DISCO doc, we comply with the URI for the WSDL doc associated to the webservice which we’d like.
  • Client then parses the WSDL doc and builds a proxy object which might talk with Webservice.

What Is File Extension Of Webservices?

.ASMX is extension for Webservices.

Which Attribute Is Used In Order That The Method Can Be Used As Webservice?

WebMethod attribute must be specified so that the tactic and property might be handled as WebService.

What Are The Steps To Create A Webservice And Consume It?

In Visual Studio you’ll be able to create a brand new undertaking utilizing “Asp.NET Web Service” template or simply create asmx-file utilizing any textual content editor. After webservice is applied, you want both add a webreference to it in Visual Studio, or to create a proxy for the shopper manually utilizing wsdl.exe utility and construct a shopper program utilizing created proxy class, in order that utilizing it shopper can eat the webservice.

Why Do You Call It A Process? What’s Different Between Process And Application In .web, Not Common Computer Usage, Terminology?

A course of is an occasion of a operating software. An software is an executable on the arduous drive or community. There might be quite a few processes launched of the identical software (5 copies of Word operating), however 1 course of can run simply 1 software.

What’s Singlecall Activation Mode Used For?

If the server object is instantiated for responding to only one single request, the request needs to be made in SingleCall mode.

What Is The Relation Between Classes And Objects?

Class is a bunch of things, attributes of some entity. Object is any particular merchandise that will or will not be part of the category.When a category is created, objects for these lessons are created.

Explain Different Properties Of Object Oriented Systems.

An object oriented system revolves round a Class and objects. A category is used to explain traits of any entity of the actual world. An object is a sample of the category. An precise object created at runtime is known as for instance. A category, other than traits has some capabilities to carry out known as as strategies. For.e.g A category named “Food” has attributes like ‘price’, ‘quantity’. “Food” class has strategies like Serve_food(), bill_food().

Objects in Object Oriented Systems work together by means of messages.

Inheritance:- The major class or the foundation class is known as as a Base Class. Any class which is anticipated to have ALL properties of the bottom class together with its personal is known as as a Derived class. The means of deriving such a category is Derived class. For the “Food” class, a Derived class might be “Class Chinesefood”.
Abstraction:- Abstraction is creating fashions or lessons of some broad idea. Abstraction might be achieved by means of Inheritance and even Composition.
Encapsulation:- Encapsulation is a group of capabilities of a category and object. The “Food” class is an encapsulated type. It is achieved by specifying which class can use which members (non-public, public, protected) of an object.
Polymorphism:- Polymorphism means present in several kinds. Inheritance is an instance of Polymorphism. A base class exists in several kinds as derived lessons. Operator overloading is an instance of Polymorphism through which an operator might be utilized in several conditions.

What Is Difference Between Association, Aggregation And Inheritance Relationships?

Association:
An affiliation describes a bunch of hyperlinks with widespread construction and customary semantics.

Example:
An individual works for an organization. It is usually seem verb in the issue assertion. It is applied as a pointer or reference to an object

Aggregation:
An aggregation is the “a part of” relationship through which objects represents the elements in similar meeting. Aggregation often is the particular type of Association.

Example:
A Paragraph consists of many sentences. Here Paragraph comprises sentences.

Inheritance:
Inheritance is a relationship between a category and a number of redefined model of it. It is typically known as “is a relationship.

Explain The Features Of An Abstract Class In Net.

An Abstract class is only used for inheritance. This means it acts as a base class for its derived classes. One cannot use it to create objects. When a class is declared as “Abstract”, it can only be inherited and not instantiated. MustInherit Keyword can be used to declare a class as abstract. Abstract classes can also specify abstract members.

Difference Between Abstract Classes And Interfaces

Abstract classes:

  • An abstract class can implement methods.
  • An abstract class can inherit from a class and one or more interfaces.
  • An abstract class can contain fields.
  • An abstract class can implement a property.
  • An abstract class can contain constructors or destructors.
  • An abstract class cannot be inherited from by structures.

An abstract class cannot support multiple inheritance. interfaces:

  • An Interface cannot implement methods.
  • An Interface can only inherit from another Interface.
  • An Interface cannot contain fields.
  • An Interface can contain property definitions.
  • An Interface cannot contain constructors or destructors.
  • An Interface can be inherited from by structures.
  • An Interface can support multiple inheritance.

Similarities And Difference Between Class And Structure In .net

Similarities:

  • Both Class and Structures can have methods, variables and objects.
  • Both can have constructor.
  • Both are user defined types.

Differences:

  • Structure being value type, the variables cannot be assigned to NULL. On the other hand, classes being reference type, a class variable can be assigned to NULL.
  • Structure is allocated on a stack when instantiated, while Class is allocated on a heap.
  • When a method is passed to a class, pass by reference is used. Pass by value is used for struts.
  • A class can have a destructor.

Features Of Static/shared Classes.

Static classes are used when any change made to an object should not affect the data and functions of the class. They can be used to create data and functions without the need of an instance.

Following are features of Static/Shared classes:

  • They can not be instantiated. By default a object is created on the first method call to that object.
  • Static/Shared classes can not be inherited.
  • Static/Shared classes can have only static members.
  • Static/Shared classes can have only static constructor.

What Is Operator Overloading In .net?

Operator overloading is the most evident example of Polymorphism. In operator overloading, an operator is ‘overloaded’ or made to perform additional functions in addition to what it actually does. For e.g. we can overload the “+” operator to add two complex numbers or two imaginary numbers.

X= a + b //+ is overloaded to add two integers, float etc
Few operators like :: cannot be overloaded.

What Is Finalize Method In .net?

Object.Finalize method in .NET is typically used to clean and release unmanaged resources like OS files, window etc. Even though Garbage collector in .NET has the ability to determine the life time of such objects, however, with no knowledge how to clean them. The Finalize method allows an object to clean up such unmanaged resources when the garbage collector wishes to reclaim the memory. However, Finalize method should be avoided until necessary as it affects the performance because reclaiming the memory used by objects with Finalize methods requires at least two garbage collections.

What Are The Concepts Of Dispose Method?

Dispose method belongs to IDisposable interface. It is used to free unmanaged resources like files, network connection etc.

Concurrency With Aop?

Concurrency is the system’s ability to act with several requests simultaneously, such a way that threads don’t corrupt the state of objects when they gain access at the same time.

Transparent Caching With Aop ?

To get better results in terms of speed and resources used, it’s suggested to use a cache. We can store in it the results corresponding to the methods invocations as key-value pairs: method and arguments as key and return object as value.

Security With Aop?

Security is one of the most important elements of an application. The word “safety” covers two concepts: Authentication is the verifi cation’s process of a principal’s identity; a principal is typically a user. A principal in order to be authenticated provides a credential that is the password. Authorization, on the other hand, is the process of granting authorities, which are usually roles, to an authenticated user.

Aspect-oriented Programming?

Aspect Oriented Programming or AOP is an interesting concept that can be applied to many of the programming problems we solve everyday. In our Visual Studio team system code we have a lot of web-services and remoting code that essentially does the following

public void MyMethod(int parameter)
{
Trace.EnteredMethod(“MyMethod”, parameter);
SecurityCheck();
// Bunch of processing
Trace.ExitMethod(“MyMethod”);
}

What Is Manifest In .net?

Manifest is nothing but a simple text file used to store metadata information of different .NET assemblies. Manifest file can be saved as a stand alone file of type PE. It can also be stored as an exe or as a dll file containing intermediate language code.

What Is Garbage Collection? How To Force Garbage Collector To Run?

Garbage collection helps in releasing memory occupied by objects. CLR automatically releases these unused objects.

Explain Boxing And Unboxing In .net.

Boxing permits any value type to be implicitly converted to type object or to any interface type Implemented by value

What Is Native Image Generator (ngen.exe)?

Ngen.exe helps in improving performance of managed applications by creating native images and storing them on the.

Explain Clr In Brief.

CLR stands for Common Language Runtime.
The CLR is a development platform. It provides a runtime, defines functionality in some libraries, and supports a set of programming languages. The CLR provides a runtime so that the softwares can utilize its services. The CLR Base Class Library allows interaction with the runtime. The CLR supports various programming languages, several standards and is itself been submitted as an open standard.

Describe How A .net Application Is Compiled And Executed.

From the source code, the compiler generates Microsoft Intermediate Language (MSIL) which is further used for the creation of an EXE or DLL. The CLR processes these at runtime. Thus, compiling is the process of generating this MSIL.

The way you do it in .Net is as follows:
Right-click and select Build / Ctrl-Shift-B / Build menu, Build command
F5 – compile and run the application.
Ctrl+F5 – compile and run the application without debugging.

Compilation can be done with Debug or Release configuration. The difference between these two is that in the debug configuration, only an assembly is generated without optimization. However, in release complete optimization is performed without debug symbols.

Describe The Parts Of Assembly.

An assembly is a partially compiled code library. In .NET, an assembly is a portable executable and can be an EXE (process assembly) or a DLL (library assembly). An assembly can consist of one or more files or modules in various languages. It is used in deployment, versioning and security.

Overview Of Clr Integration.

The CLR (Common Language Runtime) integration is hosted in the Microsoft SQL Server 2005. With CLR integration, stored procedures, triggers, user- defined functions, user-defined types, and user-defined aggregates in managed code, etc can be written.

  • As managed code compiles to native code before executing, significant performance can be achieved.
  • The SQL Server acts as an operating system for the CLR when it is hosted inside SQL Server.
  • Following are the steps to build a CLR stored procedure in SQL Server 2005
  • Enable CLR integration in SQL Server 2005
  • Create a CLR stored procedure Assembly
  • Deploy the Assembly in SQL Server 2005
  • Create and execute the CLR stored procedure in SQL Server 2005

Clr Triggers?

A CLR trigger could be a Date Definition or Date Manipulation Language trigger or could be an AFTER or INSTEAD OF trigger.

Methods written in managed codes that are members of an assembly need to be executed provided the assembly is deployed in SQL 2005 using the CREATE assembly statement.

The Microsoft.SqlServer.Server Namespace contains the required classes and enumerations for this objective.

Steps For Creating Clr Trigger?

Follow these steps to create a CLR trigger of DML (after) type to perform an insert action:

  • Create a .NET class of triggering action.
  • Make an assembly (.DLL) from that Class.
  • Enable CLR environment in that database.
  • Register the assembly in SQL Server.
  • Create CLR Trigger using that assembly.

What Is A Clr (common Language Runtime)?

Common Language Runtime – It is the implementation of CLI. The core runtime engine in the Microsoft .NET Framework for executing applications. The common language runtime supplies managed code with services such as cross-language integration, code access security, object lifetime management, resouce management, type safety, pre-emptive threading, metadata services (type reflection), and debugging and profiling support. The ASP.NET Framework and Internet Explorer are examples of hosting CLR.

The CLR is a multi-language execution environment. There are currently over 15 compilers being built by Microsoft and other companies that produce code that will execute in the CLR.

The CLR is described as the “execution engine” of .NET. It’s this CLR that manages the execution of programs. It provides the environment within which the programs run. The software version of .NET is actually the CLR version.

When the .NET program is compiled, the output of the compiler is not an executable file but a file that contains a special type of code called the Microsoft Intermediate Language (MSIL, now called CIL, Common Intermediate Language). This MSIL defines a set of portable instructions that are independent of any specific CPU. It’s the job of the CLR to translate this Intermediate code into a executable code when the program is executed making the program to run in any environment for which the CLR is implemented. And that’s how the .NET Framework achieves Portability. This MSIL is turned into executable code using a JIT (Just In Time) complier. The process goes like this, when .NET programs are executed, the CLR activates the JIT complier. The JIT complier converts MSIL into native code on a demand basis as each part of the program is needed. Thus the program executes as a native code even though it is compiled into MSIL making the program to run as fast as it would if it is compiled to native code but achieves the portability benefits of MSIL.

Dot Net Programming Interview Questions And Answers

Explain The Concepts Of Cts And Cls(common Language Specification).

CTS
When different languages are integrated and want to communicate, it is certain that the languages have their own data types and different declaration styles. CTS define how these different variables are declared and used in run time. E.g. VB offers an Integer data type while C++ offers long data type. Using CTS, these data types are converted to System32 which itself a data type of CLS.

CLS
Any language(s) that intend to use the Common Language Infrastructure needs to communicate with other CLS-Compliant language. This communication is based on set of rules laid by CLS. These rules define a subset of CTS.

.net Framework

This includes introduction of .Net framework, .Net framework architecture, role of assembly and GAC.

How Do We Access Crystal Reports In .net?

When crystal reports are integrated with .NET, data can be accessed using ODBC drivers, ADO drivers, database files like excel, xml etc

What Are The Various Components In Crystal Reports?

When .NET application uses crystal reports, the following components are required: Report files: .rpt or report files needs to be distributed which can either be compiled into the application (Embedded) or independently (non embedded) from the application.

What Basic Steps Are Needed To Display A Simple Report In Crystal?

Crystal reports offer a report designer. First, select specific rows and columns from a table. Using the designer, the data on the report can be rearranged and formatted.

Asp.net 2.0 Themes

One of the neat features of ASP.NET 2.0 is themes, which enable you to define the appearance of a set of controls once and apply the appearance to your entire web application.

Should User Input Data Validation Occur Server-side Or Client-side? Why?

All user input data validation should occur on the server at a minimum. Additionally, client-side validation can be performed where deemed appropriate and feasable to provide a richer, more responsive experience for the user.

What’s A Bubbled Event?

When you have a complex control, like DataGrid, writing an event processing routine for each object (cell, button, row, etc.) is quite tedious. The controls can bubble up their eventhandlers, allowing the main DataGrid event handler to take care of its constituents.

What Is A Satellite Assembly?

When you write a multilingual or multi-cultural application in .NET, and want to distribute the core application separately from the localized modules, the localized assemblies that modify the core application are called satellite assemblies.

.net Code Security

This includes explanation of code security, Principal object, declarative and imperative security, role-based security, code access security and code group.

.net Assembly

This article explains .Net assembly, private and shared assembly, satellite assemblies, resource-only assembly, ResourceManager class, strong name, global assembly cache.

.net Debug & Trace

Here you can learn about break mode, options to step through code in .Net, Debug Vs Trace in .Net, trace class, listeners collection of Trace and Debug objects and Trace Switches.

Who Benefits From Ajax?

AJAX is employed to improve the user’s experience. A request is made for the initial page rendering. After that, asynchronous requests to the server are made. An asynchronous request is a background request to send or receive data in an entirely nonvisual manner.

What Is Asp.net Ajax?

ASP.NET AJAX, mostly called AJAX, is a set of extensions of ASP.NET. It is developed by Microsoft to implement AJAX functionalities in Web applications. ASP.NET AJAX provides a set of components that enable the developers to develop applications that can update only a specified portion of data without refreshing the entire page. The ASP.NET AJAX works with the AJAX Library that uses object-oriented programming (OOP) to develop rich Web applications that communicate with the server using asynchronous postback.

What Is .net?

.NET is a general-purpose software development platform, similar to Java. At its core is a virtual machine that turns intermediate language (IL) into machine code. High-level language compilers for C#, VB.NET and C++ are provided to turn source code into IL. C# is a new programming language, very similar to Java. An extensive class library is included, featuring all the functionality one might expect from a contempory development platform – windows GUI development (Windows Forms), database access (ADO.NET), web development (ASP.NET), web services, XML etc

What Versions Of .net Are There?

The final versions of the 1.0 SDK and runtime were made publicly available around &6pm PST on15-Jan-2002. At the same time, the final version of Visual Studio.NET was made available to MSDN subscribers.
.NET 1.1 was released in April 2003, and was mostly bug fixes for 1.0.
.NET 2.0 was released to MSDN subscribers in late October 2005, and was officially launched in early November

What Operating Systems Does The .net Framework Run On?

The runtime supports Windows Server 2003, Windows XP, Windows 2000, NT4 SP6a and Windows ME/98. Windows 95 is not supported. Some parts of the framework do not work on all platforms – for example, ASP.NET is only supported on XP and Windows 2000/2003. Windows 98/ME cannot be used for development

IIS is not supported on Windows XP Home Edition, and so cannot be used to host ASP.NET. However, the ASP.NET Web Matrix web server does run on XP Home.
The .NET Compact Framework is a version of the .NET Framework for mobile devices, running Windows CE or Windows Mobile. The Mono project has a version of the .NET Framework that runs on Linux.

What Tools Can I Use To Develop .net Applications?

There are a number of tools, described here in ascending order of cost:

  • The .NET Framework SDK is free and includes command-line compilers for C++, C#, and VB.NET and various other utilities to aid development.
  • SharpDevelop is a free IDE for C# and VB.NET.
  • Microsoft Visual Studio Express editions are cut-down versions of Visual Studio, for hobbyist or novice developers.There are different versions for C#, VB, web development etc. Originally the plan was to charge $49, but MS has decided to offer them as free downloads instead, at least until November 2006.
  • Microsoft Visual Studio Standard 2005 is around $300, or $200 for the upgrade.
  • Microsoft VIsual Studio Professional 2005 is around $800, or $550 for the upgrade
  • At the top end of the price range are the Microsoft Visual Studio Team Edition for Software Developers 2005 with MSDN Premium and Team Suite editions.

Why Did They Call It .net?

I don’t know what they were thinking. They certainly weren’t thinking of people using search tools. It’s meaningless marketing nonsense.

What Is The Cli? Is It The Same As The Clr?

The CLI (Common Language Infrastructure) is the definiton of the fundamentals of the .NET framework – the Common Type System (CTS), metadata, the Virtual Execution Environment (VES) and its use of intermediate language (IL), and the support of multiple programming languages via the Common Language Specification (CLS). The CLI is documented through ECMA –

The CLR (Common Language Runtime) is Microsoft’s primary implementation of the CLI. Microsoft also have a shared source implementation known as ROTOR, for educational purposes, as well as the .NET Compact Framework for mobile devices. Non-Microsoft CLI implementations includeMono and DotGNU Portable.NET.

What Is C#?

C# is a new language designed by Microsoft to work with the .NET framework. In their “Introduction to C#” whitepaper, Microsoft describe C# as follows:
“C# is a straightforward, trendy, object oriented, and type-safe programming language derived from C and C++. C# (pronounced “C sharp”) is firmly planted within the C and C++ household tree of languages, and can instantly be acquainted to C and C++ programmers. C# goals to mix the excessive productiveness of Visual Basic and the uncooked energy of C++.”
Substitute ‘Java’ for ‘C#’ in the quote above, and you’ll see that the statement still works pretty well.

What Is The Difference Between A Private Assembly And A Shared Assembly?

The terms ‘private’ and ‘shared’ refer to how an assembly is deployed, not any intrinsic attributes of the assembly.

A private assembly is normally used by a single application, and is stored in the application’s directory, or a sub-directory beneath. A shared assembly is intended to be used by multiple applications, and is normally stored in the global assembly cache (GAC), which is a central repository for assemblies. (A shared assembly can also be stored outside the GAC, in which case each application must be pointed to its location via a codebase entry in the application’s configuration file.) The main advantage of deploying assemblies to the GAC is that the GAC can support multiple versions of the same assembly side-by-side.

Assemblies deployed to the GAC must be strong-named. Outside the GAC, strong-naming is optional.

How Can I Develop An Application That Automatically Updates Itself From The Web?

For .NET 1.x, use the Updater Application Block. For .NET 2.x, use ClickOnce.

Can I Write My Own .net Host?

Yes. For an example of how to do this, take a look at the source for the dm.net moniker developed by Jason Whittington and Don Box. There is also a code sample in the .NET SDK called CorHost.

Is It True That Objects Don’t Always Get Destroyed Immediately When The Last Reference Goes Away?

Yes. The garbage collector offers no guarantees about the time when an object will be destroyed and its memory reclaimed.& There was an interesting thread on the DOTNET list, started by Chris Sells, about the implications of non-deterministic destruction of objects in C#. In October 2000, Microsoft’s Brian Harry posted a lengthy analysis of the problem. Chris Sells’ response to Brian’s posting is here.

Should I Implement Finalize On My Class? Should I Implement Idisposable?

This issue is a little more complex than it first appears. There are really two categories of class that require deterministic destruction – the first category manipulate unmanaged types directly, whereas the second category manipulate managed types that require deterministic destruction. An example of the first category is a class with an IntPtr member representing an OS file handle. An example of the second category is a class with a System.IO.FileStream member.

For the first category, it makes sense to implement IDisposable and override Finalize. This allows the object user to ‘do the right thing’ by calling Dispose, but also provides a fallback of freeing the unmanaged resource in the Finalizer, should the calling code fail in its duty. However this logic does not apply to the second category of class, with only managed resources. In this case implementing Finalize is pointless, as managed member objects cannot be accessed in the Finalizer. This is because there is no guarantee about the ordering of Finalizer execution. So only the Dispose method should be implemented. (If you think about it, it doesn’t really make sense to call Dispose on member objects from a Finalizer anyway, as the member object’s Finalizer will do the required cleanup.)

For classes that need to implement IDisposable and override Finalize, see Microsoft’s documented pattern.

Note that some developers argue that implementing a Finalizer is always a bad idea, as it hides a bug in your code (i.e. the lack of a Dispose call). A less radical approach is to implement Finalize but include a Debug.Assert at the start, thus signalling the problem in developer builds but allowing the cleanup to occur in release builds.

Do I Have Any Control Over The Garbage Collection Algorithm?

A little. For example the System.GC class exposes a Collect method, which forces the garbage collector to collect all unreferenced objects immediately.

Also there is a gcConcurrent setting that can be specified via the application configuration file. This specifies whether or not the garbage collector performs some of its collection activities on a separate thread. The setting only applies on multi-processor machines, and defaults to true.

How Can I Find Out What The Garbage Collector Is Doing?

Lots of interesting statistics are exported from the .NET runtime via the ‘.NET CLR xxx’ performance counters. Use Performance Monitor to view them.

What Is The Lapsed Listener Problem?

The lapsed listener problem is one of the primary causes of leaks in .NET applications. It occurs when a subscriber (or ‘listener’) signs up for a publisher’s event, but fails to unsubscribe. The failure to unsubscribe means that the publisher maintains a reference to the subscriber as long as the publisher is alive. For some publishers, this may be the duration of the application.

This situation causes two problems. The obvious problem is the leakage of the subscriber object. The other problem is the performance degredation due to the publisher sending redundant notifications to ‘zombie’ subscribers.

There are at least a couple of solutions to the problem. The simplest is to make sure the subscriber is unsubscribed from the publisher, typically by adding an Unsubscribe() method to the subscriber. Another solution, documented here by Shawn Van Ness, is to change the publisher to use weak references in its subscriber list.

I Want To Serialize Instances Of My Class. Should I Use Xmlserializer, Soapformatter Or Binaryformatter?

It depends. XmlSerializer has severe limitations such as the requirement that the target class has a parameterless constructor, and only public read/write properties and fields can be serialized. However, on the plus side, XmlSerializer has good support for customising the XML document that is produced or consumed. XmlSerializer’s features mean that it is most suitable for cross-platform work, or for constructing objects from existing XML documents.

SoapFormatter and BinaryFormatter have fewer limitations than XmlSerializer. They can serialize private fields, for example. However they both require that the target class be marked with the [Serializable] attribute, so like XmlSerializer the class needs to be written with serialization in mind. Also there are some quirks to watch out for – for example on deserialization the constructor of the new object is not invoked.

The choice between SoapFormatter and BinaryFormatter depends on the application.

BinaryFormatter makes sense where both serialization and deserialization will be performed on the .NET platform and where performance is important. SoapFormatter generally makes more sense in all other cases, for ease of debugging if nothing else.

Xmlserializer Is Throwing A Generic “there Was An Error Reflecting Myclass” Error. How Do I Find Out What The Problem Is?

Look at the InnerException property of the exception that is thrown to get a more specific error message.

What Is Code Access Security (cas)?

CAS is the part of the .NET security model that determines whether or not code is allowed to run, and what resources it can use when it is running. For example, it is CAS that will prevent a .NET web applet from formatting your hard disk.

How Does Cas Work?

The CAS security policy revolves around two key concepts – code groups and permissions. Each .NET assembly is a member of a particular code group, and each code group is granted the permissions specified in a named permission set.

For example, using the default security policy, a control downloaded from a web site belongs to the ‘Zone – Internet’ code group, which adheres to the permissions defined by the ‘Internet’ named permission set. (Naturally the ‘Internet’ named permission set represents a very restrictive range of permissions.)

I’m Having Some Trouble With Cas. How Can I Troubleshoot The Problem?

Caspol has a couple of options that might help. First, you can ask caspol to tell you what code group an assembly belongs to, using caspol -rsg. Similarly, you can ask what permissions are being applied to a particular assembly using caspol -rsp

I Can’t Be Bothered With Cas. Can I Turn It Off?

Yes, as long as you are an administrator. Just run:
caspol -s off

Can I Look At The Il For An Assembly?

Yes. MS supply a tool called Ildasm that can be used to view the metadata and IL for an assembly.

Can Source Code Be Reverse-engineered From Il?

Yes, it is often relatively straightforward to regenerate high-level source from IL. Lutz Roeder’sReflector does a very good job of turning IL into C# or VB.NET.

How Can I Stop My Code Being Reverse-engineered From Il?

You can buy an IL obfuscation tool. These tools work by ‘optimising’ the IL in such a way that reverse-engineering becomes much more difficult
Of course if you are writing web services then reverse-engineering is not a problem as clients do not have access to your IL.

Can I Do Things In Il That I Can’t Do In C#?

Yes. A couple of simple examples are that you can throw exceptions that are not derived from System.Exception, and you can have non-zero-based arrays.

Does .net Replace Com?

.NET has its own mechanisms for type interaction, and they don’t use COM. No IUnknown, no IDL, no typelibs, no registry-based activation. This is mostly good, as a lot of COM was ugly. Generally speaking, .NET allows you to package and use components in a similar way to COM, but makes the whole thing a bit easier.

Is Dcom Dead?

Pretty much, for .NET developers. The .NET Framework has a new remoting model which is not based on DCOM. DCOM was pretty much dead anyway, once firewalls became widespread and Microsoft got SOAP fever. Of course DCOM will still be used in interop scenarios.

Is Com+ Dead?

Not immediately. The approach for .NET 1.0 was to provide access to the existing COM+ services (through an interop layer) rather than replace the services with native .NET ones. Various tools and attributes were provided to make this as painless as possible. Over time it is expected that interop will become more seamless – this may mean that some services become a core part of the CLR, and/or it may mean that some services will be rewritten as managed code which runs on top of the CLR.

Can I Use Com Components From .net Programs?

Yes. COM components are accessed from the .NET runtime via a Runtime Callable Wrapper (RCW). This wrapper turns the COM interfaces exposed by the COM component into .NET-compatible interfaces. For oleautomation interfaces, the RCW can be generated automatically from a type library. For non-oleautomation interfaces, it may be necessary to develop a custom RCW which manually maps the types exposed by the COM interface to .NET-compatible types.

Can I Use .net Components From Com Programs?

Yes. .NET components are accessed from COM via a COM Callable Wrapper (CCW). This is similar to a RCW (see previous question), but works in the opposite direction. Again, if the wrapper cannot be automatically generated by the .NET development tools, or if the automatic behaviour is not desirable, a custom CCW can be developed. Also, for COM to ‘see’ the .NET component, the .NET component must be registered in the registry.

Is Atl Redundant In The .net World?

Yes. ATL will continue to be valuable for writing COM components for some time, but it has no place in the .NET world.

How Do I Stop A Thread?

There are several options. First, you can use your own communication mechanism to tell the ThreadStart method to finish. Alternatively the Thread class has in-built support for instructing the thread to stop. The two principle methods are Thread.Interrupt() and Thread.Abort(). The former will cause a Thread Interrupted Exception to be thrown on the thread when it next goes into a WaitJoinSleep state. In other words, Thread.Interrupt is a polite way of asking the thread to stop when it is no longer doing any useful work. In contrast, Thread.Abort() throws a ThreadAbortException regardless of what the thread is doing. Furthermore, the ThreadAbortException cannot normally be caught (though the ThreadStart’s finally method will be executed). Thread.Abort() is a heavy-handed mechanism which should not normally be required.

Asp Dot Net Interview Questions And Answers For Experienced

How Do I Know When My Thread Pool Work Item Has Completed?

There is no way to query the thread pool for this information. You must put code into the WaitCallback method to signal that it has completed. Events are useful for this.

Should I Use Readerwriterlock Instead Of Monitor.enter/exit?

Maybe, but be careful. ReaderWriterLock is used to allow multiple threads to read from a data source, while still granting exclusive access to a single writer thread. This makes sense for data access that is mostly read-only, but there are some caveats. First, ReaderWriterLock is relatively poor performing compared to Monitor. Enter/Exit, which offsets some of the benefits. Second, you need to be very sure that the data structures you are accessing fully support multithreaded read access. Finally, there is apparently a bug in the v1.1 Reader Writer Lock that can cause starvation for writers when there are a large number of readers. Ian Griffiths has some interesting discussion on Reader Writer Lock here and here.

Tracing . Is There Built-in Support For Tracing/logging?

Yes, in the System.Diagnostics namespace. There are two main classes that deal with tracing – Debug and Trace. They both work in a similar way – the difference is that tracing from the Debug class only works in builds that have the DEBUG symbol defined, whereas tracing from the Trace class only works in builds that have the TRACE symbol defined. Typically this means that you should use System.Diagnostics.Trace.WriteLine for tracing that you want to work in debug and release builds, and System. Diagnostics. Debug. WriteLine for tracing that you want to work only in debug builds.

Can I Redirect Tracing To A File?

Yes. The Debug and Trace classes both have a Listeners property, which is a collection of sinks that receive the tracing that you send via Debug.WriteLine and Trace.WriteLine respectively. By default the Listeners collection contains a single sink, which is an instance of the DefaultTraceListener class. This sends output to the Win32 OutputDebugString() function and also the System.Diagnostics.Debugger.Log() method. This is useful when debugging, but if you’re trying to trace a problem at a customer site, redirecting the output to a file is more appropriate. Fortunately, the TextWriterTraceListener class is provided for this purpose.Here’s how to use the Text Writer Trace Listener class to redirect Trace output to a file:

Trace.Listeners.Clear();
FileStream fs = new FileStream( @”c:\log.txt”, FileMode. Create, FileAccess.Write);
Trace.Listeners.Add( new TextWriterTraceListener( fs ));
Trace.WriteLine( @”This might be writen to c:\log.txt!” );
Trace.Flush();

Note the use of Trace.Listeners.Clear() to remove the default listener. If you don’t do this, the output will go to the file and OutputDebugString(). Typically this is not what you want, because OutputDebugString() imposes a big performance hit.

Are There Any Third Party Logging Components Available?

Log4net is a port of the established log4j Java logging component.

Miscellaneous. How Does .net Remoting Work?

.NET remoting involves sending messages along channels. Two of the standard channels are HTTP and TCP. TCP is intended for LANs only-HTTP can be used for LANs or WANs (internet). Support is provided for multiple message serializarion formats. Examples are SOAP (XML-based) and binary. By default, the HTTP channel uses SOAP (via the .NET runtime Serialization SOAP Formatter), and the TCP channel uses binary (via the .NET runtime Serialization Binary Formatter). But either channel can use either serialization format.

There are a number of styles of remote access:

  • SingleCall. Each incoming request from a client is serviced by a new object. The object is thrown away when the request has finished.
  • Singleton. All incoming requests from clients are processed by a single server object.
  • Client-activated object. This is the old stateful (D)COM model whereby the client receives a reference to the remote object and holds that reference (thus keeping the remote object alive) until it is finished with it.

Distributed garbage collection of objects is managed by a system called ‘leased based lifetime’. Each object has a lease time, and when that time expires the object is disconnected from the .NET runtime remoting infrastructure. Objects have a default renew time – the lease is renewed when a successful call is made from the client to the object. The client can also explicitly renew the lease.If you’re interested in using XML-RPC as an alternative to SOAP, take a look at Charles Cook’s XML-RPC.Net.

When Should You Call The Garbage Collector In .net?

As a good rule, you should not call the garbage collector. However, you could call the garbage collector when you are done using a large object (or set of objects) to force the garbage collector to dispose of those very large objects from memory. However, this is usually not a good practice.

What Is The Difference Between An Event And A Delegate?

An event is just a wrapper for a multicast delegate. Adding a public event to a class is almost the same as adding a public multicast delegate field. In both cases, subscriber objects can register for notifications, and in both cases the publisher object can send notifications to the subscribers. However, a public multicast delegate has the undesirable property that external objects can invoke the delegate, something we’d normally want to restrict to the publisher. Hence events – an event adds public methods to the containing class to add and remove receivers, but does not make the invocation mechanism public. See this post by Julien Couvreur for more discussion.

What Size Is A .net Object?

Each instance of a reference type has two fields maintained by the runtime – a method table pointer and a sync block. These are 4 bytes each on a 32-bit system, making a total of 8 bytes per object overhead. Obviously the instance data for the type must be added to this to get the overall size of the object. So, for example, instances of the following class are 12 bytes each:
class MyInt
{

private int x;
}
However, note that with the current implementation of the CLR there seems to be a minimum object size of 12 bytes, even for classes with no data (e.g. System.Object). Values types have no equivalent overhead.

Will My .net App Run On 64-bit Windows?

64-bit (x64) versions of Windows support both 32-bit and 64-bit processes, and corresponding 32-bit and 64-bit versions of .NET 2.0. (.NET 1.1 is 32-bit only)..NET 1.x apps automatically run as 32-bit processes on 64-bit Windows..NET 2.0 apps can either run as 32-bit processes or as 64-bit processes. The OS decides which to use based on the PE header of the executable. The flags in the PE header are controlled via the compiler /platform switch, which allows the target of the app to be specified as ‘x86’, ‘x64’ or ‘any cpu’. Normally you specify ‘any cpu’, and your app will run as 32-bit on 32-bit Windows and 64-bit on 64-bit Windows. However if you have some 32-bit native code in your app (loaded via COM interop, for example), you will need to specify ‘x86’, which will force 64-bit Windows to load your app in a 32-bit process. You can also tweak the 32-bit flag in the PE header using the SDK corflags utility.

.net 2.0 What Are The New Features Of .net 2.0?

Generics, anonymous methods, partial classes, iterators, property visibility (separate visibility for get and set) and static classes.

What’s New In The .net 2.0 Class Library?

Answer :

Here is a selection of new features in the .NET 2.0 class library:

  • Generic collections in the System.Collections.Generic namespace.
  • The System.Nullable type. (Note that C# has special syntax for this type, e.g. int? is equivalent to Nullable)
  • The GZipStream and DeflateStream classes in the System.IO.Compression namespace.
  • The Semaphore class in the System.Threading namespace.
  • Wrappers for DPAPI in the form of the ProtectedData and Protected Memory classes in the System. Security. Cryptography namespace.
  • The IPC remoting channel in the System. Runtime. Remoting. Channels.Ipc namespace, for optimised intra-machine communication.

What Is Ajax?

Ajax stands for Asynchronous Javascript & XML. It is a web technology through which a postback from a client (browser) to the server goes partially, which means that instead of a complete postback, a partial postback is triggered by the Javascript XmlHttpRequest object. In such a scenario, web-application users won’t be able to view the complete postback progress bar shown by the browser. In an AJAX environment, it is Javascript that starts the communication with the web server.

Ajax technology in a website may be implemented by using plain Javascript and XML. Code in such a scenario may tend to look little complex, for which the AJAX Framework in .NET can be embedded in ASP.NET web applications.In addition to XML & Javascript, AJAX is also based on DOM-the Document Object Model technology of browsers through which objects of the browser can be accessed through the memory heap using their address. JSON-Javascript Object Notation is also one of the formats used in AJAX, besides XML.

So basically, in an AJAX-based web application, the complete page does not need to reload, and only the objects in context of ajaxification are reloaded. Ajax technology avoids the browser flickering

Can Ajax Be Implemented In Browsers That Do Not Support The Xmlhttprequest Object?

Yes. This is possible using remote scripts.

Can Ajax Technology Work On Web Servers Other Than Iis?

Yes, AJAX is a technology independent of web server the web application is hosted on. Ajax is a client (browser) technology.

Which Browsers Support The Xmlhttprequest Object?

Internet Explorer 5.0+, Safari 1.2, Mozilla 1.0/Firefox, Opera 8.0 +, Netscape 7

What Are Ajax Extensions?

The ASP.NET Ajax Extensions are set of Ajax-based controls that work in ASP.NET 2 (or above) based applications.

Ofcourse,they also need the Ajax runtime which is actually the Ajax Framework 1.0.

ASP.NET Ajax Extensions 1.0 have to be downloaded to run with ASP.NET 2.0

The new ASP.NET 3.5 Framework comes with the Ajax Library 3.5 (containing the Ajax Extensions 3.5). So in order to use the latest Ajax, simply download .NET 3.5 Framework.

Summary:
ASP.NET Ajax Extensions 1.0 -> For ASP.NET 2.0
ASP.NET Ajax Extensions 3.5 -> For ASP.NET 3.5

What Is Dojo?

Dojo is a third-party javascript toolkit for creating rich featured applications. Dojo is an Open Source DHTML toolkit written in JavaScript. It builds on several contributed code bases (nWidgets, Burstlib, f(m)), which is why we refer to it sometimes as a “unified” toolkit. Dojo aims to solve some long-standing historical problems with DHTML which prevented mass adoption of dynamic web application development.

How To Handle Multiple Or Concurrent Requests In Ajax?

For concurrent requests, declare separate XmlHttpRequest objects for each request. For example, for request to get data from an SQL table1, use something like this.
xmlHttpObject1.Onreadystatechange = functionfromTable1();
and to get data from another table (say table2) at the same time, use
xmlHttpObject2.Onreadystatechange = functionfromTable2();
Ofcourse, the XmlHttpObject needs to be opened & parameters passed too, like as shown below…
xmlHTTPObject1.open(“GET”,”http://”localhost// ” + “Website1/ Default1.aspx” true);
Note that the final parameter “true” used above implies that processing shall stick with it with out ready for any response from the online server. If it’s false, the perform shall watch for a response.

What Is The Role Of Scriptmanager In Ajax?

ScriptSupervisor class is the center of ASP.NET Ajax. Before elaborating extra on ScriptSupervisor, word thatScriptSupervisor is class and a management (each) in Ajax.

The ScriptSupervisor class in ASP.NET manages Ajax Script Libraries, partial web page rendering performance and shopper proxy class era for internet purposes and providers. By saying shopper proxy class, this implies an occasion of the Ajax runtime is created on the browser.

This class is outlined within the System.Web.Extensions.dll. You will discover this DLL in your system’s Global Assembly Cache at C:\Windows\Assembly (For XP)

The ScriptSupervisor management (that we might drag on an online type) is definitely an occasion of the ScriptSupervisor class that we placed on an online web page. The ScriptSupervisor manages all of the ASP.NET Ajax controls on an online web page. Following duties are taken care by the ScriptSupervisor class:

  • Managing all assets (all objects/controls) on an online web page
  • Download Ajax Script Library to the shopper (means to the browser). This must occur in order that Ajax engine is accessible to the browsers javascript code.
  • Interacting with UpdatePanel Control, UpdateProgress Control.
  • Register script (utilizing RegisterClientScriptBlock)
  • Information whether or not Release OR Debug script is shipped to the browser
  • Providing entry to Web service strategies from the script by registering Web providers with the ScriptSupervisor management
  • Providing entry to ASP.NET authentication, function, and profile software providers from shopper script after registering these providers with the ScriptSupervisor management
  • Enable tradition particular show of clientside script.
  • Register server controls that implement IExtenderControl and IScriptControl interfaces.

ScriptSupervisor class’ EnablePartialRendering property is true by default.

Can We Override The Enablepartialrendering Property Of The Scriptmanager Class?

Yes. But this must be executed earlier than the init occasion of the web page (or throughout runtime after the web page has already loaded). Otherwise an InlegitimateOperationException might be thrown.

How To Use Multiple Scriptmanager Controls In A Web Page?

No. It isn’t attainable to make use of a number of ScriptSupervisor management in an online web page. In reality, any such requirement by no means is available in as a result of a single ScriptSupervisor management is sufficient to deal with the objects of an online web page.

Whats The Difference Between Registerclientscriptblock, Registerclientscriptinclude And Registerclientscriptresource?

  • For all three, a script factor is rendered after the opening type tag. Following are the variations:
  • RegisterClientScriptBlock – The script is specified as a string parameter.
  • RegisterClientScriptInclude – The script content is specified by setting the src attribute to a URL that factors to a script file.
  • RegisterClientScriptResource – The script content is specified with a useful resource title in an meeting. The src attribute is robotically populated with a URL by a name to an HTTP handler that retrieves the named script from the meeting.

What Are Type/key Pairs In Client Script Registration? Can There Be 2 Scripts With The Same Type/key Pair Name?

When a script is registered by the ScriptSupervisor class, a sort/key pair is created to uniquely determine the script.

For identification functions, the sort/key pair title is at all times distinctive for dentifying a script. Hence, there could also be no duplication in sort/key pair names.

What Are The Modes Of Updation In An Updatepanel? What Are Triggers Of An Updatepanel?

An UpdatePanel has a property known as UpdateMode. There are two attainable values for this property:

  • Always
  • Conditional

If the UpdateMode property is about to “Always”, the UpdatePanel management’s content is up to date on every postback that begins from anyplace on the webpage. This additionally contains asynchronous postbacks from controls which might be inside different UpdatePanel controls, and postbacks from controls which aren’t inside UpdatePanel controls.

If the UpdateMode property is about to Conditional, the UpdatePanel management’s content is up to date when one of many following is true:

  • When the postback is brought on by a set off for that UpdatePanel management.
  • When you explicitly name the UpdatePanel management’s Update() technique.
  • When the UpdatePanel management is nested inside one other UpdatePanel management and the dad or mum panel is up to date.

When the ChildrenAsTriggers property is about to true and any little one management of the UpdatePanel management causes a postback. Child controls of nested UpdatePanel controls don’t trigger an replace to the outer UpdatePanel management until they’re explicitly outlined as triggers for the dad or mum panel.

Controls outlined inside a node have the aptitude to replace the contents of an UpdatePanel.

If the ChildrenAsTriggers property is about to false and the UpdateMode property is about to Always, an exception is thrown. The ChildrenAsTriggers property is meant for use solely when the UpdateMode property is about to Conditional.

How To Control How Long An Ajax Request May Last?

Use the ScriptSupervisor’s AsyncPostBackTimeout Property.

For instance, if you wish to debug an online web page however you get an error that the web page request has timed out, you could set <asp:scriptmanager id=”ScriptManager1 ” runat=” server” asyncpost backtimeout=”9000 “></asp: script supervisor>

the place the worth specified is in seconds.

What Is Asp.web Futures?

ASP.NET AJAX Futures

The new launch contains assist for managing browser historical past (Back button assist), deciding on components by CSS selectors or lessons, and knowledge on accessing “Astoria” Web information providers. The Futures (July 2007) launch provides:

History assist for the Safari browser, inclusion of “titles”, encoding and encrypting of server-side historical past state and the power to deal with historical past within the shopper with out a server requirement.

CSS Selectors APIs have been modified to be relevant to W3C suggestions.

A script useful resource extraction instrument that means that you can create script information on disk that originate from embedded assets in assemblies. Important: this model of the browser historical past function is now outdated and shouldn’t be used. Instead, please obtain the ASP.NET 3.5 Extensions Preview, which comprises the brand new model.

What Are Limitations Of Ajax?

  • An Ajax Web Application tends to confused finish customers if the community bandwidth is sluggish, as a result of there isn’t any full postback operating. However, this confusion could also be eradicated by utilizing an UpdateProgress management in tandem.
  • Distributed purposes operating Ajax will want a central mechanism for speaking with one another.

How To Trigger A Postback On An Updatepanel From Javascript?

Call the __doPostBack perform. ASP.NET runtime at all times creates a javascript perform named __doPostBack(eventTarget, eventArgument) when the online web page is rendered. A management ID could also be handed right here to particularly invoke updation of the UpdatePanel.

Which Request Is Better With Ajax, Get Or Post?

AJAX requests ought to use an HTTP GET request whereas retrieving information the place the info doesn’t change for a given URL requested. An HTTP POST needs to be used when state is up to date on the server. This is in keeping with HTTP idempotency suggestions and is extremely advisable for a constant internet software structure.

What Is The Asp.web Ajax Framework? What Versions Have Been Released So Far?

ASP.NET AJAX is a free framework to implement Ajax in asp.web internet purposes, for shortly creating environment friendly and interactive Web purposes that work throughout all in style browsers.

The Ajax Framework is powered with

  • Reusable Ajax Controls.
  • Support for all trendy browsers.
  • Access distant providers and information from the browser with out tons of sophisticated script.

Versions of Ajax launch

  • ASP.NET Ajax Framework 1.0 (earlier launch to this was known as the Atlas)
  • ASP.NET Ajax Framework 1.Zero was obtainable as a separate obtain for ASP.NET 2.0

What Is The Asp.web Control Toolkit?

Besides the Ajax Framework (which is the Ajax engine) and Ajax Extensions (which comprise the default Ajax controls), there’s a toolkit known as the Ajax Control Toolkit obtainable to be used & obtain (free of charge). This is a group of wealthy featured, extremely interactive controls, created as a three way partnership between Microsoft & the Developer Community.

How To Create An Ajax Website Using Visual Studio?

Using Visual Studio Web Developer Express 2005 & variations above it, Ajax based mostly purposes might simply be created. Note that the Ajax Framework & Ajax Extensions needs to be put in (In case of VS 2005). If utilizing Visual Studio 2008 Web Developer Express or above, Ajax comes together with it (so no want of a separate set up).

Dot Net Developer Interview Questions And Answers

How To Make Sure That Contents Of An Updatepanel Update Only When A Partial Postback Takes Place (and Not On A Full Postback)?

Make use of ScriptSupervisor.IsInAsyncPostBack property (returns a boolean worth)

What Are The Requirements To Run Asp.web Ajax Applications On A Server?

You would want to put in ‘ASP.NET AJAX Extensions’ in your server. If you’re utilizing the ASP.NET AJAX Control toolkit, then you definately would additionally want so as to add the AjaxControlToolkit.dll within the /Bin folder.

Explain The Updatepanel?

The UpdatePanel allows you to add AJAX performance to present ASP.NET purposes. It can be utilized to replace content in a web page by utilizing Partial-page rendering. By utilizing Partial-page rendering, you’ll be able to refresh solely a specific a part of the web page as an alternative of refreshing the entire web page with a postback.

Can I Use Asp.web Ajax With Any Other Technology Apart From Asp.web?

To reply this query, try this instance of utilizing ASP.NET AJAX with PHP, to exhibit operating ASP.NET AJAX exterior of ASP.NET. Client-Side ASP.NET AJAX framework can be utilized with PHP and Coldfusion.

Difference Between Server-side Ajax Framework And Client-side Ajax Framework?

ASP.NET AJAX comprises each a server-side Ajax framework and a client-side Ajax framework. The server-side framework offers builders with a simple strategy to implement Ajax performance, with out having to own a lot information of JavaScript. The framework contains server controls and elements and the drag and drop performance. This framework is normally most well-liked when it is advisable to shortly ajaxify an asp.web software. The drawback is that you just nonetheless want a spherical journey to the server to carry out a client-side motion.

The Client-Side Framework means that you can construct internet purposes with wealthy user-interactivity as that of a desktop software. It comprises a set of JavaScript libraries, which is impartial from ASP.NET. The library is getting wealthy in performance with each new construct launched.

How Can You Debug Asp.web Ajax Applications?

Explain about two instruments helpful for debugging: Fiddler for IE and Firebug for Mozilla.

Can We Call Server-side Code (c# Or Vb.web Code) From Javascript?

Yes. You can accomplish that utilizing PageMethods in ASP.NET AJAX or utilizing webservices.

Can You Nest Updatepanel Within Each Other?

Yes, you are able to do that. You would wish to nest replace panels to principally have extra management over the Page Refresh.

How Can You To Add Javascript To A Page When Performing An Asynchronous Postback?

Use the ScriptSupervisor class. This class comprises a number of strategies just like the RegisterStartupScript(), Register Client ScriptBlock(), Register Client Script Include(), Register Array Declaration(), Register Client Script Resource(), Register Expand oAttribute(), Register On SubmitStatement() which helps so as to add javascript whereas performing an asynchronous postback.

Explain Differences Between The Page Execution Lifecycle Of An Asp.web Page And An Asp.web Ajax Page?

In an asynchronous mannequin, all of the server facet occasions happen, as they do in a synchronous mannequin. The Microsoft AJAX Library additionally raises shopper facet occasions. However when the web page is rendered, asynchronous postback renders solely the contents of the replace panel, the place as in a synchronous postback, the complete web page is recreated and despatched again to the browser.

Is The Asp.web Ajax Control Toolkit(ajaxcontroltoolkit.dll) Installed In The Global Assembly Cache?

No. You should copy the AjaxControlToolkit.dll meeting to the /Bin folder in your software.

What Role “#&&” Plays In A Querysting?

# works as a fraction delimeter in a querysting. With which you’ll be able to delimit historical past state.
While && preceeds, state data in question string.

Is There Any Property Names “isnavigating”?

Yes, it’s obtainable when you’re managing browser historical past. With this property of “IsNavigating”, you possibly can decide if postback is occurred for navigation function or for another. Its set to true if its navigation name.

Tell Name Of All The Control Of Ajax?

There are 5 controls.

  • ScriptManager
  • UpdatePanel
  • UpdateProgress
  • Timer
  • ScriptHandleProxy

If There Are Multiple Update Panels On The Page Say Upd1 And Upd2. There Is A Button Placed In Upd1. How Can You Stop Upd2 To Update When Button Placed In Upd1 Is Clicked?

There is a property known as UpdateMode which takes two values

  • Always : Default worth of this property.
  • Conditional

When set to conditional, then that updatepanel’s content solely will get up to date when management positioned in that replace panel does a postback. Control positioned in different replace panel is not going to have an effect on this updatepanel.

How Many Types Of Triggers Are There In Update Panel?

There are 2 varieties of triggers.

  • PostBackTrigger: It does a full postback. This is helpful when any such management which positioned inside replacePanel but it surely can’t work asynchronously. Like File Upload Control.
  • AsyncPostBackTrigger: It does partial post again asynchronously.

What Is The Displayafter Property In Updateprogress Control?

Displayafter property specifies after what number of seconds the loading picture must be displayed in ajax postback. It takes values in seconds.

Is It Compulsory To Have Script Manager On The Page When You Are Using Any Control Of Ajax Control Tool Kit?

Yes. Page must have a script supervisor for ajax management instrument package controls to work.

Which Property Needs To Be Set For Script Manager Control To Extend The Time Before Throwing Time Out Expection If No Response Is Received From The Server?

AsyncPost AgainTimeout Property must set which will get or units a worth that signifies the time, in seconds, earlier than asynchronous postback day trip if no response is obtained from the server.

<asp :script supervisor id = “script Manager1” runat = “server” async = “” postback = “” error = “” message = “We can not serve your request at this moment.Please try later.” asyncpost again timeout = “36000” > < /asp :script supervisor >

The default worth of this property is 90 second. We also can set the person outlined error message utilizing asyncpostbackerrormessage property (as proven in above code) for day trip.

To Create Browser History Point Using Client Script, We Make Call Method

Sys.Application.addHistoryPoint. This technique is used whereas including historical past level to browser stack.

Default Value Of Enablehistory Attribute In Scriptmanager Is,

False

What Is A Design Pattern?

Design Pattern is a re-usable, prime quality resolution to a given requirement, activity or recurring drawback. Further, it doesn’t comprise of an entire resolution that could be immediately transformed to a code element, fairly it supplies a framework for how one can resolve an issue.

In 1994, the discharge of the e-book Design Patterns, Elements of Reusable Object Oriented Software made design patterns in style.

Because design patterns encompass confirmed reusable architectural ideas, they’re dependable and so they pace up software program growth course of.

Design Patterns are in a continious section of evolution, which implies that they carry on getting higher & higher as they’re examined towards time, reliability and subjected to continious enhancements. Further, design patterns have advanced in the direction of focusing on particular domains. For instance, windows-based banking functions are normally primarily based on singleton patterns, e-commerce internet functions are primarily based on the MVC (Model-View-Controller) sample.

Design Patterns are categorized into Three sorts:

  • Creational Patterns
  • Structural Patterns
  • Behavioral Patterns

What Are Creational Design Patterns?

The Creational Design Patterns concentrate on how objects are created and utilized in an software. They deal with the features of when and the way objects are created, protecting in thoughts whats the easiest way these objects needs to be created.

Listed beneath are a few of the generally recognized Creational Design Patterns:

  • Abstract Factory Pattern
  • Factory Pattern
  • Builder Pattern
  • Lazy Pattern
  • Prototype Pattern
  • Singleton Pattern

Whats The Difference Between Abstract Factory Pattern And Factory Pattern?

In an summary manufacturing unit design, a framework is supplied for creating sub-components that inherit from a typical element. In .NET, that is achieved by creating courses that implement a typical interface or a set of interfaces, the place the interface includes of the generic technique declarations which are handed on to the sub-components. TNote that not simply interfaces, however even summary courses can present the platform of making an software primarily based on the summary manufacturing unit sample.

Example, say a category known as CentralGovernmentRules is the summary manufacturing unit class, comprised of strategies like Should Have Police() and Should Have Courts(). There could also be a number of sub-classes like State1Rules, State2Rules and so on. created that inheriting the category CentralGovernmentRules, and thus deriving its strategies as properly.

Note that the time period “Factory” refers back to the location within the code the place the code is created.

A Factory Pattern is once more an Object creation sample. Here objects are created with out realizing the category of the item. Sounds unusual? Well, truly which means the item is created by a way of the category, and never by the category’s constructor. So mainly the Factory Pattern is used wherever sub courses are given the priviledge of instantiating a way that may create an object.

Describe The Builder Design Pattern

In a builder design sample, an object creation course of is separated from the item design assemble. This is helpful becuase the identical technique that offers with development of the item, can be utilized to assemble completely different design constructs.

What Is The Lazy Design Pattern?

The method of the Lazy Design Pattern is to not create objects till a selected requirement matches, and when it matches, object creation is triggered. A easy instance of this sample is a Job Portal software. Say you register your self in that website thus filling up the registration desk, solely when the registration desk is stuffed, the opposite objects are created and invoked, that immediate you to fill in different particulars too, which can be saved in different tables.

What Is The Prototype Design Pattern?

A prototype design sample depends on creation of clones fairly than objects. Here, we keep away from utilizing the key phrase ‘new’ to stop overheads.

What Is The Singleton Design Pattern?

The Singleton design sample is predicated on the idea of proscribing the instantiation of a category to 1 object. Say one object must carry out the position of a coordinator between numerous situations of the appliance that rely on a typical object, we might design an software utilizing a Singleton. Usage of Singleton patterns is widespread in Banking, Financial and Travel primarily based functions the place the singleton object consists of the community associated data.

A singleton class could also be used to instantiate an object of it, provided that that object doesn’t exist already. In case the item exists, a reference to the prevailing object is given. A singleton object has one world level of entry to it.

An ASP.NET Web Farm can be primarily based on the Singleton sample. In a Web Farm, the net software resides on a number of internet servers. The session state is dealt with by a Singleton object within the type of the aspnet_state.exe, that interacts with the ASP.NET employee course of working on every internet server. Note that the employee course of is the aspnet_wp.exe course of. Imagine one of many internet servers shutting down, the singleton object aspnet_state.exe nonetheless maintains the session state data throughout all internet servers within the internet farm.

In .NET, with a view to create a singleton, a category is created with a non-public constructor, and a “static readonly” variable because the member that behaves because the occasion.

What Are Structural Design Patterns?

A structural design sample establishes a relationship between entities. Thus making it simpler for various parts of an software to work together with one another. Following are a few of the generally recognized structural patterns:

  • Adapter Pattern: Interfaces of courses range relying on the requirement.
  • Bridge Pattern: Class degree abstraction is separated from its implementation.
  • Composite Pattern: Individual objects & a bunch of objects are handled equally on this method.
  • Decorator Pattern: Functionality is assigned to an object.
  • Facade Pattern: A typical interface is created for a bunch of interfaces sharing a similarity.
  • Flyweight Pattern: The idea of sharing a bunch of small sized objects.
  • Proxy Pattern: When an object is complicated and must be shared, its copies are made. These copies are known as the proxy objects.

What Are The Different Types Of Proxy Patterns?

Remote Proxy: A reference is given to a special object in a special reminiscence location. This could also be on a special or a identical machine.
Virtual Proxy: This form of object is created solely & solely when actually required due to its reminiscence utilization.
Cache Proxy: An object that behaves as a short lived storage in order that a number of functions might use it. For instance, in ASP.NET when a web page or a person management comprises the OutputCache directive, that web page/management is cached for a while on the ASP.NET internet server.

What Is A Behavioral Design Pattern?

Behaviorial design patterns concentrate on bettering the communication between completely different objects. Following are various kinds of behavioral patterns:

  • Chain Or Responsibilities Pattern-In this sample, objects talk with one another relying on logical choices made by a category.
  • Command Pattern-In this sample, objects encapsulate strategies and the parameters handed to them.
  • Observer Pattern-Objects are created relying on an occasions outcomes, for which there are occasion handlers created.

What Is The Mvc Pattern (mannequin View Controller Pattern)?

The MVC Pattern (Model View Controller Pattern) is predicated on the idea of designing an software by dividing its functionalities into Three layers. Its like a triad of parts. The Model element comprises the business logic, or the opposite set of re-usable courses like courses pertaining to knowledge entry, customized management courses, software configuration courses and so on. The Controller element interacts with the Model at any time when required. The management comprises occasions and strategies inside it, that are raised from the UI which is the View element.

Consider an ASP.NET internet software. Here, all aspx, ascx, grasp pages signify the View.

he code behind recordsdata (like aspx.cs, grasp.cs, ascx.cs) signify the Controller.

The courses contained within the App_Code folder, or fairly some other class mission being referenced from this software signify the Model element.

Advantages:

  • Business logic could be simply modified, with out affecting or any must make modifications within the UI.
  • Any beauty change within the UI doesn’t have an effect on some other element.

What Is The Gang Of Four Design Pattern?

The historical past of all design patterns utilized in modern-day functions derive from the Gang of Four (GoF) Pattern. Gang of Four patterns are categorized into Three sorts:

  • Creational
  • Structural
  • Behavioral

The time period “Gang of Four”(or “GoF” in acronym) is used to check with the 4 authors of the e-book Design Patterns: Elements of Reusable Object-Oriented Software. The authors are Erich Gamma, Ralph Johnson, Richard Helm and John Vlissides.

When Should Design Patterns Be Used?

While creating software program functions, sound information of {industry} confirmed design patterns make the event journey straightforward and profitable. Whenever a requirement is recurring, an appropriate design sample needs to be recognized. Usage of optimum design patterns improve efficiency of the appliance. Though there are some caveats. Make positive that there are not any overheads imposed on a easy requirement, which implies that design patterns shouldn’t be unnecessarily be used.

How Many Design Patterns Can Be Created In .web?

As many as one can assume. Design patterns aren’t know-how particular, fairly their basis depends on the idea of reusability, object creation and communication. Design patterns could be created in any language.

Describe The Ajax Design Pattern.

In an Ajax Design Pattern, partial postbacks are triggered asyncronously to an internet server for getting dwell knowledge. An internet software wouldn’t flicker right here, and the website online person wouldn’t even come to know {that a} request is being despatched to the net server for dwell knowledge.

Such a design sample is utilized in functions like Stock Market Websites to get dwell quotes, News Websites for dwell information, Sports web sites for dwell scores and so on.

Explain The .web Framework.

.NET framework is a basis calss on which you’ll be able to construct strong functions .This framework includes of internet varieties,window varieties andconsole functions..NET framework is mainly a set of providers and courses.This exists as a layer between .NET functions and underlying working techniques.

.NET Framework is an Integrity of Windows Component which is used to develop Web Applications, Windows, Console Application and Webservices.

Describe The .web Framework Architecture.

.Net framework has two parts:

  • .Net framework class library
  • Common language runtime.

What Are The Components Of The .web Framework.

.NET Framework supplies huge benefits to software program builders compared to the benefits supplied by different platforms. Microsoft has united numerous fashionable in addition to present applied sciences of software program growth in .NET Framework. These applied sciences are utilized by builders to develop extremely environment friendly functions for contemporary in addition to future business wants. The following are the important thing parts of .NET Framework:

  • NET Framework Class Library
  • Common Language Runtime
  • Dynamic Language Runtimes (DLR)
  • Application Domains
  • Runtime Host
  • Common Type System
  • Metadata and Self-Describing Components
  • Cross-Language Interoperability
  • NET Framework Security
  • Profiling
  • Side-by-Side Execution

Explain The Role Of Assembly In The .web Framework.

.Net Framework retains executable code or DLL within the type of meeting. .Net Framework maintains a number of variations of the appliance within the system via meeting. The assemblies have MSIL code and manifest that comprises metadata. The metadata comprises model data of the meeting.

Describe The Gac In The .web Framework.

.Net Framework supplies Global Assembly cache, a machine-wide cache. It shops shared assemblies that may be accessed by a number of languages.

What Is The Advantage Of Packaging Over Xcopy In .web?

Define linked and disconnected knowledge entry in ADO.NET| Describe CommandType property of a SQL Command in ADO.NET.|Define Dataview element of ADO.NET.|What are the methods to create connection in ADO.NET?|Access database at runtime utilizing ADO.NET

.web Code Security Interview Questions With Answers

What is code safety? What are the kinds? | Define Principal object. | Define declarative and crucial safety. | Define role-based safety. | Explain code entry safety. | What is Code group? | Define using Caspol.exe.

.web Debug & Trace Interview Questions With Answers

What is break mode? What are the choices to step via code? | Debug Vs Trace. | Define hint class. Define Listeners assortment of Trace and Debug objects. | Define Trace Switches.

What Is Asp.web 2.0 Ajax?

ASP.NET 2.Zero AJAX is an AJAX-oriented .NET library that runs on .NET 2.0. Though ASP.NET 2.Zero AJAX is an AJAX library and can be utilized to carry out AJAX operations, it’s actually way more. ASP.NET 2.Zero AJAX affords lots of the identical varieties of options of the server-side ASP.NET.

The Components In The Asp.web 2.0 Ajax Packaging?

The packaging of ASP.NET 2.Zero AJAX could be pretty complicated. The fundamentals of the packaging are.

ASP.NET 2.Zero AJAX Extensions 1.0: The ASP.NET 2.Zero AJAX Extensions 1.0, additionally known as the RTM/Core code, is an unbiased obtain. This comprises the performance that may obtain help from Microsoft within the preliminary launch of the product. The supply code is accessible.

ASP.NET AJAX Futures Community Technology Preview (CTP): The ASP.NET 2.Zero AJAX framework comprises a set of performance that’s experimental in nature. This performance will finally change into built-in with the RTM/Core code. During the preliminary launch, the Futures CTP performance can be a separate obtain from the RTM/Core bits. This is not going to obtain particular help from Microsoft past community-based help. The CTP bits require that the RTM/Core bits already be put in for the CTP bits to be put in. The CTP can be known as Value-Added Bits.

Microsoft AJAX Library: The Microsoft AJAX Library is a set of JavaScript consumer libraries that make up the usual obtain to an internet browser and supply a lot of the help for AJAX within the consumer. These libraries will work with a non-IIS server and can be found as a separate obtain. This library is included within the ASP.NET 2.Zero AJAX Extensions 1.Zero obtain in addition to being obtainable as a separate obtain.

ASP.NET AJAX Control Toolkit: The AJAX Control Toolkit is a separate obtain that gives a set of client-side GUI widgets that combine with the ASP.NET 2.Zero AJAX framework. The toolkit is licensed individually from the framework and contains the supply code for builders who want to overview the supply.


Spread the love