New Exp Faqs

  • November 2019
  • PDF

This document was uploaded by user and they confirmed that they have the permission to share it. If you are author or own the copyright of this book, please report to us by using this DMCA report form. Report DMCA


Overview

Download & View New Exp Faqs as PDF for free.

More details

  • Words: 10,386
  • Pages: 21
Dot Net Interview Questions Welcome to www.dotnetquestion.info, an infomative website which provides knowledge all about ASP.Net, dot net interview questions, dot net questions basic and dot net faq. No matter you are student, employee or employer if you are in the field of .Net and need help on any topic regarding ASP.Net just ask here we will provide you the best answere of your question absolutely FREE. Yes, this a free of cost website which provides dot net interview questions and their answers. This site also provides a lots of other information required for a software developer. Just select the category of Questions you want from right hand side. It has got a lot of material on dot net interview questions, dot net faq and dot net questions.

Dot Net FAQ - .net faq Here are some topics on which you will avail with dot net faq * * * * * * * *

Connectivity with Data Base (SQL Server). Data Set. Web Services. Data Grid (Insert, Edit and Delete). Remoting. Connectivity with XML. ADO.Net Java Script and many more...

Exactly... This site is the source of dot net faq that provides all typs of frequently asked question on dot net and many supporting languages.

Dot Net Questions - .net questions DotnetQuestion.info is a one stop site which provides dot net questions and Tips which is generally asked in interviews. This is not the end, you can also put you ideas, tips and experience here sothat anybody can read and follow your tips and ideas. The question asked by you will go directly to one of our Software Engineer who is working continuously in this field since many years. In short we want to explain that we have got a number of experienced persons and number of dot net questions which is very helpful while preparing for interview. So don't worry weather you are a B.Tech, MCA or any other you will get the 100% accurate answers and you can clear any interview. Now you can make your knowledge stronger and face any problem. In fact after studying this website you can be the Master. So what are you waiting for... start grabbing your knowledge

ADO.NET Question:-What is Concurrency and its types? Answer: When two or more people try to update same type of data then Concurrency helps how to handle this situation there are two types of concurrency:pessimistic and optiimistic. Pessimistic:-When one user try to change the data with pessimistic concurrency a lock is placed on the data so that another user cannot change that one after one another can change. Optimistic:-In this if two user works on the same data and one change that data first then second user cannot change that same data becasue the which he have using is allready changed so he cannot do the change becasue change apply to another data that is changed by

first user. Question:-Why is ADO.NET serialization slower than ADO ? Answer: ADO uses binary serialization while ADO.NET uses text based serialization. Since the text takes more space, it takes longer to write it out. Question:- How to check if the Dataset has records ? Answer: if ds.Tables(0).Rows.Count= 0 then 'No record else 'record found Question:- What is the significance of CommandBehavior.CloseConnection ? Answer: To avoid having to explicitly close the connection associated with the command used to create either a SqlDataReader or and OleDbDataReader, pass the CommandBehavior.CloseConnection argument to the ExecuteReader method of the Connection. dr= cmd.ExecuteReader(CommandBehavior.CloseConnection); The associated connection will be closed automatically when the Close method of the Datareader is called. This makes it all the more important to always remember to call Close on your datareaders. Question:-Which method do you invoke on the DataAdapter control to load your generated dataset with data? Answer: The Fill() method. Question:-What is Dataset and Diffgram? Answer: When sending and retrieving a DataSet from an XML Web service, the DiffGram format is implicitly used. Additionally, when loading the contents of a DataSet from XML using the ReadXml method, or when writing the contents of a DataSet in XML using the WriteXml method, you can select that the contents be read or written as a DiffGram. For more information, see Loading a DataSet from XML and Writing a DataSet as XML Data. While the DiffGram format is primarily used by the .NET Framework as a serialization format for the contents of a DataSet, you can also use DiffGrams to modify data in tables in a Microsoft SQL Server™ 2000 database. Question:-What is typed dataset ? Answer: A typed dataset is very much similar to a normal dataset. But the only difference is that the sehema is already present for the same. Hence any mismatch in the column will generate compile time errors rather than runtime error as in the case of normal dataset. Also accessing the column value is much easier than the normal dataset as the column definition will be available in the schema. Question:-How can you provide an alternating color scheme in a Repeater control? Answer: AlternatingItemTemplate Like the ItemTemplate element, but rendered for every other row (alternating items) in the Repeater control. You can specify a different appearance for the AlternatingItemTemplate element by setting its style properties. Question:-What are good ADO.NET object(s) to replace the ADO Recordset object? Answer: There are alot...but the base once are SqlConnection, OleDbConnection, etc... Question:-Can you explain the difference between an ADO.NET Dataset and an ADO Recordset? Answer:Valid answers are:

• • • • • • •

A DataSet can represent an entire relational database in memory, complete with tables, relations, and views. A DataSet is designed to work without any continuing connection to the original data source. Data in a DataSet is bulk-loaded, rather than being loaded on demand. There's no concept of cursor types in a DataSet. DataSets have no current record pointer You can use For Each loops to move through the data. You can store many edits in a DataSet, and write them to the original data source in a single operation. Though the DataSet is universal, other objects in ADO.NET come in different versions for different data sources.

Question:-What are the differences between Datalist DataGrid and datarepeater ? Answer:DataList

• • • • • • • • •

Has table appearence by default Has no autoformat option has no default paging & sorting options can define separators between elements using template DataGrid Has a grid appearence by default has a autoformat option has default paging and sorting has no separator between elements DataRepeater simple,read-only output, has no built in support for selecting or editing items, has no DEFAULT APPEARENCE, has no default paging.

ASSEMBLY Question: What do u mean by Satellite Assemblies ?br /> Answer: The assemblies which contains only culture information are known as satellite assemblies.This assembly is used to get language specific resources for an application . Question: What do you know about .NET assemblies? Answer: Assemblies are the smallest units of versioning and deployment in the .NET application. Assemblies are also the building blocks for programs such as Web services, Windows services, serviced components, and .NET remoting applications. Question: What’s the difference between private and shared assembly? Answer: Privateassembly is used inside an application only and does not have to be identified by a strong name. Shared assembly can be used by multiple applications and has to have a strong name. Question: What’s a strong name ? Answer: A strong name includes the name of the assembly, version number, culture identity, and a public key token. Question: Whats an assembly ? Answer: Assemblies are the building blocks of .NET Framework applications; they form the fundamental unit of deployment, version control, reuse, activation scoping, and security permissions. An assembly is a collection of types and resources that are built to work together and form a logical unit of functionality. An assembly provides the common language runtime

