Interview Questions Mahesh

download Interview Questions Mahesh

of 17

Transcript of Interview Questions Mahesh

  • 8/6/2019 Interview Questions Mahesh

    1/17

    . NET Questionnaire

    1

    1. What is .NET?2. What are the Features of .NET?3. What are the Components of .NET?4. What is the role of CLR in .NET framework?5. What is Managed Code?

    6. What is Unmanaged Code?7. What is a Pure Compiler?8. What is an Assembly?9. What are types of Assemblies?10.What is the difference between Private and Shared Assemblies?11.What is Satellite Assembly?12.Difference between Static and Dynamic Assemblies?13.What is GAC?14.In How many ways we can copy the Assembly into GAC? What are they?15.What is Strong Name?16.Describe about the parts of Strong Name?

    17.Which tool is used to create the strong name?18.What are the contents of Assembly?19.What is MSIL?20.What are the contents of MSIL?21.What is Manifest?22.What are the contents of Manifest?23.What is Meta Data?24.What is PE file?25.Which tool is used to create PE file?26.What is the role of JIT Compiler?27.What is Language Interoperability? What support Microsoft is providing for this?28.What is a Namespace?29.What is the Global Namespace in .NET?30.What is Globalisation? What support Microsoft provides for Globalisation?31.What are the Basic data types available in .NET?32.What is Boxing? And what is Unboxing?33.What are the differences between Value Types and Reference Types?34.What is CCW?35.What is RCW?36.What is CAS?37.What is CLS?

    38.What is CTS?39.What is the purpose of ILdasm. Exe tool?40.What is COFF?41.What is Automatic Memory Management?42.What is the Role of Garbage Collector?43.What is the role of Optimising Engine?44.Explain about the Generations in Automatic Memory Management?45.What is the Physical Location of the Assemblies?46.What is GUID?47.What is DLL Hell? How Microsoft solved this problem in .NET?48.What is Versioning Problem? How Microsoft solved this problem in .NET?

    49.What is Culture information?50.What is the physical location of GAC?

  • 8/6/2019 Interview Questions Mahesh

    2/17

    . NET Questionnaire

    2

    ASP.NET

    1. What are the different types of caching ?Output caching, Fragment Caching and Data caching.

    2. What do you mean by authentication and authorization ?Authentication is the process of validating a user on the credentials(username and password) and

    authorization performs after authentication. After Authentication a user will varified for performingthe various tasks, It access is limited it is known as authorization.

    3. What is Satellite Assemblies?Satellite assemblies hold the cultural information. Cultural refers the cultural information about theregion in the application is going to use.

    4. What are different types of directives in .NET?Page, Output cache, Register

    5. What is difference between server side and client side scripting?6. Difference between Server.Transfer and Response.redirect ?7. How to use Dataview property ?

    8. How to reflect updation of data in dataset to database ?9. What is is advantage of Dataset over Datareader ?10. What is advantage of Datareader over dataset ?11. What are the different types a command can be execute ? (execute reader, executenonquery.. )

    12. What are different types of validations ?13. What is ViewState ? and how it is managed ?14. What is web.config file ?15. what is the difference between usercontrol and costem control ?16. How you will set the datarelation between two coloumns ?17. What are advantage of viewstate and what are benifits ?18. How doyou turn off cookies in one page of your asp.net application ?19. Dataset is always disconnected ? True20. What is a Dataset ?

    Tough ASP.NET interview questions

    1. Describe the difference between a Thread and a Process?2. What is a Windows Service and how does its lifecycle differ from a standard EXE?3. What is the maximum amount of memory any single process on Windows can address? Is this

    different than the maximum virtual memory for the system? How would this affect a system

    design?

    4. What is the difference between an EXE and a DLL?5. What is strong-typing versus weak-typing? Which is preferred? Why?6. Whats wrong with a line like this? DateTime.Parse(myString7. What are PDBs? Where must they be located for debugging to work?8. What is cyclomatic complexity and why is it important?9. Write a standard lock() plus double check to create a critical section around a variable access.10. What is FullTrust? Do GACed assemblies have FullTrust?11. What benefit does your code receive if you decorate it with attributes demanding specific Security

    permissions?12. What does this do? gacutil /l | find /i about13. What does this do? sn -t foo.dll14. What ports must be open for DCOM over a firewall? What is the purpose of Port 135?15. Contrast OOP and SOA. What are tenets of each16. How does the XmlSerializer work? What ACL permissions does a process using it require?17. Why is catch(Exception) almost always a bad idea?18. What is the difference between Debug.Write and Trace.Write? When should each be used?19. What is the difference between a Debug and Release build? Is there a significant speed difference?

    Why or why not?

    20. Does JITting occur per-assembly or per-method? How does this affect the working set?21. Contrast the use of an abstract base class against an interface?22. What is the difference between a.Equals(b) and a == b?

    23. In the context of a comparison, what is object identity versus object equivalence?24. How would one do a deep copy in .NET?25. Explain current thinking around IClonable.

    http://www.techinterviews.com/?p=193http://www.techinterviews.com/?p=193
  • 8/6/2019 Interview Questions Mahesh

    3/17

    . NET Questionnaire

    3

    26. What is boxing?27. Is string a value type or a reference type?

    1. Explain dotnet framework ?The dot net Framework has two main components CLR and .NET Libraries. CLR (commonlanguage runtimes), that actually runs the code manages so many things for example code

    execution, garbage collection, memory allocation, thread management etc. Apart from CLR, the.NET framework contains .NET libraries, which are collection of namespaces and classes. Theclasses and namespaces are kept in a systematic way and can be used in making any application,code reuability etc. The root namespace of .NET framework is System, with this namespace manynamespaces like web (system.web), data (system.data), windows (system.windows) are generatedwhich can be further have their namespaces.

    2. What is the difference between Metadata and Menifest ?

    Menifest descriubes the assembely itself. Assembely name, version number, culture information.strong name, list of all files, type refernce and reference assembely. While the Metadata describesthe contents within the assembely. like classes, interfaces, namespaces, base class, scope,properties and their parameters etc.

    3. What are public and private assemblies ? differences and scope ?Public assembly are the dll/exe file that can be used in different application. The main advantage ofpublic assemblies is code reusability. These can be used in different machine on differentcomputers. These are also called as shared assemblies. Private assembly is the assembelyinfo.csor assembelyinfo.vb file within an application. An application must have one private assembely,outside this application there is no scope of privaet assembely.

    4. What is an Assembly ?Assemblies are the fundamental buildung block of .NET framework. They contains the type andresources that are useful to make an application. Assembly enables code reuse, version control,security and deployment. An assembely can have four parts : Menifest, Type metadata, MSIL andResource file

    5. What is GAC ?GAC (global assembelu cache) Its an space (directory C:\winnt\assembely) on the server where allthe shared assemblies are registrered and that can be used in the application for code reuse.

    6. What do you know about Machine.Config file ?Its a base configuration file for all .NET assemblies running on the server. It specifies a settingsthat are global to a perticular machine.

    7. Different types of authentication modes in .NET Framework ?Windows, Forms, Passport and None.

    8. What is Strong name ?Strong name ensures the uniqueness of assembely on the server. A strong name incudesinformation about Assembely version, Public/Private Key token, Culture information and ASsembelyname.

    9. Where does the GAC exist?By default C:\\assembely e.g c:\winnt\assembely or c:\windows\assembely

    10. What are different types that a variable can be defined and their scopes?Public- Can be accessed anywhere Private- anywhere in the same class Protected with in theclass and the class that inherits this class Friend- Members of the class within the assemblyProtected friend- member of assembly or inheriting class.

    11. What is DLL HELL?Previously (when using VB) we can have a situation that we have to put same name dll file in a

    single directory , but the dlls are of different versions. This is known as dll hell.12. What is COM, COM+ and DCOM ?COM (Component Object Model) is a standard that is used to for communication between OS andthe softwares. COM is used to create reusable software componentsCOM+: COM+ is an extension of Component Object Model (COM). COM+ is both an OOParchitecture and a set of operating system services.DCOM is an extension of the Component Object Model (COM) that allows COM components tocommunicate across network boundaries. Traditional COM components can only performintercrosses communication across process boundaries on the same machine. DCOM uses theRPC mechanism to transparently send and receive information between COM components (i.e.,clients and servers) on the same network.

    13. What is boxing and unboxing ?Implicit (manual) conversion of value type to reference type of a variable is known as BOXING, forexample integer to object type conversion. Conversion of Boxed type variable back to value type iscalled as UnBoxing.

    14. What is connected and disconnected database?

  • 8/6/2019 Interview Questions Mahesh

    4/17

    . NET Questionnaire

    4

    Connected and Disconnected database basically the approach that how you handle the databaseconnection, It may be connected that once the application starts you have to open the connectiononly for a single time and then performs many transactions and close the connection just before exitthe application. This approach will be generally used in windows based application. On other handdisconnected architecture refers to open and close the connection for each time while performing atransaction.

    15. What is garbage collection and how it works ?

    Garbage Collection is Automatic Memory Manager for the dotnet framework. It manages thememory allocated to the .NET framework. CLR takes cares about .NET framework. When avariable is defined, Its gets a space in the memory and when the program control comes out of thatfunction the scope of variable gets ended, so the garbage collection acts on and memory willreleases.

    16. Describe the role of inetinfo.exe, aspnet_isapi.dll andaspnet_wp.exe in the page loading process.inetinfo.exe is the Microsoft IIS server running, handling ASP.NET requests among other things.When an ASP.NET request is received (usually a file with .aspx extension),the ISAPI filteraspnet_isapi.dll takes care of it by passing the request to the actual worker process aspnet_wp.exe.

    17. Whats the difference between Response.Write() andResponse.Output.Write()?The latter one allows you to write formatted output.

    18. What methods are fired during the page load?init() - when the page is instantiated, Load() - when the page is loaded into server memory,PreRender() - the brief moment before the page is displayed to the user as HTML, Unload() - when

    page finishes loading.19. Where does the Web page belong in the .NET Framework class hierarchy?System.Web.UI.Page

    20. Where do you store the information about the users locale?System.Web.UI.Page.Culture

    21. Whats the difference between Codebehind="MyCode.aspx.cs" and Src="MyCode.aspx.cs"?CodeBehind is relevant to Visual Studio.NET only.

    22. Explain the differences between Server-side and Client-side code?Server-side code runs on the server. Client-side code runs in the clients browser.

    23. What type of code (server or client) is found in a Code-Behind class?Servr-side code.

    24. Should validation (did the user enter a real date) occur server-side or client-side? Why?Client-side, this reduces an additional request to the server to validate the users input.

    25. What does the "EnableViewState" property do? Why would I want it on or off?It enables the view state on the page. It allows the page to save the users input on a form.

    26. What is the difference between Server.Transfer and Response.Redirect? Why would I choose one overthe other?

    Server.Transfer is used to post a form to another page. Response.Redirect is used to redirect theuser to another page or site.

    27. Can you explain the difference between an ADO.NET Dataset and an ADO Recordset?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 datasource. Data in a DataSet is bulk-loaded, rather than being loaded on demand. There's no conceptof cursor types in a DataSet. DataSets have no current record pointer You can use For Each loopsto move through the data. You can store many edits in a DataSet, and write them to the originaldata source in a single operation. Though the DataSet is universal, other objects in ADO.NET comein different versions for different data sources.

    28. Can you give an example of what might be best suited to place in the Application_Start andSession_Start subroutines?

    This is where you can set the specific variables for the Application and Session objects.29. If Im developing an application that must accommodate multiple security levels though secure login and

    my ASP.NET web application is spanned across three web-servers (using round-robin load balancing)what would be the best approach to maintain login-in state for the users?

    Maintain the login state security through a database.30. Can you explain what inheritance is and an example of when you might use it?

    When you want to inherit (use the functionality of) another class. Base Class Employee. A Managerclass could be derived from the Employee base class.

    31. Whats an assembly?Assemblies are the building blocks of the .NET framework.

    32. Describe the difference between inline and code behind?Inline code written along side the html in a page. Code-behind is code written in a separate file andreferenced by the .aspx page.

    33. Explain what a diffgram is and a good use for one?

    The DiffGram is one of the two XML formats that you can use to render DataSet object contents toXML. For reading database data to an XML file to be sent to a Web Service.34. What is MSIL, and why should my developers need an appreciation of it if at all?

  • 8/6/2019 Interview Questions Mahesh

    5/17

    . NET Questionnaire

    5

    MSIL is the Microsoft Intermediate Language. All .NET compatible languages will get converted toMSIL.

    35. Which method do you invoke on the DataAdapter control to load your generated dataset with data?.Fill() method isused.

    36. Can you edit data in the Repeater control?No, it just reads the information from its data source

    37. Which template must you provide, in order to display data in a Repeater control?

    Item Template38. How can you provide an alternating color scheme in a Repeater control?

    Use the Alternating Item Template39. What property must you set, and what method must you call in your code, in order to bind the data from

    some data source to the Repeater control?You must set the DataSource property and call the DataBind method.

    40. What base class do all Web Forms inherit from?The Page class.

    41. Name two properties common in every validation control?ControlToValidate property, ErrorMessage and Text property.

    42. What tags do you need to add within the asp:datagrid tags to bind columns manually?Set AutoGenerateColumns Property to false on the datagrid tag

    43. What tag do you use to add a hyperlink column to the DataGrid?44. What is the transport protocol you use to call a Web service?

    SOAP is the preferred protocol.45. True or False: A Web service can only be written in .NET?False

    46. What does WSDL stand for?Web Services Description Language

    47. Where on the Internet would you look for Web services?http://www.uddi.org

    48. Which property on a Combo Box do you set with a column name, prior to setting the DataSource, todisplay data in the combo box?

    DataTextField property49. Which control would you use if you needed to make sure the values in two different controls matched?

    CompareValidator Control50. True or False: To test a Web service you must create a windows application or Web application to

    consume this service?False, the webservice comes with a test page and it provides HTTP-GET method to test.

    51. How many classes can a single .NET DLL contain?It can contain many classes.

    52. What is the difference between user controls and custom controls?CUSTOM CONTROLS are DLL's. It can be placed in the toolbox. Drag and drop controls.USER CONTROLS: are pages (.ascx).It can not be placed in the tool box.

    53. What are the 3 types of session state modes?nproc-session kept as live object in the web server(aspnet_wp.exe)Stateserver-Session serialized and stored in memory in a seperate process(aspnet_state.exe),wecan use for webform architecture.SQLServer-Session serialized and stored in sql server.

    54. What are the 6 types of validation controls in ASP.NET?1. Required Field validator. 2. Range validator. 3. Regular Expression validator. 4. Comparevalidator. 5. custom validator. 6. Validation summary.

    55. What are the 3 types of caching in ASP.NET?

    Output Caching (Page Caching)- stores the responses from an asp.net page(aspx) or usercontrol(.ascx).Fragment Caching (Partial Caching)- Only stores the portion of a page.Data Caching is the programmatic way to your objects to a managed cache.//Add item Cache["TopProducts"] = objTopProductsDataset;//Retrieve item objDataset = Cache["TopProducts"];

    56. How to Manage state in ASP.NET?We can manage the state in two ways Client based techniques are View state, Query strings andCookies. Server based techniques are Application and Session

    57. What is the difference between overloading and shadowing?Overloading ----------- A Member has the name, but something else in the signature is different.Shadowing --------- A member shadows another member if the derived member replaces the basemember

    58. What is the difference between overloading and overriding?

    Overloading: Method name remains the same with different signatures.Overriding: Method name and Signatures must be the same.59. What is the difference between Manifest and Metadata?

    http://www.uddi.org/http://www.uddi.org/
  • 8/6/2019 Interview Questions Mahesh

    6/17

    . NET Questionnaire

    6

    Manifest: Manifest describes assembly itself. Assembly Name, version number, culture, strongname, list of all files, Type references and referenced assemblies.Meta Data: Metadata describes contents in an assembly classes, interfaces, enums, structs, etc.,and their containing namespaces, the name of each type, its visibility/scope, its base class, theinterfaces it implemented, its methods and their scope, and each methods parameters, typesproperties, and so on.

    60. What is Boxing and Unboxing?

    Boxing is an implicit conversion of a value type to the type objectint i = 123; // A value typeObject box = i // Boxing

    CASTING: casting is the process of converting a variable from one type to another (from a string toan integer)Unboxing is an explicit conversion from the type object to a value type

    int i = 123; // A value typeobject box = i; // Boxingint j = (int)box; // Unboxing

    61. What are the method parameters in c#?C# is having 4 parameter types which are 1.Value Parameter. Default parameter type. Only Input2.Reference (ref) Parameter. Input\Output 3. Output (out) Parameter. 4. Parameter (params) Arrays

    62. What are value types and reference types?Value type bool, byte, char, decimal, double, enum, float, int, long, sbyte, short, strut, uint, ulong,ushort Value types are stored in the StackReference type class, delegate, interface, object, string Reference types are stored in the Heap

    63. What are the two activation modes for .NET Remoting?1. Singleton 2. Singlecall

    64. What's single call Activation mode used for?The Server Object is instantiated for responding to just one single request

    65. What's the singleton Activation mode used for?The server object is instantiated for responding number of clients

    66. What are the channels and Formatters?Channels HTTP and TCP Binary Over TCP is most efficient SOAP over HTTP is most interoperableFormatters Binary and SOAP

    67. What are the two Authentication modes for SQL server connection?Trusted Connection - Windows AuthenticationNon trusted Connection - Sql Server Authentication (its preferable for web services)

    68. What is typed dataset?Data Access is normally done using indexes on collections in object model. In ADO.NET it ispossible to create a variation on a Dataset that does support such syntax. Such Dataset is called"Typed Dataset". Errors in the syntax are detected during compile time rather than runtime.Advantages of Typed Dataset:The data designer tool generates typed Datasets.When we type the name of a dataset while writing a code, we get a list of all available tables in thedataset. No need to remember the table names. For (eg) instead of typing my Dataset. Tables("products") we can type my dataset.products.

    69. What is DataReader?DataReader is a read only stream of data returned from the database as the query executes. Itcontains one row of data in memory at a time and is restricted to navigating forward only in theresults one record at a time.

    Datareader supports access to multiple result sets but only one at a time and in the order retrieved.In ADO data is no longer available through the Datareader once the connection to the data sourceis closed which means a Datareader requires a connection to the Database throughout its usage.o/p parameters or return values are only available through the Datareader once the connection isclosed.

    70. Difference between Dataset and Recordset?The Recordset was not XML-based and could not be serialized to XML easily or flexibly. Finally, aRecordset was not independent of a data store because it tracked a Connection object and throughits methods could send queries to the data source to populate, update, and refresh its data. To thatend, the Recordset contained functionality found in the ADO.NET Dataset, data reader, and dataadapter objects. Similar to the Dataset, a Recordset could be disconnected from its data store andtherefore act as an in-memory cache of data. Of course, it could also be used in a connected modeldepending on the cursor options that were set. Although the Recordset object stored multipleversions of each column for each of its rows, it was not by nature able to represent multiple tables

    without the use of the Data Shape Provider.71. What is an Assembly, Private Assembly and Shared Assembly, Strong Name?

  • 8/6/2019 Interview Questions Mahesh

    7/17

    . NET Questionnaire

    7

    Assembly: Assemblies are basically the compiled code in .Net which contains the code in MicrosoftIntermediate Langauge and one more thing that assemblies do for us as compared to dlls is theycan maintain versioning with the help of the manifest. You dont need to register the assembliesafter compiling like we needed in dlls. You can put the assemblies in the bin folder and refer thenamespaces from there. In short find the assembly description as:Assemblies are the building blocks of .NET Framework applications; they form the fundamental unitof 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 offunctionality. An assembly provides the common language runtime with the information it needs tobe aware of type implementations. To the runtime, a type does not exist outside the context of anassembly.Private assembly is used inside an application only and does not have to be identified by a strongnameShared assembly can be used by multiple applications and has to have a strong name.Strong Name: A strong name includes the name of the assembly, version number, culture identity,and a public key token.

    72. What is a Delegate?A Delegate is a strongly typed function pointer. A delegate object encapsulates a reference to amethod.

    73. What are web services?A Web Service is an application that delivers a service across the Internet using the standards and

    technologies defined in the Web Services architecture in a platform-independent and language-neutral fashion. Web Services rely on several XML protocols based on open standards that arecollectively known as the Web Services architecture

    74. Define Automatic memory Management:C# Provides Automatic memory Management. Automatic memory Management increases codequality and enhances developer productivity without negatively impacting either expressiveness orperformance. Developers are freed from this burdensome task.

    75. Define Threading:It's a process of creating applications that can perform multiple tasks independently.

    76. Difference between XML AND HTML?XML: User definable tags. Content driven End tags required for well formed documents Quotesrequired around attributes values Slash required in empty tagsHTML: Defined set of tags designed for web display Format driven End tags, Quotes and Slash notrequired.

    77. What is XSLT and what is its use?XSL Transformations (XSLT) is yet another popular W3C specification that defines XML-basedsyntax, used to transform XML documents to any other text format, such as HTML, text, XML, etc.XSLT style sheets can be applied on the source XML document to transform XML into some otherXML, or text, HTML, or any other text format.

    78. What is Diffgram?It's an XML format. It's one of the two xml formats that uses to render Dataset object contents toXML. For reading database data to an XML file to be sent to a webservice.

    79. What is the Role of XSL?Querying a database and then formatting the result set so that it can be validated as an XMLdocument allows developers to translate the data into an HTML table using XSLT rules.Consequently, the format of the resulting HTML table can be modified without changing thedatabase query or application code since the document rendering logic is isolated to the XSLT rules

    80. What is SAX?Simple API for XML Processing (SAX) is an alternative to DOM, and can be used to parse XML

    documents. SAX is based on streaming model. The SAX parser reads input XML stream andgenerates various parsing events that an application can handle. With each parsing event, theparser sends sufficient information about the node being parsed. Unlike DOM, SAX does not buildan in-memory representation of the source XML document, and hence it is an excellent alternativewhen parsing large XML documents, as SAX does not require that much memory (and resources).Unlike DOM, SAX is not defined/controlled by W3C. See http://www.saxproject.org/ for details.

    81. Give a few examples of types of applications that can benefit from using XML.XML allows content management systems to store documents independently of their format, whichthereby reduces data redundancy. Another answer relates to B2B exchanges or supply chainmanagement systems. In these instances, XML provides a mechanism for multiple companies toexchange data according to an agreed upon set of rules. A third common response involveswireless applications that require WML to render data on hand held devices.

    82. When constructing an XML DTD, how do you create an external entity reference in an attribute value?When using SGML, XML DTDs don't support defining external entity references in attribute values.

    83. Give some examples of XML DTDs or schemas that you have worked with.Although XML does not require data to be validated against a DTD, many of the benefits of usingthe technology are derived from being able to validate XML documents against business or

  • 8/6/2019 Interview Questions Mahesh

    8/17

    . NET Questionnaire

    8

    technical architecture rules. Polling for the list of DTDs that developers have worked with providesinsight to their general exposure to the technology. Commonly used DTDs such as FpML,DocBook, HRML, and RDF, as well as experience designing a custom DTD for a particular project

    84. What is SOAP and how does it relate to XML?The Simple Object Access Protocol (SOAP) uses XML to define a protocol for the exchange ofinformation in distributed computing environments. SOAP consists of three components: anenvelope, a set of encoding rules, and a convention for representing remote procedure calls.

    Unless experience with SOAP is a direct requirement for the open position, knowing the specifics ofthe protocol, or how it can be used in conjunction with HTTP, is not as important as identifying it asa natural application of XML.

    85. What is WSDL?Another key standard in the Web Services architecture is the Web Services Description Languageor WSDL for short. Whereas SOAP is responsible for providing a platform-neutral protocol fortransporting data types and inter application messaging, WSDL is an XML grammar responsible forexposing the methods, arguments, and return parameters exposed by a particular Web Service.

    86. Whats the difference between authentication and authorization?Authentication happens first. You verify users identity based on credentials. Authorization is makingsure the user only gets access to the resources he has credentials for.

    87. Explain loosely coupled events.Loosely coupled events enable an object (publisher) to publish an event. Other objects(subscribers) can subscribe to an event. COM+ does not require publishers or subscribers to know

    about each other. Therefore, loosely coupled events greatly simplify the programming model fordistributed applications.88. Define scalability.

    The application meets its requirement for efficiency even if the number of users increases.89. Define reliability.

    The application generates correct and consistent information all the time.90. Define availability.

    Users can depend on using the application when needed.91. Define security.

    The application is never disrupted or compromised by the efforts of malicious or ignorant users92. Define manageability.

    Deployment and maintenance of the application is as efficient and painless as possible93. Explain durability.

    Make sure that the system can return to its original state in case of a failure.94. Explain integrity.

    Ensure data integrity by protecting concurrent transactions from seeing or being adversely affectedby each others partial and uncommitted results.

    95. Explain consistency.We must ensure that the system is always left at the correct state in case of the failure or successof a transaction.

    96. Explain JIT activation.The objective of JIT activation is to minimize the amount of time for which an object lives andconsumes resources on the server. With JIT activation, the client can hold a reference to an objecton the server for a long time, but the server creates the object only when the client calls a methodon the object. After the method call is completed, the object is freed and its memory is reclaimed.JIT activation enables applications to scale up as the number of users increases

    97. Define Constructors and destructorsCreate and destroy methods - often called constructors and destructors - are usually implementedfor any abstract data type. Occasionally, the data type's use or semantics are such that there is only

    ever one object of that type in a program. In that case, it is possible to hide even the object'shandle' from the user. However, even in these cases, constructor and destructor methods are oftenprovided. Of course, specific applications may call for additional methods, e.g. we may need to jointwo collections (form a union in set terminology) - or may not need all of these.

    98. Which two properties are on every validation control?99. Which template must you provide, in order to display data in a Repeater control?100. Which property on a Combo Box do you set with a column name, prior to setting the Data Source, to

    display data in the combo box?101. Which method do you use to redirect the user to another page without performing a round trip to the

    client?102. Which method do you invoke on the Data Adapter control to load your generated dataset with data?103. Which control would you use if you needed to make sure the values in two different controls matched?104. Where would you use an iHTTP Module, and what are the limitations of any approach you might take in

    implementing one.

    105. Where on the Internet would you look for Web services?106. What is MSIL, and why should my developers need an appreciation of it if at all?107. What is an assembly?

  • 8/6/2019 Interview Questions Mahesh

    9/17

    . NET Questionnaire

    9

    108. What type of code (server or client) is found in a Code-Behind class?109. What tags do you need to add within the asp: data grid tags to bind columns manually?110. What tags do you need to add within the asp: data grid tags to bind columns manually?111. What tag do you use to add a hyperlink column to the Data Grid?112. What property must you set, and what method must you call in your code, in order to bind the data from

    some data source to the Repeater control What property do you have to set to tell the grid which page togo to when using What method do you use to explicitly kill a user s session?

    113. What is "Common Language Runtime" (CLR)?114. When to use Remoting? What is web service?115. What is Web.config?116. What is the transport protocol you use to call a Web service SOAP?117. What is the standard you use to wrap up a call to a Web service?118. What is the difference between Servers? Transfer and Response. Redirect? Why would I choose one

    over the other?119. What is the difference between a namespace and assembly name?

    A namespace is a logical naming scheme for types in which a simple type name, such as MyType,is preceded with a dot-separated hierarchical name. Such a naming scheme is completely undercontrol of the developer. For example, types MyCompany.FileAccess. A andMyCompany.FileAccess.B might be logically expected to have functionally related to file access.The .NET Framework uses a hierarchical naming scheme for grouping types into logical categoriesof related functionality, such as the ASP.NET application framework, or remoting functionality.

    Design tools can make use of namespaces to make it easier for developers to browse andreference types in their code. The concept of a namespace is not related to that of an assembly. Asingle assembly may contain types whose hierarchical names have different namespace roots, anda logical namespace root may span multiple assemblies. In the .NET Framework, a namespace is alogical design-time naming convenience, whereas an assembly establishes the name scope fortypes at run time.

    120. What is the difference between "using System.Data;" and directly adding the reference from "AddReferences Dialog Box"?

    When u compiles a program using command line, u add the references using /r switch.When you compile a program using Visual Studio, it adds those references to our assembly, whichare added using "Add Reference" dialog box. While "using" statement facilitates us to use classeswithout using their fully qualified names. For example: if u have added a reference to"System.Data.SqlClient" using "Add Reference" dialog box then u can use SqlConnection class likethis: System.Data.SqlClient.SqlConnection But if u add a "using System.Data.SqlClient" statementat the start of ur code then u can directly use SqlConnection class. On the other hand if u add areference using "using System.Data.SqlClient" statement, but don't add it using "Add Reference"dialog box, Visual Studio will give error message while we compile the program.

    121. What is Reflection?122. What is managed code and managed data?123. What is Machine.config?124. What is GAC?125. What does WSDL stand for?126. What does the "EnableViewState" property do? Why would I want it on or off?127. What base class do all Web Forms inherit from?128. What are the Types of Assemblies?129. What are the disadvantages of view state/what are the benefits?130. What are HTML controls, Web controls, and server controls131. What are Attributes?

    Attributes are declarative tags in code that insert additional metadata into an assembly. There exist

    two types of attributes in the .NET Framework: Predefined attributes such as Assembly Version,which already exist and are accessed through the Runtime Classes; and custom attributes, whichyou write yourself by extending the System.Attribute class. webFarm Vs webGardens-- A web farmis a multi-server scenario. So we may have a server in each state of US. If the load on one server isin excess then the other servers step in to bear the brunt. How they bear it is based on variousmodels. 1. Round Robin. (All servers share load equally) 2. NLB (economical) 3. HLB (expensivebut can scale up to 8192 servers) 4. Hybrid (of 2 and 3). 5. CLB (Component load balancer). A webgarden is a multi-processor setup. i.e., a single server (not like the multi server above)

    132. How to implement web forms in .Net?Go to web.config and Here for mode = you have 4 options. a) Say mode=inproc (non web farm butfast when you have very few customers). b) Say mode=StateServer (for webfarm) c) Saymode=SqlServer (for webfarm) Whether to use option b or c depends on situation. StateServer isfaster but SqlServer is more reliable and used for mission critical applications. How to usewebgardens in .Net: Go to web.config and webGarden="false"...> Change the false to true. You

    have one more attribute that is related to webgarden in the same tag called cpu Mask. True orFalse: To test a Web service you must create a windows application or Web application to consumethis service.

  • 8/6/2019 Interview Questions Mahesh

    10/17

    . NET Questionnaire

    10

    133. Should validation (did the user enter a real date) occur server-side or client-side? Why?134. In what order do the events of an ASPX page execute. As a developer is it important to understand

    these events?135. How would you implement inheritance using VB.NET/C#?136. How would you get ASP.NET running in Apache web servers - why would you even do this?137. How many classes can a single .NET DLL contain?138. How is a property designated as read-only?

    139. How do you turn off cookies for one page in your site?140. How do you create a permanent cookie?141. How can you provide an alternating color scheme in a Repeater control?142. Explain the differences between Server-side and Client-side code?143. Differences between Datagrid, Datalist and Repeater?

    1. Datagrid has paging while Datalist does not. 2. Datalist has a property called repeat. Direction =vertical/horizontal. (This is of great help in designing layouts). This is not there in Datagrid. 3. Arepeater is used when more intimate control over html generation is required. 4. When onlycheckboxes/radio buttons are repeatedly served then a checkbox list or radio button list are used asthey involve fewer overheads than a Datagrid. The Repeater repeats a chunk of HTML you write, ithas the least functionality of the three. DataList is the next step up from a Repeater; accept youhave very little control over the HTML that the control renders. DataList is the first of the threecontrols that allow you Repeat-Columns horizontally or vertically. Finally, the DataGrid is the motherload. However, instead of working on a row-by-row basis, youre working on a column-by-column

    basis. DataGrid caters to sorting and has basic paging for your disposal. Again you have littlecontrol, over the HTML. NOTE: DataList and DataGrid both render as HTML tables by default. Outof the 3 controls, I use the Repeater the most due to its flexibility w/ HTML. Creating a Paginationscheme isn't that hard, so I rarely if ever use a DataGrid. Occasionally I like using a DataListbecause it allows me to easily list out my records in rows of three for instance.

    144. Describe the difference between inline and code behind - which is best in a loosely coupled solution? --Inline code written along side the html in a page. Code-behind is code written in a separate file andreferenced by the .aspx page.

    145. Can you give an example of what might be best suited to place in the application_Start andSession_Start subroutines? This is where you can set the specific variables for the Application andSession objects.

    146. Explain loosely coupled solution, ASP.NET Authentication Providers and IIS Security.147. What are the disadvantages of server side calendar controls? -- always post back to server, no style

    sheetsDescribe the role of inetinfo.exe, aspnet_isapi.dll andaspnet_wp.exe in the page loading processinetinfo.exe is the Microsoft IIS server running, handling ASP.NET requests among other things. Whenan ASP.NET request is received (usually a file with .aspx extension),the ISAPI filter aspnet_isapi.dlltakes care of it by passing the request to the actual worker process aspnet_wp.exe.

    148. Whats 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 controlscan bubble up their event handlers, allowing the main DataGrid event handler to take care of itsconstituents.

    149. What data type does the RangeValidator control support? Integer, String and Date.150. Where would you use an iHTTPModule, and what are the limitations of any approach you might take in

    implementing one?-- One of ASP.NETs most useful features is the extensibility of the HTTP pipeline,the path that data takes between client and server. You can use them to extend your ASP.NETapplications by adding pre- and post-processing to each HTTP request coming into your application. Forexample, if you wanted custom authentication facilities for your application, the best technique would beto intercept the request when it comes in and process the request in a custom HTTP module.

    151. How security is implemented in asp.net? -- ASP.NET implements authentication using authenticationproviders, which are code modules that verify credentials and implement other security functionalitysuch as cookie generation. ASP.NET supports the following three authentication providers: FormsAuthentication: Using this provider causes unauthenticated requests to be redirected to a specifiedHTML form using client side redirection. The user can then supply logon credentials, and post the formback to the server. If the application authenticates the request (using application-specific logic),ASP.NET issues a cookie that contains the credentials or a key for reacquiring the client identity.Subsequent requests are issued with the cookie in the request headers, which means that subsequentauthentications are unnecessary. Passport Authentication: This is a centralized authentication serviceprovided by Microsoft that offers a single logon facility and membership services for participating sites.ASP.NET, in conjunction with the Microsoft Passport software development kit SDK), provides similarfunctionality as Forms Authentication to Passport users. Windows Authentication: This providerutilizes the authentication capabilities of IIS. After IIS completes its authentication, ASP.NET uses theauthenticated identity's token to authorize access. To enable a specified authentication provider for an

    ASP.NET application, you must create an entry in the application's configuration file as follows: //web.config file

  • 8/6/2019 Interview Questions Mahesh

    11/17

    . NET Questionnaire

    11

    152. Whats a proxy of the server object in .NET Remoting? --Its a fake copy of the server object that resideson the client side and behaves as if it was the server. It handles the communication between real serverobject and the client object. This process is also known as marshaling.

    153. What are remotable objects in .NET Remoting? --Remotable objects are the objects that can bemarshaled across the application domains. You can marshal by value, where a deep copy of the objectis created and then passed to the receiver. You can also marshal by reference, where just a referenceto an existing object is passed.

    154. What are channels in .NET Remoting? -- Channels represent the objects that transfer the otherserialized objects from one application domain to another and from one computer to another, as well asone process to another on the same box. A channel must exist before an object can be transferred.

    155. What is a formatter? -- A formatter is an object that is responsible for encoding and serializing data intomessages on one end, and deserializing and decoding messages into data on the other end. Choosingbetween HTTP and TCP for protocols and Binary and SOAP for formatters, what are the trade-offs?Binary over TCP is the most efficient; SOAP over HTTP is the most interoperable.

    156. Whats Single Call activation mode used for? -- If the server object is instantiated for responding to justone single request, the request should be made in Single Call mode.

    157. Whats Singleton activation mode? A single object is instantiated regardless of the number of clientsaccessing it. Lifetime of this object is determined by lifetime lease.

    158. How do you define the lease of the object? -- By implementing ILease interface whenwriting the class code.

    159. How can you automatically generate interface for the remotable object in .NET with Microsoft tools? Use

    the Soapsuds tool.160. How can you save the desired properties of Windows Forms application? -- .config files in .NET aresupported through the API to allow storing and retrieving information. They are nothing more thansimple XML files, sort of like what .ini files were before for Win32 apps.

    161. So how do you retrieve the customized properties of a .NET application from XML .config file? --Initialize an instance of AppSettingsReader class. Call the GetValue method of AppSettingsReaderclass, passing in the name of the property and the type expected. Assign the result to the appropriatevariable.

    162. Which method is typically used in conjunction with server variables to identify virtual and relativedirectory settings?The Server object has many methods that are used to control the various features of the web server.Some of these are: To ensure that application-level variables are not updated by more than one usersimultaneously, Which of the two methods are used by the Application object?

    163. How security is implemented in asp.net?ASP.NET implement security in three ways a- Forms-based security in this case you set the IISauthentication system to anonymous access to enable the ASP.NET to validate authentication itselfby checking if the user name & Password is equivalent to the same info which is stored anyhow(XML, Database, ...) b- Windows-based security: according to this option any user access thesite must have a registered windows account and a dedicated permissions c-Passport-basedsecurity. This is a centric authentication service in which one login could auto authenticate the userfor many sites where is no need to store the user names & passwords into each site

    164. In my website for eg. it has around 100 aspx. In that I want 20 aspx files should be available to theusers only if they are logged in. How can I achieve this with web.config file?

    All what you have to do is to create a folder then move your required files into it then configure theweb.config as follows : // or you can write your pages names instead of folder name

    165. What do you meant by default view?It is the auto generated default view of the table in the dataset, when dealing with any table in a

    dataset, .NET makes a view of that table to can communicate with it so it is the default one166. Difference between stored procedure and stored functions?

    They all do the same functions except the stored functions can return a table and can beimplemented into a select statement like "Select myFunction (some Param)"

    167. I have a file called a.aspx which has some textboxes. I want to post the values to b.aspx without usingresponse.redirect. How can I do this?

    You can use session variables to store this a.aspx textboxes Like session ["myVar"]=TextBox1.Txt.168. Different between DataGrid and DataList?

    The DataGrid is designed to show a table-like data to the user but the DataList is designed to showa row-like data.

    169. If one web form inherits another web form, is the derived web form able to access base class?170. Technically, to whom we bind the any controls?171. You create English, French, and German versions of your ASP.NET application. You have separate

    resource files for each language version. You need to deploy the appropriate resource file based on the

    language settings of the server. What should you do?172. You create an ASP.NET page that uses images to identify areas where a user can click to initiateactions. The users of the application use Internet Explorer. You want to provide a pop-up window when

  • 8/6/2019 Interview Questions Mahesh

    12/17

    . NET Questionnaire

    12

    the user moves the mouse pointer over an image and you want the pop-up window to display text thatidentifies the action that will be taken if the user clicks the image. What should you do?

    173. You create an ASP.NET application that contains confidential information. You use form-basedauthentication to validate users. You need to prevent unauthenticated users from accessing theapplication. What should you do?

    174. Dataset in ado.net can contain how many tables (we all know that dataset can contain many tables butis there any limit or not...and if yes than how many tables?

    175. In ASP.NET, which two properties are present on every validation control?176. You are creating an ASP.NET application for your company Techno Inc. Techno Inc data is stored in a

    Microsoft SQL Server 6.5 database. Your application generates accounting summary reports based ontransaction tables that contain million of rows. You want your application to return each summary reportas quickly as possible. You need to configure your application to connect to the database and retrievethe data in a way that achieves this goal. What should you do?

    177. You are creating an ASP.NET application that uses the Microsoft SQL Server .NET Data Provider toconnect to Techno Inc's database. Your database administrator reports that, due to heavy usage of theapplication, data requests are being blocked while users wait for new connections to be created. Youwant to improve throughput by setting a minimum connection pool size of 10.What should you do?

    178. You are creating an ASP.NET application for Gsoft. Customers will use the application to file claimforms online. You plan to deploy the application over multiple servers. You want to save session stateinformation to optimize performance. What are two possible ways to achieve this goal?

    179. You are creating an ASP.NET page for Techno Inc. The page uses string concatenation to gather data

    from multiple e-mail messages and format the data for display on the page. You want to ensure that thepage displays as quickly as possible. What should you do?180. What is the difference between Response.Write() & Response.Output.Write()181. Explain the differences between Server-side and Client-side code? A. Server-side code executes on the

    server. Client-side code executes in the context of the clients' browser.182. What are some ways to manage state in an ASP.Net application? A. Session objects, Application

    objects, ViewState, cookies, hidden form fields.183. What does the "EnableViewState" property do? Why would I want it on or off? A. It allows page objects

    to save their state in a Base64 encoded string in the page HTML. One should only have it enabled whenneeded because it adds to the page size and can get fairly large for complex pages with many controls.(It takes longer to download the page).

    184. What is the difference between Server.Transfer and Response.Redirect? Why would I choose one overthe other? A. Server.Transfer transfers excution directly to another page. Response.Redirect sends aresponse to the client and directs the client (the browser) to load the new page (it causes a roundtrip). Ifyou don't need to execute code on the client, Transfer is more efficient.

    185. How can I maintain Session state in a Web Farm or Web Garden?

    Use a State Server or SQL Server to store the session state.

    186. What does WSDL stand for? What does it do?

    Web Services Description Language. It describes the interfaces and other information of a webservice.

    187. Does C# support multiple-inheritance?

    No, use interfaces instead.

    188. Can you prevent your class from being inherited by another class?

    Yes. The keyword sealed will prevent the class from being inherited.

    189. What does the keyword virtual declare for a method or property?

    The method or property can be overridden.

    190. What's the top .NET class that everything is derived from?

    System.Object.

    191. What does it mean that a String is immutable?

  • 8/6/2019 Interview Questions Mahesh

    13/17

    . NET Questionnaire

    13

    Strings cannot be altered. When you alter a string (by adding to it for example), you are actuallycreating a new string.

    192. If I have to alter a string many times, such as mutliple concatenations, what class should I use?

    StringBuilder. It is not immutable and is very efficient.

    193. In a Try - Catch - Finally block, will the finally block execute if an exception has not occurred? If anException has occurred?

    Yes and yes.

    194. Explain the three tier or n-Tier model.

    Presentation (UI), business (logic and underlying code) and data (from storage or other sources).

    195. What is SOA?

    Service Oriented Architecture. In SOA you create an abstract layer that your applications use toaccess various "services" and can aggregate the services. These services could be databases, webservices, message queues or other sources. The Service Layer provides a way to access theseservices that the applications do not need to know how the access is done. For example, to get afull customer record, I might need to get data from a SGL Server database, a web service and amessage queue. The Service layer hides this from the calling application. All the application knowsis that it asked for a full customer record. It doesn't know what system or systems it came from orhow it was retrieved.

    196. What is the role of the DataReader class in ADO.NET connections?

    It returns a forward-only, read-only view of data from the data source when the command isexecuted.

    197. Is XML case-sensitive?198. Name some of the Microsoft Application Blocks. Have you used any? Which ones? (****)

    Examples: Exception Management ,Logging ,Data Access ,User Interface ,Caching ApplicationBlock for .NET ,Asynchronous Invocation Application Block for .NET ,Configuration ManagementApplication Block for .NET From which one of the following locations.

    199. Does the garbage collector remove objects?200. Briefly explain how code behind works and contrast that using the inline style?201. What are HTML controls, Web controls, and server controls?202. Briefly explain how the server control validation controls work?203. Briefly explain what user controls are and what server controls are and the differences between the two?204. Briefly explain how server form post-back works (perhaps ask about view state as well).

    205. Can the action attribute of a server-side tag be set to a value and if not how can you possiblypass data from a form page to a subsequent page. (Extra credit: Have you heard of comdna. :-)206. What the difference between User Control and Custom Control?207. For "pattern matching" which Validation control You will choose?208. Is it possible a ASPX page contain more than One Scripting Language?209. Where the default session data stored in ASP.NET?210. You Create an ASP.NET Application for online Ordering. You need to store a small amount of secured

    information. The Page must work properly for browsers that do not support cookies. You anticipate thatthe volume of orders on the site will be high and you need to conserve server resources. What shouldyou do?

    211. In the ValidationExpression property of the RegularExpressionValidator control, Which sign allows anyvalue to be entered?

    212. Which event stored in the Global.asax file is fired when the first ASP.NET page in the current applicationdirectory (or its sub-directories) is called?

    213. In the ValidationExpression property of the RegularExpressionValidator control, Which sign specifies

    that checking starts from here?214. A summary of the errors occurring in a page can be displayed in which of the following formats?

  • 8/6/2019 Interview Questions Mahesh

    14/17

    . NET Questionnaire

    14

    215. Comparision of values entered into a control with a specified pattern, is made possible by which of thefollowing controls?

    216. What should be done in order to disable client-side validation?217. Which property of the radio button control restricts the user to select only one option from a given set of

    options?218. Which are the rich Controls provided by ASP.NET?219. With the help of which property is it possible to check whether an .ASPX page is posted back to the

    server?220. How many forms can be added in asp.net?221. Which interface is used by ASP.NET to create unique Ids?222. The trace tag in the web.config file uses which of the following parameters to describe whether the

    statistics should be arranged according to time or category?223. Which of the following methods does ASP.NET provide to print messages in the trace information block

    of the page?224. Which of the following methods are used to write the Trace object?225. What happens in the following code? Response.Cache.SetExpires(DateTime.Now.AddSeconds(30));

    Response.Cache.SetSlidingExpiration(true);226. Which property of the Session object is used to set the local identifier?227. Which type of Caching is supported by ASP.NET?228. Which element of the ADRotator control specifies the priority of the advertisement in the shedule of

    rotation of all advertisements?

    229. Which of the following classes should we import in order to set the duration of the cache?230. What is the event handler that occurs when a user leaves application by closing his browser?231. Is OleDbDataReader allows forward and backward row navigation?232. Which OleDbCommand class property is used to specify the SQL command or stored procedure to

    execute?233. How to retrieve the item in DataGrid when it is added in footer?234. Page Processing steps ASP.Net Order of events235. Which one of following serialization is used to serialize public and private data?236. What should be done in order to create a permanent cookie?237. Which property do we use to remove cookies from one page?238. How do you change the Page Title in ASP.NET dynamically?239. Which of the following codes help you automatically refresh your web page after 20 seconds?240. For displaying the sales data of past 5 years in a DataGrid on a Web Form(good Performance), the best

    strategy to use in retrieving the data is?241. Which tools would be set to create the .snk (Strong Names) files to store the public/private keys in?242. For obtaining performance information about Web Application, which of the following will be used?243. Security is very important on any web site. By default, a .Net web site is configured with which of the

    following authentication types?244. For providing on-line help for the users what should be done?245. Which type of files should be place in /bin directory user the virtual directory?246. In asp.net, if several hundred users want to access the data from sql server 2000 then for improving the

    performance what should be done?247. Which is the most appropriate place to install a Strong-Named assembly that is intended for use among

    several web applications?248. In ASP .Net Page class, which event would be attached to an event published by a control on the web

    page?249. In global.asax file which event will occur first when you invoke an application?250. In order to debug and trace application execution, what namespace should you use?251. Which of the following Methods would be used in displaying an Alert Message Box from

    System.Web.UI.WebPage?252. How many ways are there to maintain states in an ASP.net application ?253. Which is a key element of a Web application?254. Which one contains the style definitions to use for the HTML generated by project?255. How to define a class which can be stored in viewstate?256. With the help of which property is it possible to check whether an .ASPX page is posted back to the

    server?257. Which of the following channels used by .Net Remoting for communication across boundaries?258. Does the .NET Framework have in-built support for serialization?259. How do we know exactly when an Application_End event will occur at runtime? use imperative security

    rather than declarative security260. Do Web controls support Cascading Style Sheets?261. Is he "EnableViewState" is allows the page to save the users input on a form?262. Which of MS platform will be used to create Web applications and Web services that run under IIS?

    263. What web form event handler will be triggered when the Page object is released from memory?264. Which namespace contains classes for the Session object?265. What web form event handler will be triggered as the first step in your Web forms life cycle?

  • 8/6/2019 Interview Questions Mahesh

    15/17

    . NET Questionnaire

    15

    266. In order to debug and trace application execution, what namespace should you use IIS gives certainoptions for how the server will run Web application. For pure performance, which option should beused?

    267. What is the event handler that occurs at the beginning of each request to the server to turn Sessionstate off for a Web form?

    268. What is the base type of a data source object in ASP.NET data-binding?269. Can we use Query String with the Server.Transfer and Server.Execute ?

    270. What is the sequence of methods which get fired during a page load and unload?271. What data type does the RangeValidator control support?272. Difference between Server.Transfer() & Response.Redirect() methods?273. Which of the following is the standard column type in the DataGrid?274. What are the different methods to access Database in .Net ?275. An ASP.NET Web application have been developed that supports caching. Specifically, we use output

    caching for all user controls. Each user control is loaded by calling the LoadControl method of the Pageclass. We want to debug one of the pages that contain a user control before the user control has beencached. What exactly should we examine in a Watch window to discover property values of the loadeduser control?

    276. An ASP.NET Web application is developed, that uses a Calendar control on one of its pages. Usershave complained that after selecting several dates on the control, they have to click the Back button inthe browser multiple times before they are directed to a previous page. What is the solution of thisproblem?

    277. In Writing an ASP.NET Web application that uses a SQL Server 2000 database to store software bugs.You want the database to be automatically created on the target machine when the ASP.NETapplication is deployed. You decide to create a Setup project to solve this problem. What two things canyou do to your Setup project,ASP.NET Web application project, or both, that will allow you to accomplish this? (Choose two. Eachanswer presents part of the complete solution.)

    278. What is the name of the JavaScript function generated by ASP.NET's Page.RegisterClientScriptBlockmethod?

    279. Which one of the following is NOT a valid state management tool?280. How many maximum numbers of cookies are allowed to your site?281. Which DataSource object assigned to the data Web control's DataSource property?282. Which of the following data source is the forward only connection to the result set?283. Which control provides no visible interface elements?284. Which class is used to execute the SQL statement or stored procedure against a data source?285. Which of the following method of the command class returns an integer value, that indicates the number

    of rows affected by the query?286. By default, when does validation automatically occur?287. A relationship within a Dataset is represented by which one of the following?288. What is the command line utility used to create a proxy class for a Web Service?289. What type of processing model does ASP.NET simulate?290. Once ASP.NET automatically parses and compiles the global.asax file into a dynamic .NET Framework

    class, which base class is extended?291. Which property of the AdRotator control points to the file with the information required to work?292. What is the difference between output cache and ASP.NET data cache?293. Your ASP.NET application resides in the virtual directory called "MyStore." The parent web directory has

    a web.config file. Your application has no web.config file in it. The Mode attribute of the CustomErrorstag in the parent web.config file is set to "Off." Referring to the parameters above, what is the result ifNO error handling code is written.

    294. How do we register a channel that listens on a specific port more than once?

    295. When a client calls a method on a remote object, the parameters as well as other details related to thecall are transported to the remote object through a class becomes a component when it conforms to astandard for component interaction. This standard is provided through what interface IChannel interfaceprovides which of the following informational properties?

    296. How to view DataGrid pages randomly?297. Name the event that fires the script needed for updating the data in the DataGrid? (ASP.NET)298. What do the Advertisement file contains in the AdRotator component (ASP.NET)?299. What is UDDI stands for?300. WebRequest class is derived from HttpWebRequest Class found in System.Web. - True or False301. What is the current problem for asp.net email object with .NET framework? Means is there facility in

    asp.net for validate SMTP mail servers?302. We can only send emails using System.Web.Mail.SMTP class, not to receive mails. - True or False303. What is the default authentication method for IIS?304. What is the name of the default JavaScript file which validates the web forms when we use validation

    controls?305. While switching from one page to another which of the following method allow you to pass additionalinformation?

  • 8/6/2019 Interview Questions Mahesh

    16/17

    . NET Questionnaire

    16

    306. Hows the DLL Hell problem solved in .NET?Assembly versioning allows the application to specify not only the library it needs to run (which wasavailable under Win32), but also the version of the assembly.

    307. What namespaces are necessary to create a localized application?System.Globalization, System.Resources.

    308. Whats the difference between // comments, /* */ comments and /// comments?Single-line, multi-line and XML documentation comments.

    309. How do you generate documentation from the C# file commented properly with a command-linecompiler?

    Compile it with a /doc switch.310. Whats the difference between and XML documentation tag?

    Single line code example and multiple-line code example.311. What debugging tools come with the .NET SDK?

    CorDBG command-line debugger, and DbgCLR graphic debugger. Visual Studio .NET usesthe DbgCLR. To use CorDbg, you must compile the original C# file using the /debug switch.

    312. What does the this window show in the debugger?It points to the object thats pointed to by this reference. Objects instance data is shown.

    313. What does assert() do?In debug compilation, assert takes in a Boolean condition as a parameter, and shows the errordialog if the condition is false. The program proceeds without any interruption if the condition is true.

    314. Whats the difference between the Debug class and Trace class?

    Documentation looks the same. Use Debug class for debug builds, use Trace class for both debugand release builds.315. Why are there five tracing levels in System.Diagnostics.TraceSwitcher?

    The tracing dumps can be quite verbose and for some applications that are constantly running yourun the risk of overloading the machine and the hard drive there. Five levels range from None toVerbose, allowing to fine-tune the tracing activities.

    316. Where is the output of TextWriterTraceListener redirected?To the Console or a text file depending on the parameter passed to the constructor.

    317. How do you debug an ASP.NET Web application?Attach the aspnet_wp.exe process to the DbgClr debugger.

    318. What are three test cases you should go through in unit testing?Positive test cases (correct data, correct output), negative test cases (broken or missing data,proper handling), exception test cases (exceptions are thrown and caught properly).

    319. Can you change the value of a variable while debugging a C# application?Yes, if you are debugging via Visual Studio.NET, just go to immediate window.

    320. Explain the three services model (three-tier application).Presentation (UI), business (logic and underlying code) and data (from storage or other sources).

    321. What are advantages and disadvantages of Microsoft-provided data provider classes in ADO.NET?SQLServer.NET data provider is high-speed and robust, but requires SQL Server licensepurchased from Microsoft. OLE-DB.NET is universal for accessing other sources, like Oracle, DB2,Microsoft Access and Informix, but its a .NET layer on top of OLE layer, so not the fastest thing inthe world. ODBC.NET is a deprecated layer provided for backward compatibility to ODBC engines.

    322. What is the wildcard character in SQL?Lets say you want to query database with LIKE for all employees whose name starts with La. Thewildcard character is %, the proper query with LIKE would involve La%.

    323. Explain ACID rule of thumb for transactions.Transaction must be Atomic (it is one unit of work and does not dependent on previous andfollowing transactions), Consistent (data is either committed or roll back, no in-between casewhere something has been updated and something hasnt), Isolated (no transaction sees the

    intermediate results of the current transaction), Durable (the values persist if the data had beencommitted even if the system crashes right after).

    324. What connections does Microsoft SQL Server support?Windows Authentication (via Active Directory) and SQL Server authentication (via Microsoft SQLServer username and passwords).

    325. Which one is trusted and which one is UN trusted?Windows Authentication is trusted because the username and password are checked with theActive Directory; the SQL Server authentication is un trusted, since SQL Server is the only verifierparticipating in the transaction.

    326. Why would you use untrusted verificaion?Web Services might use it, as well as non-Windows applications.

    327. What does the parameter Initial Catalog define inside Connection String?The database name is to be connected.

    328. Whats the data provider name to connect to Access database?

    329. What does Dispose method do with the connection object?Deletes the object from the memory.330. What is a pre-requisite for connection pooling?

  • 8/6/2019 Interview Questions Mahesh

    17/17

    . NET Questionnaire

    17

    Multiple processes must agree that they will share the same connection, where every parameter isthe same, including the security settings.