with the information it needs to be aware of type implementations. To the runtime, a type does not exist outside the context of an assembly. Question: How can you debug failed assembly binds ? Answer: Use the Assembly Binding Log Viewer (fuslogvw.exe) to find out the paths searched. Question: Where are shared assemblies stored ? Answer: Global assembly cache. Question: How can you tell the application to look for assemblies at the locations other than its own install ? Answer: Use the directive in the XML .config file for a given application. <probing privatePath="c:\mylibs; bin\debug” /> should do the trick. Or you can add additional search paths in the Properties box of the deployed application. Question: Where’s global assembly cache located on the system ? Answer: Usually C:\winnt\assembly or C:\windows\assembly. Question: How do you specify a custom attribute for the entire assembly (rather than for a class) ? Answer: Global attributes must appear after any top-level using clauses and before the first type or namespace declarations. An example of this is as follows: using System; [assembly : MyAttributeClass] class X {} Note that in an IDE-created project, by convention, these attributes are placed in AssemblyInfo.cs. Question: What is delay signing ? Answer:Delay signing allows you to place a shared assembly in the GAC by signing the assembly with just the public key. This allows the assembly to be signed with the private key at a later stage, when the development process is complete and the component or assembly is ready to be deployed. This process enables developers to work with shared assemblies as if they were strongly named, and it secures the private key of the signature from being accessed at different stages of development.

ASP.NET BASIC

Question: What is late binding ? Answer: When code interacts with an object dynamically at runtime .because our code literally doesnot care what type of object it is interacting and with the methods thats are supported by object and with the methods thats are supported by object .The type of object is not known by the IDE or compiler ,no Intellisense nor compile-time syntax checking is possible but we get unprecedented flexibilty in exchange.if we enable strict type checking by using option strict on at the top of our code modules ,then IDE and compiler will enforce early binding behaviour .By default Late binding is done. Question: What is CSU and its description ? Answer: CSU stands for comma separate values also called comma delimited.It is plain text file which stores spreadsheets or basic datatype in very simple format.One record in each line and each field separted with comma's it is often used to transfer large ammount spreadsheet data or database information between program.

Question: The IHttpHandler and IHttpHandlerFactory interfaces ? Answer: The IHttpHandler interface is implemented by all the handlers. The interface consists of one property called IsReusable. The IsReusable property gets a value indicating whether another request can use the IHttpHandler instance. The method ProcessRequest() allows you to process the current request. This is the core place where all your code goes. This method receives a parameter of type HttpContext using which you can access the intrinsic objects such as Request and Response. The IHttpHandlerFactory interface consists of two methods GetHandler and ReleaseHandler. The GetHandler() method instantiates the required HTTP handler based on some condition and returns it back to ASP.NET. The ReleaseHandler() method allows the factory to reuse an existing handler. Question: what is Viewstate? Answer:View state is used by the ASP.NET page framework to automatically save the values of the page and of each control just prior to rendering to the page. When the page is posted, one of the first tasks performed by page processing is to restore view state. State management is the process by which you maintain state and page information over multiple requests for the same or different pages. Client-side options are: * The ViewState property * Hidden fields

* Query strings * Cookies

Server-side options are: * Application state

* Session state

* DataBase

Use the View State property to save data in a hidden field on a page. Because ViewState stores data on the page, it is limited to items that can be serialized. If you want to store more complex items in View State, you must convert the items to and from a string. ASP.NET provides the following ways to retain variables between requests: Context.Handler object Use this object to retrieve public members of one Web form’s class from a subsequently displayed Web form. Query strings Use these strings to pass information between requests and responses as part of the Web address. Query strings are visible to the user, so they should not contain secure information such as passwords. Cookies Use cookies to store small amounts of information on a client. Clients might refuse cookies, so your code has to anticipate that possibility. View state ASP.NET stores items added to a page’s ViewState property as hidden fields on the page. Session state Use Session state variables to store items that you want keep local to the current session (single user). Application state Use Application state variables to store items that you want be available to all users of the application. Question: DOTNET PAGE LIFECYCLE ? Answer: While excuting the page, it will go under the fallowing steps(or fires the events) which collectivly known as Page Life cycle. Page_Init -- Page Initialization

LoadViewState -- View State Loading LoadPostData -- Postback data processing Page_Load -- Page Loading RaisePostDataChangedEvent -- PostBack Change Notification RaisePostBackEvent -- PostBack Event Handling Page_PreRender -- Page Pre Rendering Phase SaveViewState -- View State Saving Page_Render -- Page Rendering Page_UnLoad -- Page Unloading Question: What is Satellite Assemblies ? Answer: Satellite assemblies are often used to deploy language-specific resources for an application. These language-specific assemblies work in side-by-side execution because the application has a separate product ID for each language and installs satellite assemblies in a language-specific subdirectory for each language. When uninstalling, the application removes only the satellite assemblies associated with a given language and .NET Framework version. No core .NET Framework files are removed unless the last language for that .NET Framework version is being removed. For example, English and Japanese editions of the .NET Framework version 1.1 share the same core files. The Japanese .NET Framework version 1.1 adds satellite assemblies with localized resources in a \ja subdirectory. An application that supports the .NET Framework version 1.1, regardless of its language, always uses the same core runtime files. Question: What is CAS ? Answer:CAS: CAS is the part of the .NET security model that determines whether or not a piece of 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.) Question: Automatic Memory Management ? Answer: Automatic Memory Management: From a programmer's perspective, this is probably the single biggest benefit of the .NET Framework. No, I'm not kidding. Every project I've worked on in my long career of DOS and Windows development has suffered at some point from memory management issues. Proper memory management is hard. Even very good programmers have difficulty with it. It's entirely too easy for a small mistake to cause a program to chew up memory and crash, sometimes bringing the operating system to a screeching halt in the process. Programmers understand that they're responsible for releasing any memory that they allocate, but they're not very good at actually doing it. In addition, functions that allocate memory as a side effect abound in the Windows API and in the C runtime library. It's nearly impossible for a programmer to know all of the rules. Even when the programmer follows the rules, a small memory leak in a support library can cause big problems if called enough. The .NET Framework solves the memory management problems by implementing a garbage collector that can keep track of allocated memory references and release the memory when it is no longer referenced. A large part of what makes this possible is the blazing speed of today's processors. When you're running a 2 GHz machine, it's easy to spare a few cycles for memory management. Not that the garbage collector takes a huge number of cycles--it's incredibly efficient. The garbage collector isn't perfect and it doesn't solve the problem of mis-managing other scarce resources (file handles, for example), but it relieves programmers from having to worry about a huge source of bugs that trips almost everybody up in other programming

environments. On balance, automatic memory management is a huge win in almost every situation. Question: What Language familar to CLR? Answer: Any language that can be compiled into Microsoft Intermediate Language (MSIL) is considered a .NET-compliant language. Following are a few of the popular .NET-compliant languages supported by CLR: APL Fortran Oberon Smalltalk

COBOL Haskell Pascal Visual Basic

Component Pascal JScript Perl Visual C#

Eiffel Mercury Python Visual C++

OOPS Question: What Is OOPS ? Answer: OOPs is an Object Oriented Programming language,which is the extension of Procedure Oriented Programming language.OOPS reduce the code of the program because of the extensive feature of Polymorphism. OOPS have many properties such as DataHiding,Inheritence,Data Absraction,Data Encapsulation and many moreEverything in the world is an object. The type of the object may vary. In OOPS, we get the power to create objects of our own, as & when required. Question: what is Class ? Answer:A group of objects that share a common definition and that therefore share common properties, operations, and behavior. A user-defined type that is defined with the class-key 'class,' 'struct,' or 'union.' Objects of a class type consist of zero or more members and base class objects.Classes can be defined hierarchically, allowing one class to be an expansion of another, and classes can restrict access to their members. Question: What is Constructor? Answer:When we create instance of class a special method of that class, called that is constructor. Similarly, when the class is destroyed, the destructor method is called. These are general terms and usually not the actual member names in most object-oriented languages. It is initialized using the keyword New, and is destroyed using the keyword Finalize. Question: What is Abstract Class ? Answer:Classes that cannot be instantiated. We cannot create an object from such a class for use in our program. We can use an abstract class as a base class, creating new classes that will inherit from it. Creating an abstract class with a certain minimum required level of functionality gives us a defined starting point from which we can derive non-abstract classes. An abstract class may contain abstract methods & non-abstract methods. When a class is derived from an abstract class, the derived class must implement all the abstract methods declared in the base class. We may use accessibility modifiers in an abstract class.An abstract class can inherit from a non-abstract class. In C++, this concept is known as pure virtual method. Question: What is ValueType? Answer:Value Types - Value types are primitive types. Like Int32 maps to System.Int32, double maps to System.double.All value types are stored on stack and all the value types are derived from System.ValueType. All structures and enumerated types that are derived from System.ValueType are created on stack, hence known as ValueType.In value type we create a copy of object and uses there value its not the original one. Question: What is diff. between abstract class and an interface? Answer: An abstract class and Interface both have method only but not have body of method.The difference between Abstract class and An Interface is that if u call Ablstract class

then u have to call all method of that particular Abstract class but if u call an Interface then it is not necessary that u call all method of that particular interface.Method OverLoading:-Return type, Parameter type, parameter and body of method number may be different.Method Overriding:- Return type, Parameter type, Parameter Number all must be same . Only body of method can change.

COM - DCOM

Question:-Whats the relation between COM/DCOM ? Answer: DCOM is an extended to COM that allows network-based component interaction. Because COM only ability that processes can run on the same machine but in different address spaces, the DCOM extension allows across a network. DCOM components can helpfull on variety of platforms . we can also say that COM and DCOM is single technology that provides a many services for component interaction, some specific tasks are component integration on a single platform,component interaction across heterogeneous networks.COM and its DCOM extensions are merged into a single runtime. Question:-Which namespace do the classes, allowing you to support COM functionality, are located? Answer: System.EnterpriseServices Question:- How do you make a NET component talk to a COM component? Answer: To enable the communication between COM and .NET components, the .NET Framework generates a COM Callable Wrapper (CCW). The CCW enables communication between the calling COM code and the managed code. It also handles conversion between the data types, as well as other messages between the COM types and the .NET types. Question:-How do you generate an RCW from a COM object? Answer: Use the Type Library Import utility shipped with SDK. tlbimp COMobject.dll /out:.NETobject.dll or reference the COM library from Visual Studio in your project. Question:-I can’t import the COM object that I have on my machine. Did you write that object? Answer:You can only import your own objects. If you need to use a COM component from another developer, you should obtain a Primary Interop Assembly (PIA) from whoever authored the original object. Question:-How do you call unmanaged methods from your .NET code through PInvoke? Answer: Supply a DllImport attribute. Declare the methods in your .NET code as static extern. Do not implement the methods as they are implemented in your unmanaged code, you’re just providing declarations for method signatures. Question:- Can you retrieve complex data types like structs from the PInvoke calls? Answer: Yes, just make sure you re-declare that struct, so that managed code knows what to do with it. Question:- I want to expose my .NET objects to COM objects. Is that possible? Answer: Yes, but few things should be considered first. Classes should implement interfaces explicitly. Managed types must be public. Methods, properties, fields, and events that are exposed to COM must be public. Types must have a public default constructor with no arguments to be activated from COM. Types cannot be abstract. Question:-Can you inherit a COM class in a .NET application? Answer: The .NET Framework extends the COM model for reusability by adding implementation inheritance. Managed types can derive directly or indirectly from a COM coclass; more specifically, they can derive from the runtime callable wrapper generated by the

runtime. The derived type can expose all the method and properties of the COM object as well as methods and properties implemented in managed code. The resulting object is partly implemented in managed code and partly implemented in unmanaged code. Question:-Suppose I call a COM object from a .NET applicaiton, but COM object throws an error. What happens on the .NET end? Answer: COM methods report errors by returning HRESULTs; .NET methods report them by throwing exceptions. The runtime handles the transition between the two. Each exception class in the .NET Framework maps to an HRESULT.

CSS Question: What do u mean to CSS ? Answer: Style sheets are a very powerful tool for the Web site developer. They give you the chance to be completely consistent with the look and feel of your pages, while giving you much more control over the layout and design than straight HTML ever did. Question: What is CSS? Answer: CSS stands for cascading stylesheets Styles define how to display HTML elements Styles are normally stored in Style Sheets Styles were added to HTML 4.0 to solve a problem External Style Sheets can save you a lot of work External Style Sheets are stored in CSS files Multiple style definitions will cascade into one. Question: Style Sheets Can Save a Lot of Work Answer: Enforcing data integrity ensures the quality of the data in the database. For example, if an employee is entered with an employee_id value of 123, the database should not allow another employee to have an ID with the same value. If you have an employee_rating column intended to have values ranging from 1 to 5, the database should not accept a value of 6. If the table has a dept_id column that stores the department number for the employee, the database should allow only values that are valid for the department numbers in the company. Two important steps in planning tables are to identify valid values for a column and to decide how to enforce the integrity of the data in the column. Data integrity falls into these categories. Question: How to add Add External Style Sheet? Answer: An external style sheet is ideal when the style is applied to many pages. With an external style sheet, you can change the look of an entire Web site by changing one file. Each page must link to the style sheet using the tag. The tag goes inside the head section: Question:What is Internal Style Sheet? Answer:An internal style sheet should be used when a single document has a unique style. You define internal styles in the head section by using the <style> tag, like this: <style type="text/css"> hr {color: sienna} p {margin-left: 20px} body {background-image: url("images/back40.gif")} The browser will now read the style definitions, and format the document according to it. Question:What are Inline Styles? Answer: An inline style loses many of the advantages of style sheets by mixing content with

presentation. Use this method sparingly, such as when a style is to be applied to a single occurrence of an element. To use inline styles you use the style attribute in the relevant tag. The style attribute can contain any CSS property. The example shows how to change the color and the left margin of a paragraph:

This is a paragraph

Question: When do you use CSS dimension? Answer: The CSS dimension properties allow you to control the height and width of an element. It also allows you to increase the space between two lines. Question: CSS purpose and Used for? Answer: CSS is a language, separate from HTML or XHTML CSSused to specify the layout or formatting properties of HTML elements From a single CSS file you can control an entire sites: font type ,font and element colour ,padding ,margins ,and element positioning CSS allows developers to separate style (look, appearance,colours, fonts, layout) from the pages structure. Question: What are the CSS Web Template? Answer: "CSS Web Template" is a website design created using Cascading Style Sheets (CSS) technology. Cascading stylesheets provide web developers an easy way to format and to style web pages. CSS will be used even more because it is seen the same way by all browsers, making it the best option during the browser wars.

REMOTING

Question:-What is .NET Remoting ? Answer: .NET Remoting is an enabler for application communication. It is a generic system for different applications to use to communicate with one another. .NET objects are exposed to remote processes, thus allowing interprocess communication. The applications can be located on the same computer, different computers on the same network, or even computers across separate networks. Question:- .NET Remoting versus Distributed COM ? Answer: In the past interprocess communication between applications was handled through Distributed COM, or DCOM. DCOM works well and the performance is adequate when applications exist on computers of similar type on the same network. However, DCOM has its drawbacks in the Internet connected world. DCOM relies on a proprietary binary protocol that not all object models support, which hinders interoperability across platforms. In addition, have you tried to get DCOM to work through a firewall? DCOM wants to communicate over a range of ports that are typically blocked by firewalls. There are a ways to get it to work, but they either decrease the effectiveness of the firewall (why bother to even have the firewall if you open up a ton of ports on it), or require you to get a firewall that allows support for binary traffic over port 80. .NET Remoting eliminates the difficulties of DCOM by supporting different transport protocol formats and communication protocols. This allows .NET Remoting to be adaptable to the network environment in which it is being used. Question:-What is Channels ? Answer: Remote objects are accessed through Channels. Channels physically transport the messages to and from remote objects. There are two existing channels TcpChannel and HttpChannel. Their names give away the protocols that they use. In addition, the TcpChannel or HttpChannel can be extended, or a new channel created if you determine the existing channels do not meet your needs. Question:- Security in Remoting ?

Answer: Security is of paramount importance to any distributed application. Although the .NET Remoting infrastructure does not define any security features itself, because distributed applications are managed code they have full access to all of the .NET security features. In addition, the HTTP channel, when used with IIS, allows you to take full advantage of the authentication and authorization features that are available to Web based protocols. If you choose to use a protocol other than HTTP with IIS, then you have the opportunity to create your own security infrastructure. Question:-Advantage of Remoting over Web Services ? Answer: .NET Remoting is a distributed objects infrastructure. It allows processes to share objects—to call methods on and access properties of objects that are hosted in different application domains within the same process, different processes executing on the same computer, on computers on an intranet, or on computers distributed over wide areas. .NET Remoting supports many different communications protocols, including the SOAP/HTTP protocol used by ASP.NET Web services. Support for other protocols makes it possible to provide much faster communications in .NET Remoting than would be possible with ASP.NET Web services. The ASP.NET programming model is tied specifically to IIS, and is limited to creating Web services that use the producer/consumer model. .NET Remoting, on the other hand, can share objects from any type of application. The .NET Remoting system, as an integral part of the .NET Framework, supports full .NET type system fidelity. You can pass any object across the wire to a client. This is in contrast to ASP.NET, which is limited to data types that can be expressed with WSDL and XSD. Question:- Scope of publication ? Answer: .NET Remoting exposes objects to other application domains as if they are local, with a few exceptions. The two exceptions most likely to trip you up are: • Static members are never remoted. Remoting always deals with some form of object instance member. • Private methods are never remoted. You cannot wrap and pass a delegate to a private method. This includes remote event handlers. The other exceptions are less likely to cause you trouble. The online documentation provides a complete list and explanation of the exceptions. Question:-What are the Proxies ? Answer: In the general sense, a proxy is any object that stands in for another, either servicing requests directly or passing the requests on to the object for which it is standing in. In .NET Remoting, the proxy manages the marshaling process and the other tasks required to make cross-boundary calls. The .NET Remoting infrastructure automatically handles creation and management of proxies, although it is possible to create your own proxy classes to plug in to and customize proxy creation, marshaling, and other proxy-related tasks. Question:-What is Abstract ? Answer: .NET Remoting provides a powerful and high performance way of working with remote objects. Architecturally, .NET Remote objects are a perfect fit for accessing resources across the network without the overhead posed by SOAP based WebServices. .NET Remoting is easier to use than Java's RMI, but definately more difficult than creating a WebService. Question:-Some Important Notes Answer: The dependence on assembly metadata implies that client applications must understand .NET concepts. As a result, applications that make use of .NET Remoting are not interoperable with other systems. Although it's possible to write an XML Web service using .NET Remoting, it's not practical when you consider that ASP.NET is designed specifically for that task. In most cases, in order to use .NET Remoting, both the client and the server must be .NET applications. This makes .NET Remoting a poor choice if you want non-.NET clients to access your service.

Before we get into the nuts and bolts of how Remoting works and how to write programs that take advantage of it, you need to understand some basic Remoting concepts. Question:-.NET Remoting Overview ? Answer: .NET Remoting is very flexible. You have a wide range of communications options and activation methods, as well as full control over a distributed object's lifecycle. You can choose TCP or HTTP communications protocols on any port, using text or binary formatting. The .NET Remoting infrastructure supports server activated (single call and singleton) and client activated objects. .NET Remoting gives you many opportunities to "plug in" to the system to customize lifecycle management, marshaling, serialization, messaging, and other services.

SQL SERVER

Question: What are the null values in SQL SERVER ? Answer: Before understand the null values we have some overview about what the value is. Value is the actual data stored in a particular field of particular record. But what is done when there is no values in the field.That value is something like < null>.Nulls present missing information. We can also called null propagation. Question: What are the different types of Locks ? Answer: There are three main types of locks that SQL Server (1)Shared locks are used for operations that does not allow to change or update data, such as a SELECT statement. (2)Update locks are used when SQL Server intends to modify a page, and later promotes the update page lock to an exclusive page lock before actually making the changes. (3)Exclusive locks are used for the data modification operations, such as UPDATE, INSERT, or DELETE. Question: What Is Database ? Answer: A database is similar to a data file in that it is a storage place for data. Like a data file, a database does not present information directly to a user; the user runs an application that accesses data from the database and presents it to the user in an understandable format.Database systems are more powerful than data files in that data is more highly organized. In a well-designed database, there are no duplicate pieces of data that the user or application must update at the same time. Related pieces of data are grouped together in a single structure or record, and relationships can be defined between these structures and records.When working with data files, an application must be coded to work with the specific structure of each data file. In contrast, a database contains a catalog that applications use to determine how data is organized. Generic database applications can use the catalog to present users with data from different databases dynamically, without being tied to a specific data format. A database typically has two main parts: first, the files holding the physical database and second, the database management system (DBMS) software that applications use to access data. The DBMS is responsible for enforcing the database structure, including: · Maintaining relationships between data in the database. Ensuring that data is stored correctly, and that the rules defining data relationships are not violated. · Recovering all data to a point of known consistency in case of system failures. Question: what is Relational Database ? Answer: Although there are different ways to organize data in a database, relational databases are one of the most effective. Relational database systems are an application of mathematical set theory to the problem of effectively organizing data. In a relational database, data is collected into tables (called relations in relational theory). A table represents some class of objects that are important to an organization. For example, a company may have a database with a table for employees, another table for customers, and another for stores. Each table is built of columns and rows (called attributes and tuples in relational theory). Each column represents some attribute of the object represented by the table. For example, an Employee table would typically have columns for attributes such as first name, last name, employee ID, department, pay grade, and job title. Each row represents an

instance of the object represented by the table. For example, one row in the Employee table represents the employee who has employee ID 12345. When organizing data into tables, you can usually find many different ways to define tables. Relational database theory defines a process called normalization, which ensures that the set of tables you define will organize your data effectively. Question: What is Data Integrity and it's categories ? Answer: Enforcing data integrity ensures the quality of the data in the database. For example, if an employee is entered with an employee_id value of 123, the database should not allow another employee to have an ID with the same value. If you have an employee_rating column intended to have values ranging from 1 to 5, the database should not accept a value of 6. If the table has a dept_id column that stores the department number for the employee, the database should allow only values that are valid for the department numbers in the company. Two important steps in planning tables are to identify valid values for a column and to decide how to enforce the integrity of the data in the column. Data integrity falls into these categories: 1) 2) 3) 4)

Entity integrity Domain integrity Referential integrity User-defined integrity

Entity Integrity: Entity integrity defines a row as a unique entity for a particular table. Entity integrity enforces the integrity of the identifier column(s) or the primary key of a table (through indexes, UNIQUE constraints, PRIMARY KEY constraints, or IDENTITY properties). Domain Integrity: Domain integrity is the validity of entries for a given column. You can enforce domain integrity by restricting the type (through data types), the format (through CHECK constraints and rules), or the range of possible values (through FOREIGN KEY constraints, CHECK constraints, DEFAULT efinitions, NOT NULL definitions, and rules). Referential Integrity: Referential integrity preserves the defined relationships between tables when records are entered or deleted. In Microsoft® SQL Server™ 2000, referential integrity is based on relationships between foreign keys and primary keys or between foreign keys and unique keys (through FOREIGN KEY and CHECK constraints). Referential integrity ensures that key values are consistent across tables. Such consistency requires that there be no references to nonexistent values and that if a key value changes, all references to it change consistently throughout the database. When you enforce referential integrity, SQL Server prevents users from: · Adding records to a related table if there is no associated record in the primary table. · Changing values in a primary table that result in orphaned records in a related table. · Deleting records from a primary table if there are matching related records. For example, with the sales and titles tables in the pubs database, referential integrity is based on the relationship between the foreign key (title_id) in the sales table and the primary key (title_id) in the titles table. User-Defined: Integrity User-defined integrity allows you to define specific business rules that do not fall into one of the other integrity categories. All of the integrity categories support user-defined integrity (all column- and table-level constraints in CREATE TABLE, stored procedures, and triggers). Question: SQL Server runs on which TCP/IP port and From where can you change the default port? Answer: SQL Server runs on port 1433 but we can also change it for better security and From the network Utility TCP/IP properties -->Port number.both on client and the server.

Question: What is the use of DBCC commands? Answer: DBCC stands for database consistency checker. We use these commands to check the consistency of the databases, i.e., maintenance, validation task and status checks.DBCC CHECKDB - Ensures that tables in the db and the indexes are correctly linked.and DBCC CHECKALLOC To check that all pages in a db are correctly allocated. DBCC SQLPERF - It gives report on current usage of transaction log in percentage. DBCC CHECKFILEGROUP - Checks all tables file group for any damage. Question: What is the difference between a HAVING CLAUSE and a WHERE CLAUSE? Answer: Having Clause is basically used only with the GROUP BY function in a query. WHERE Clause is applied to each row before they are part of the GROUP BY function in a query. Question: When do you use SQL Profiler? Answer: SQL Profiler utility allows us to basically track Connections to the SQL Server and also determine activities such as which SQL Scripts are running, failed jobs etc. Question: Can you explain the role of each service? Answer: SQL SERVER - is for running the databases SQL AGENT - is for automation such as Jobs, DB Maintenance, Backups DTC - Is for linking and connecting to other SQL Servers. Question: What is Normalization ? Answer: The logical design of the database, including the tables and the relationships between them, is the core of an optimized relational database. A good logical database design can lay the foundation for optimal database and application performance. A poor logical database design can impair the performance of the entire system. Normalizing a logical database design involves using formal methods to separate the data into multiple, related tables. A greater number of narrow tables (with fewer columns) is characteristic of a normalized database. A few wide tables (with more columns) is characteristic of an nonnomalized database. Reasonable normalization often improves performance. When useful indexes are available, the Microsoft® SQL Server™ 2000 query optimizer is efficient at selecting rapid, efficient joins between tables. Some of the benefits of normalization include: ·Faster sorting and index creation. ·A larger number of clustered indexes. For more information, Narrower and more compact indexes. ·Fewer indexes per table, which improves the performance of INSERT, UPDATE, and DELETE statements. ·Fewer null values and less opportunity for inconsistency, which increase database compactness. As normalization increases, so do the number and complexity of joins required to retrieve data. Too many complex relational joins between too many tables can hinder performance. Reasonable normalization often includes few regularly executed queries that use joins involving more than four tables. Sometimes the logical database design is already fixed and total redesign is not feasible. Even then, however, it might be possible to normalize a large table selectively into several smaller tables. If the database is accessed through stored procedures, this schema change could take place without affecting applications. If not, it might be possible to create a view that hides the schema change from the applications. Question: Can you tell me the difference between DELETE &TRUNCATE commands? Answer: Delete command removes the rows from a table based on the condition that we provide with a WHERE clause. Truncate will actually remove all the rows from a table and there will be no data in the table after we run the truncate command

VB.NET QUESTIONS Question:-What is DataType conversion in VB.NET ? Answer: Convert one variable type to another one is called datatype conversion we can also caleed this casting in VB.NET some automatically conversion is also there. Cbool CByte CChar Cdate CDec CDbl CInt CLng CObj CShort CSng CStr CType Asc. Question:-What do u mean by Redim in VB.NET ? Answer: In vb.net we use Redim and erase to manipulate Array. Once we declare an array the size set to array its makes limited to that range but with the help of redim we used to change the array size. Redim arr(6) we can also used preserve to save these values. Redim Preserve arr(6) Question:- What is branching logic control in vb.net ? Answer: Function and subroutines are the answer.The diffrence in two of them is function send information back from where it is called means function can return a value but subroutines can not do this. Question:-Write the role of New keyword ? Answer: New is used to initialize a new object. We sets a variable to any dattype with help of New keyword .The New keyword gives a value to the variable.We can also uses new keyword to initialize an object variable. Example:- dim obj as new SqlDataAdapter.

WEB SERVICES

Question: Define Protocols that helps Web Services ? Answer: From my point of view Web Services used three protocols for interacting with the clients.Http-Post,Http-Get,SOAP. Question: Explain functioning of Web Services Protocols ? Answer: Http-Get:- This is standard protocol that helps client to communicate with server with HTTP.When client send a request to server via HTTP request and reuired parameter are attached with the querystring.Example:http://www.dotnetquestion.info/dotnet/interview.aspx?id=pervej&cast=munjal and we get the value from querystring. Request.querystring("id") Request.querystring("cast"). Http-Post:-This is same as Http-Get but the diffrence is that in place of sending parameters onto the URL information is send with HTTP request message with some extra information which contains Parameters and their values.This Protocols is limited to sending name/value pairs. SOAP:-The only diffrence is that its relies on the XML as compares to Http-Get,HttpPost.SOAP can send not only the name/value pairs but also some complex object also as for example datatypes,class,objects.SOAP can also uses request/reponse model as Http-Get,Httppost but it is not limited to Request/Response it can also send types of message.Because its uses XML that is pure text so firewalls not created so much problem because its easily converted in to HTML. . Question: Why do some web service classes derive from System.Web.WebServices while others do not ? Answer: Those Web Service classes which employ objects like Application, Session, Context, Server, and User have to derive from System.Web.WebServices. If it does not use these

objects, it is not necessary to be derived from it. Question: What is WSDL ? Answer: WSDL is an XML format for describing network services as a set of endpoints operating on messages containing either document-oriented or procedure-oriented information. The operations and messages are described abstractly, and then bound to a concrete network protocol and message format to define an endpoint. Related concrete endpoints are combined into abstract endpoints (services). (Source: www.w3.org). Question: What is the standard you use to wrap up a call to a Web service ? Answer: HTTP with SOAP. Question: Explain Web Services ? Answer: Web services are programmable business logic components that provide access to functionality through the Internet. Standard protocols like HTTP can be used to access them. Web services are based on the Simple Object Access Protocol (SOAP), which is an application of XML. Web services are given the .asmx extension.. Question: What are VSDISCO files ? Answer: VSDISCO files are DISCO files that enable dynamic discovery of Web Services. ASP.NET links the VSDISCO to a HTTP handler that scans the host directory and subdirectories for ASMX and DISCO files and returns a dynamically generated DISCO document. A client who requests a VSDISCO file gets back what appears to be a static DISCO document. Question: What is UDDI ? Answer: UDDI stands for Universal Description, Discovery, and Integration. It is like an "Yellow Pages" for Web Services. It is maintained by Microsoft, IBM, and Ariba, and is designed to provide detailed information regarding registered Web Services for all vendors. The UDDI can be queried for specific Web Services. Question: Is it possible to generate the source code for an ASP.NET Web service from a WSDL ? Answer: The Wsdl.exe tool (.NET Framework SDK) can be used to generate source code for an ASP.NET web service with its WSDL link. Example: wsdl /server http://api.google.com/GoogleSearch.wsdl. Question: Can you give an example of when it would be appropriate to use a web service as opposed to a non-serviced .NET component ? Answer: When to Use Web Services: (i)Communicating through a Firewall When building a distributed application with 100s/1000s of users spread over multiple locations, there is always the problem of communicating between client and server because of firewalls and proxy servers. Exposing your middle tier components as Web Services and invoking the directly from a Windows UI is a very valid option. (ii)Application Integration When integrating applications written in various languages and running on disparate systems. Or even applications running on the same platform that have been written by separate vendors. (iii)Business-to-Business Integration This is an enabler for B2B intergtation which allows one to expose vital business processes to authorized supplier and customers. An example would be exposing electronic ordering and invoicing, allowing customers to send you purchase orders and suppliers to send you invoices electronically. (iv)Software Reuse This takes place at multiple levels. Code Reuse at the Source code level or binary componet-based resuse. The limiting factor here is that you can reuse the code but not the data behind it. Webservice overcome this limitation. A scenario could be when you are building an app that aggregates the functionality of serveral other Applicatons. Each of these

functions could be performed by individual apps, but there is value in perhaps combining the the multiple apps to present a unifiend view in a Portal or Intranet. Question: What are Service Oriented Architectures (SOA) ? Answer: SOA describes an information technology architecture that enables distributed computing environments with many different types of computing platforms and applications. Web services are one of the technologies that help make SOAs possible. As a concept, SOA has been around since the 1980s, but many early IT technologies failed to achieve the goal of linking different types of applications and systems. By making early investments with .NET, Microsoft has helped provide the building blocks that today are putting many enterprise customers on the path to successfully implementing SOAs. With SOAs, companies can benefit from the unimpeded flow of information that is the hallmark of connected systems. Question: What is .NET Passport ? Answer: .NET Passport is a Web-based service that is designed to make signing in to Web sites fast and easy. Passport enables participating sites to authenticate a user with a single set of sign-in credentials, alleviating the need for users to remember numerous passwords and user names.

XML - XHTML Question:-What is XML ? Answer: XML is the Extensible Markup Language. It improves the functionality of the Web by letting you identify your information in a more accurate, flexible, and adaptable way. It is extensible because it is not a fixed format like HTML (which is a single, predefined markup language). Instead, XML is actually a metalanguage—a language for describing other languages—which lets you design your own markup languages for limitless different types of documents. XML can do this because it's written in SGML, the international standard metalanguage for text document markup (ISO 8879). Question:-What is DOM? Answer: Document Object Model (DOM) is a W3C specification that defines a standard (abstract) programming API to build, navigate and update XML documents. It is a "treestructure-based" interface. As per the DOM specification, the XML parsers (such as MSXML or Xerces), load the entire XML document into memory, before it can be processed. XPath is used to navigate randomly in the document, and various DOM methods are used to create and update (add elements, delete elements, add/remove attributes, etc.) the XML documents. Question:-What is XPath? Answer: XML Path Language (XPath) is a W3C specification that defines syntax for addressing parts of XML document. XML document is considered as a logical tree structure, and syntax based on this consideration is used to address elements and attributes at any level in the XML document. For example, considering the XML document described above in answer to question 2, /abc:Employees/abc:Emp/@EmpID XPath expression can be used to access the EmpID attribute under the (first) Emp element under the Employees document element. XPath is used in various other specifications such as XSLT. Question:-What is XHTML? Answer: Is simple words, XHTML, or Extensible HTML, is HTML 4 with XML rules applied to it (each begin tag must have an end tag, attribute values in single/double quotes, etc.). However, the overall vision of XHTML is much more than that. In addition to using XML syntax for HTML, XHTML also encloses specifications such as XHTML Basic (minimal set of modules for devices such as PDAs), XForms (represents the next generation of forms for the Web, and separates presentation, logic, and data), XML Events (provides XML languages with the ability to uniformly integrate event listeners and associated event handlers), etc. Question:-What is XML Parser ? Answer: Microsoft's XML parser is a COM component that comes with Internet Explorer 5 and higher. Once you have installed Internet Explorer, the parser is available to scripts. Microsoft's XML parser supports all the necessary functions to traverse the node tree, access

the nodes and their attribute values, insert and delete nodes, and convert the node tree back to XML. To create an instance of Microsoft's XML parser with JavaScript, use the following code: var xmlDoc=new ActiveXObject("Microsoft.XMLDOM") To create an instance of Microsoft's XML parser with VBScript, use the following code: set xmlDoc=CreateObject("Microsoft.XMLDOM") To create an instance of Microsoft's XML parser in an ASP page (using VBScript), use the following code: set xmlDoc=Server.CreateObject("Microsoft.XMLDOM") The following code loads an existing XML document ("note.xml") into Microsoft's XML parser: <script type="text/javascript"> var xmlDoc=new ActiveXObject("Microsoft.XMLDOM") xmlDoc.async="false" xmlDoc.load("note.xml") ... ... ... Question:- Some Limitation or Disadvantage of XML? Answer: XML markup has a few disadvantages: It can be verbose unless element and attribute names are chosen with care. In large documents the markup overhead need not be large, but in short messages it can be significantly more than the actual data, especially when the element or attribute names are concocted by machine. Overlapping markup is not permitted (an element cannot start inside one element and end inside another): element markup must nest hierarchically. Some of the software is truly mediocre. Question:- How to add in XML document through XSL ? Answer: XSL (the eXtensible Stylesheet Language) is far more sophisticated than CSS. One way to use XSL is to transform XML into HTML before it is displayed by the browser as demonstrated in these examples: Below is a fraction of the XML file. The second line, , links the XML file to the XSL file: Belgian Waffles <price>$5.95 <description> two of our famous Belgian Waffles 650 Question:- How do I convert my existing HTML documents into XML? Answer: Tidy is a command-line utility which runs on a wide variety of operating systems; it uses various command-line switches (parameters) to control its processing. At a minimum, it simply cleans up your HTML by ensuring that elements are properly nested and so on; it also

warns you if your HTML uses non-standard code that's likely to cause cross-browser compatibility problems. One of the most useful command-line options is -asxml ("as XML," see?), which does what you seem to be asking. It will properly balance elements, per usual, but it also adds some extra information to the document. For instance, it tacks on an XML declaration, , and a statement, which unambiguously mark this as an XML document. To the root html element it also adds a namespace-declaring attribute that identifies all elements in the document as conforming to the specific XML vocabulary known as XHTML. It even forces all element names to lowercase, since the XHTML standard requires it. If you're asking about converting HTML to a less generic form of XML than XHTML, your task may turn out to be quite complex. For example, if you've been using HTML to mark up customer invoices, not only the customer's name but also their number, item(s) ordered, quantity, and price are probably all wrapped up inside

and

tags. How do you know which "kind of paragraph" contains a given kind of information, so you can turn one instance of the p element into a custname element, another into custnumber, another into price, and so on? If you've been using CSS for styling your HTML, you may have supplied the different p elements with class="custname" (etc.) attributes and so on; if that's the case, you may be able to generate meaningful XML using an XSLT stylesheet. There may also be customized software to do the sort of conversion you want. Otherwise you're probably looking down the barrel of an ugly gun. Question:- What is a schema? What are the limitations of a DTD? Answer: SCHEMA is nothing but METADATA. The schema holds all the information of the xml file that is to be deployed in the project. Metatdata is nothing about data about data since we know that xml is used for data representation language we will be able to understand what metadata is. Metadata includes the tags that is going to be exchanged to and fro from another xml file. DTD (DATA TYPE DEFINITION ) which supervises two conditions namely well formedness and closeness of the xml file. So the user should be aware of what tags he was put into use of this xml file 'A' should be intimated to another application's XML file 'B', by then our xml file will interact with the another xml file, this is the major limitation and mandatory issue that the developers should follow.

C#.NET Question: what do u mean by Array in C# ? Answer: Array is a group of same type of datatype variable that shared a common name .The ability to use a single name to represent a collections of item is an array.There are manily three types of array. *One-Dimensinal Array *Two-Dimensinal Array *Multi-Dimensinal Array There are three steps include to create a Array (1) Declare an array (2)Creating memory location (3)Putting values into the memory location Declare the Array:-int[] counter;(declare int array) Creating of Array:-arrayname=new type[size]; putting values in array:-number=new int[5]; number[0]=35; Question: What is difference between the System.Array.CopyTo() & System.Array.Clone()? Answer: The Clone() method returns a new array object containing all the elements in the original array. The CopyTo() method copies the elements into another existing array. Both perform a shallow copy. A shallow copy means the contents (each element) contains references to the same object as the elements in the original array. A deep copy (which neither of these methods performs) would create a new instance of each element's object, resulting in a different, yet identacle object.

Question: Is there an equivalent of exit() for quitting a C# .NET application ? Answer: Yes, you can use System.Environment.Exit(int exitCode) to exit the application or Application.Exit() if it’s a Windows Forms app. Question: Is there a way to force garbage collection ? Answer: Yes. Set all references to null and then call System.GC.Collect(). If you need to have some objects destructed, and System.GC.Collect() doesn’t seem to be doing it for you, you can force finalizers to be run by setting all the references to the object to null and then calling System.GC.RunFinalizers(). Question: Is there regular expression (regex) support available to C# developers ? Answer: Yes, The .NET class libraries provide support for regular expressions. Look at the System.Text.RegularExpressions namespace. Question: What is the difference between a struct and a class in C# ? Answer: From language spec: The list of similarities between classes and structs is as follows. Longstructs can implement interfaces and can have the same kinds of members as classes. Structs differ from classes in several important ways; however, structs are value types rather than reference types, and inheritance is not supported for structs. Struct values are stored on the stack or in-line. Careful programmers can sometimes enhance performance through judicious use of structs. For example, the use of a struct rather than a class for a Point can make a large difference in the number of memory allocations performed at runtime. The program below creates and initializes an array of 100 points. With Point implemented as a class, 101 separate objects are instantiated-one for the array and one each for the 100 elements. Question: Why do I get a syntax error when trying to declare a variable called checked ? Answer: The word checked is a keyword in C#. Question: Are private class-level variables inherited ? Answer: Yes, but they are not accessible, so looking at it you can honestly say that they are not inherited. But they are. Question: What is the difference between the C#.NET and VB.NET ? Answer: VB.NET - It didn't have the XML Documentation. - It didn't have the Operator Overloading. - It didn't have the Pointer Type variables. C#.NET - It has XML Documentation, Operator Overloading and supports Pointer Variables using unsafe keyword. Question: Is it possible to inline assembly or IL in C# code ? Answer: No. Question: What is the syntax for calling an overloaded constructor within a constructor (this() and constructorname() does not compile) ?

Answer: The syntax for calling another constructor is as follows: class B { B(int i) { } } class C : B { C() : base(5) // call base constructor B(5) { } C(int i) : this() // call C() { } public static void Main() {} }. Question: What optimizations does the C# compiler perform when you use the /optimize+ compiler option ? Answer: The following is a response from a developer on the C# compiler team: We get rid of unused locals (i.e., locals that are never read, even if assigned). We get rid of unreachable code. We get rid of try-catch with an empty try. We get rid of try-finally with an empty try. We get rid of try-finally with an empty finally. We optimize branches over branches: gotoif A, lab1 goto lab2: lab1: turns into: gotoif !A, lab2 lab1: We optimize branches to ret, branches to next instruction, and branches to branches.

Related Documents

New Exp Faqs
November 2019 8
New 21st Faqs
November 2019 4
Faqs
November 2019 58
Faqs
November 2019 56
Faqs
May 2020 26
Faqs
May 2020 28