Tuesday, November 4, 2008

at 3:19 AM Posted by senthil 0 comments

1. What is Microsoft .Net?

Microsoft .NET is the latest software development platform / technology / tool from Microsoft based on the Windows operating systems. Microsoft .NETtechnology provides the ability to quickly build, deploy, manage, and use connected, security-enhanced solutions. Microsoft .NET-connected solutions enable businesses to integrate their systems more rapidly and in a better manner and help them realize the promise of information anytime, anywhere, on any device.

2. What is Microsoft .Net Framework?

The Microsoft .NET Framework is the heart and soul of the .Net platform, and is intended to be used by most new applications created for the Windows platform. It is a managed type-safe environment for application development and execution.

Principal Features of Microsoft .Net Framework

  • Interoperability
  • Common Runtime Engine (CLR)
  • Language Independence
  • Base Class Library
  • Simplified Deployment
  • Security
  • Portability


The Microsoft .Net Framwork consists of two main components: The Common Language Runtime (CLR) and the Base Class Library (BCL).

3. What is the Microsoft .Net Common Language Runtime (CLR)?

Applications written for the Microsoft .NET Framework execute in an environment that manages the program's runtime requirements. This runtime environment, is known as the Common Language Runtime (CLR). The CLR can be thought of as the manager of your applications. It provides core services, such as code compilation, memory allocation / reallocation, thread management, garbage collection, and much more. Through the common type system (CTS), it enforces strict type-safety and ensures that code is executed in a safe environment by also enforcing code access security.

4. What is the Microsoft .Net Base Class Library (BCL)?

The Microsoft .Net Framework also consists of a library of classes (Base Class Library) which provides common functionality for programming requirements. The Base Class Library (BCL) is a standard library available to all languages using the Microsoft .NET Framework.

The BCL provides a collection of useful and reusable types (classes / objects) that are designed to integrate with the CLR. The types provided by the Microsoft .NET Framework are object-oriented and fully extensible, and they allow you to seamlessly integrate your applications with the .NET Framework.

The classes that form the framework's Base Class Library cover a large range of programming needs in areas including: user interface, file reading and writing, graphic rendering, data access, database connectivity, cryptography, web application development, web services, XML document manipulation, mobile application development, smart device applications, Class Libraries (DLLs), network communications, etc. The class library is used by programmers who combine it with their own code to develop applications.

The BCL is organized into namespaces. A namespace is a logical grouping of types that perform related functions. For example, the System.Windows.Forms namespace contains all the types that make up Windows forms and the controls used in those forms.

Namespaces are logical groupings of related classes. The namespaces in the Microsoft .NET base class library are organized hierarchically. The root of the .NET Framework is the System namespace. Other namespaces can be accessed with the period operator ( . ). A typical namespace construction appears as follows:

System
System.Data
System.Data.SQLClient
System.Windows.Forms


The namespace names are self-descriptive. Straightforward names make the Microsoft .NET Framework easy to use and allow you to rapidly familiarize yourself with its contents and classes.

5. What languages are available for programming in Microsoft .Net?

Visual Studio .NET (The IDE for Microsoft .Net) ships with languages such as Visual Basic .NET, Visual C#, and Visual C++ with managed extensions, as well as the JScript scripting language. You can also write managed code for the Microsoft .NET Framework in other languages. Third-party tools and compilers exist for Fortran, Cobol, Perl, and a host of other languages. The Common Language Specification (CLS) defines the minimum standards to which .NET language compilers must conform. Thus, the CLS ensures that any source code successfully compiled by a .NET compiler can interoperate with the Microsoft .NET Framework.

6. What is Language Independence? What does cross-language compatibility mean?

The Microsoft .NET Framework is designed for cross-language compatibility. This simply means, that Microsoft .NET components can interact with each other no matter what supported language they were written in originally. So, an application written in Microsoft VB.NET might reference a dynamic-link library (DLL) file written in C#, which in turn might access a resource written in managed Visual C++ or any other .NET language. This language interoperability extends to full object-oriented inheritance. A VB.NET class might be derived from a C# class, for example, or vice versa.

This level of cross-language compatibility is possible because of the CLR. When a Microsoft .NET application is compiled, it is converted from the language in which it was written (VB.NET, C#, or any other .NET-compliant language) to Microsoft Intermediate Language (MSIL or IL). Because all Microsoft .NET executables and DLLs exist as MSIL, they can freely interoperate.

The CTS ensures type compatibility between .NET components. Because Microsoft .NET applications are converted to IL prior to deployment and execution, all primitive data types are represented as .NET types. Thus, a VB Integer and a C# int are both represented in IL code as a System.Int32. Because both languages use a common type system, it is possible to transfer data between components and avoid time-consuming conversions or hard-to-find errors.

7. How is a Microsoft .Net Application compiled? What is MSIL?

Applications written in any language on the .NET Framework compile into an intermediate language known as the Common Intermediate Language, or CIL (formerly known as Microsoft Intermediate Language, or MSIL). MSIL is a low-level language that the CLR can read and understand. In Microsoft's implementation, this intermediate language is not interpreted, but rather compiled in a manner known as just-in-time compilation (JIT) into native code. The combination of these concepts is called the Common Language Infrastructure (CLI), a specification; Microsoft's implementation of the CLI is known as the Common Language Runtime (CLR).

8. What are Microsoft .Net Assemblies?

The primary unit of a .NET application is the assembly. The Microsoft .Net Applications pseudo code is compiled into intermediate CIL (MSIL) code and is stored in .NET assemblies. An assembly is a self-describing collection of code, resources, and metadata.

Assemblies are stored in the DLL and EXE files. The assembly consists of one or more files. Each assembly has one and only one assembly manifest, which contains the metadata or description information for the assembly.

An assembly contains one or more modules. A module contains the code that makes up your application or library, and it contains metadata that describes that code. When you compile a project into an assembly, your code is converted from pseudo code to IL. Because all managed code is first converted to IL code, applications written in different languages can easily interact. For example, one developer might write an application in Visual C# that accesses a DLL in Visual Basic .NET. Both resources will be converted to IL modules before being executed, thus avoiding any language-incompatibility issues.

9. What is Interoperability? How does Microsoft .Net provide Interoperability?

Interoperability is the ability of diverse/different components to work together (inter-operate).

Because interaction between new and older applications is commonly required, the Microsoft .NET Framework provides means to access functionality that is implemented in programs that execute outside the .NET environment, e.g COM components. Access to COM components is provided in the System.Runtime.InteropServices and System.EnterpriseServices namespaces of the framework, and access to other functionality is provided using the P/Invoke feature (Platform Invoke).

10. What is Simplified Deployment in Microsoft .Net?

Once the .Net Application is developed, it must be installed on client machines or on the server. Installation of the Application must be carefully managed to ensure that it does not interfere with previously installed software, and that it conforms to stringent security requirements. The Microsoft .NET framework includes design features and tools that help address these deployment requirements.

11. What is Portability?

Application Portability is one of the key concepts of Microsoft .Net. Application Portability means to be able to reuse the existing code instead of creating new code when moving Applications from one environment to another.

The design of the .NET Framework allows for it to be cross platform compatible. This means, that a program written to use the Microsoft .Net Framework should run without change on any type of system for which the framework is implemented. Microsoft's commercial implementations of the framework cover Windows, Windows CE, and the Xbox 360. In addition, Microsoft submits the specifications for the Common Language Infrastructure (which includes the core class libraries, Common Type System, and the Common Intermediate Language), and the C# language, and the C++/CLI language to both ECMA and the ISO, making them available as open standards. This makes it possible for third parties to create compatible implementations of the framework and its languages on other platforms.

12. How does Microsoft .Net implement Security for Applications?

The Microsoft .NET Framework has its own security mechanism. The security mechanism in Microsoft .Net has two general features: Code Access Security (CAS), and validation and verification. CAS is based on information that is associated with a specific assembly. The information is the source of the assembly. CAS uses information to determine the permissions granted to the code. Other code can demand that calling code is granted a specified permission. The demand causes the CLR to perform a call stack walk: every assembly of each method in the call stack is checked for the required permission and if any assembly is not granted the permission then a security exception is thrown.

When an assembly is loaded the CLR performs various tests. Two such tests are validation and verification. During validation the CLR checks that the assembly contains valid metadata and CIL, and it checks that the internal tables are correct. Verification is not so exact. The verification mechanism checks to see if the code does anything that is 'unsafe'. The algorithm used is quite conservative and hence sometimes code that is 'safe' is not verified. Unsafe code will only be executed if the assembly has the 'skip verification' permission, which generally means code that is installed on the local machine.

13. How does Microsoft .Net manage Memory? What is Garbage Collection?

The Microsoft .NET Framework is a managed type-safe environment for developing .Net applications and employs an automatic memory management scheme called garbage collection. Memory from objects that are no longer used is traced and reclaimed without any action required by the application.

The CLR frees the developer from the burden of managing memory (allocating and freeing up when done); instead it does the memory management itself. Memory is allocated to instantiations of .NET types (objects) from the managed heap, a pool of memory managed by the CLR. As long as there exists a reference to an object, the object is considered to be in use by the CLR. When there is no reference to an object, or it goes out of scope, and thus cannot be reached or used, it becomes garbage. However, it still holds on to the memory allocated to it. The Microsoft .NET Framework includes a Garbage Collector which runs periodically, on a separate thread. The Garbage Collector (GC) is a low-priority thread under normal circumstances. It operates when processor time is not consumed by more important tasks. When memory becomes limited, however, the Garbage Collector thread moves up in priority. Memory is reclaimed at a more rapid pace until it is no longer limited, at which point the priority of garbage collection is again lowered.

The Garbage Collector (GC) is non-deterministic. This approach to memory reclamation seeks to maximize application performance and supplies a less bug-prone application environment. Because of the mechanism by which garbage collection operates, you cannot be certain when an object will be reclaimed. Thus, you have no control over when a class’s destructor (Visual C#) or finalizer (Visual Basic .NET) is executed. These methods should not contain code that you rely on being run at a given time. Instead, classes should implement a Dispose() method to explicitly free those resources when the class is no longer needed.

14. What versions of Microsoft .Net are available?

Microsoft started development on the .NET Framework in the late 1990s, originally under the name of Next Generation Windows Services (NGWS). By late 2000, the first beta versions of Microsoft .NET 1.0 were being released.

Version

Version Number

Release Date

1.0

1.0.3705.0

2002-01-05

1.1

1.1.4322.573

2003-04-01

2.0

2.0.50727.42

2005-11-07

3.0

3.0.4506.30

2006-11-06

3.5

3.5.21022.8

2007-11-19


The Microsoft .NET Framework is included with Windows Server 2003, Windows Server 2008 and Windows Vista, and can be installed on some older versions of Windows like Windows 2000 and Windows XP.

at 2:54 AM Posted by senthil 0 comments

1) How many classes can a single .NET DLL containMany (Correct)

2) You have several users with Windows user accounts who are using your new ASP.Net web application to retrieve data from the SQL Server 2000 database. Each user connects to the database using his/her user account. There are now several hundred users, using the data. How can you improve performance of the web application?

1. Stop using the database to retrieve the data.
2. Use Basic authentication
3. Use the same connection string for the database connections (Correct)
4. Use SQL Server authentication.

3. The following namespace is used for globalization:

1. System.Globalization (Correct)
2. System.Localization
3. System.Locale

4) The following type of class can’t be instantiated

1. absolute
2. abstract (Correct)
3. super
4. None

5) What is the Global.asax used for

1. Used to implement application and session level events. (Correct)
2. Only Application Levels
3. Only Session Levels

6) We declare an integer variable 'x' in C# as _____________

1. x integer;
2. integer x;
3. int x; (Correct)

7) Can you inherit multiple interfaces?

1. Yes (Correct)
2. No

8) Both which of the following statements would you use to properly describe unit testing?

1. with carefully planned test data, run the module to see if it works according to its specifications (Correct)

2. Testing performed by users, just before the Web Application is released

3. With carefully planned test data, run a module to see if it integrates well with other modules

4. Test and fix the errors.

9) Which is the most appropriate place to install a Strong-Named assembly that is intended for use among several web applications?

1. A. GAC on the local area network Primary Domain Controller (PDC) server
2. The Global Assembly Cache on the Web Server. (Correct)

3. The Virtual Directory of the ASP.Net Web Application
4. The solution's /bin directory

12) Given the following methods of the ASP .Net Page class, in which of them would you attach an event handler to an event published by a control on the web page?

1. OnLoad()
2. Page_Loader()
3. OnInit() (Correct)
4. OnPostBack()

13) What is the correct order of execution for these handlers during the loading of an ASP.Net page: button_onclick, page_init, page_load, page_prerender?

1. page_load, page_init, page_prerender, button_onclick
2. page_init, page_load, button_onclick, page_prerender (Correct)
3. page_init, button_onclick, page_load, page_prerender
4. page_init, page_load, page_prerender, button_onclick

14) What does the "EnableViewState" property do? Why would I want it on or off?

1. It maintains the state (value) of the web form and controls across multiple server requests. (Correct)
2. It maintains the state (value) of the web form
3. controls across multiple server requests.
4. To hide the controls in web form

15) How to get the url of page dynamically?

1. Use Response.Url
2. Use Server.Url
3. Use Request.Url (Correct)
4. Use Request.WebUI.U

16) What is the primary purpose of Application domain?

1. To isolate application from each other (Correct)

2. To create IP address
3. To place each applications
4. To reduce errors

17) What is the method similar to Response.Redirect that will send variables to the destination page other than using a query string or the post method?

1. Server.Execute()
2. Response.Write()
3. Server.Transfer() (Correct)
4. Response.Output.Write()

18) Which of these string definitions will prevent escaping on backslashes in C#?

1. string s = #”n Test string”; (Correct)

2. string s = “’n Test string”;
3. string s = @”n Test string”;

4. string s = “n Test string”;

19) We have the code like xxx(src As Object, e As EventArgs). Among this what is xxx?

1. Function
2. Constructor
3. Event Handler (Correct)
4. Method

20) Why do I get the error message ''ExecuteReader requires an open and available Connection. The connection's current state is Closed''?

1. This error is caused if you have not opened the connection. (Correct)
2. This error is caused if you are forgot to close the connection
3. This error is caused if you cannot open the connection
4. This error is caused if you have not sufficient permission to open.

21) Which method do you invoke on the DataAdapter control to load your generated dataset with data?

1. Load()
2. Fill() (Correct)
3. DataSource()
4. DataBind()

22) What are the methods present in response objects except response. Redirect ()?

AddHeader Adds a new HTTP header and a value to the HTTP response

AppendToLog Adds a string to the end of the server log entry

BinaryWrite Writes data directly to the output without any character conversion

Clear Clears any buffered HTML output

End Stops processing a script, and returns the current result

Flush Sends buffered HTML output immediately

Redirect Redirects the user to a different URL

Write Writes a specified string to the output

23) How to find out the version of .net framework installed in your system?

Response.Write(System.Environment.Version.ToString());

24) How to find out the version of sqlserver installed in your system?

SELECT @@VERSION as version

25) How to find out the version of sqlserver installed in your system?

SELECT SERVERPROPERTY('productversion'), SERVERPROPERTY ('productlevel'), SERVERPROPERTY ('edition')

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

1. Use capsol tool
2. Use web Services
3. Use XML
4. Use Soapsuds tool (Correct)

27) What is the most important use of SslStream Class ?

1. Used for Client-Server Communication (Correct)
2. Used for Streaming
3. Used for file accessing
4. Used for Security


28) what is the best way to rename a file on the webserver in code?

1. Using File.Copy()

2. Using File.Move (Correct)
3. Using File.Clone()
4. Using File.Cut()

29) What is the best way to output only time and not Date?

1. Response.Write(DateTime.Now.ToString("dd"));
2. Response.Write(DateTime.Now.ToString();
3. Response.Write(DateTime.Now.ToString("hh:mm:ss"));
4. Response.Write(DateTime.Now.ToString("tt")); (Correct)

30) What is diffgram?

1. HTML formats that you can use to render DataSet object contents to XML

2. XML formats that you can use to render DataSet object contents to XML (Correct)
3. HTML formats that you can use to render DataReader object contents to XML
4. XML formats that you can use to render DataReader object contents to XML

31) Is XML is case sensitive?

1. Yes (Correct)
2. No
3. Can't Say


32) among the below, which one is used for XML documentation comments?

1. //
2. /* */
3. /// (Correct)
4. ////
5. */ /*


33) How to check if nothing is selected in a CheckBoxList without using a loop to parse through all the items?

1. Check if CheckBoxList.SelectedIndex equals to 0
2. Check if CheckBoxList.SelectedIndex equals to -1 (Correct)
3. Check if CheckBoxList.SelectedIndex equals to null
4. Check if CheckBoxList.SelectedIndex equals to > 0

34) How to display full day names in calendar control?

1. Set the DayNameFormat= static for the Calendar Control
2. Set the DayFormat= Full for the Calendar Control
3. Set the DayNameFormat= dynamic for the Calendar Control
4. Set the DayNameFormat= Full for the Calendar Control (Correct)

35) How to reset the selected date in the calendar control?

1. Calendar1.SelectedDates.Clear(); (Correct)
2. Calendar1.SelectedDates.Reset();3.Calendar1.SelectedDates.Remove();
4. Calendar1.SelectedDates.Delete();

36) How can I enforce that only one radiobutton gets selected among a list of Radiobutton controls?

1. Set same Group for the radiobutton controls
2. Set same Groupname for the radiobutton controls (Correct)
3. Set different Group for the radiobutton controls
4. Set different Groupname for the radiobutton controls

37) Where do you store the information about the user’s locale?

1. using System.Web.UI.WebControls;
2. using System.Web.Security;
3. System.Web.UI.Page.Culture (Correct)
4. using System.Data;

38) Can you prevent your class from being inherited by another class?

1. No
2. Yes (Correct)

39) To test a Web service you must create a Windows application or Web application to consume this service?

1. True
2. False (Correct)
3. IsNot Possible

40) What does WSDL stand for?

1. Web Sit Description Language
2. Web Services Description Language (Correct)
3. Web Service Difrent Language

41) Which control would you use if you needed to make sure the values in two different controls matched?

1. CompareValidator (Correct)
2. Rangevalidator

3. ValidationSummary
4. RequiredValidator

42) Which template must you provide, in order to display data in a Repeater control?

1. ItemTemplate. (Correct)
2. AlternatingItemTemplate.
3. above all

43) Can you edit data in the Repeater control?

1. No (Correct)
2. Yes
3. Is not possible

44) What data types do the RangeValidator control support?

1. Integer, String, and Date. (Correct)
2. bit,string
3. object,integer

45) How many languages .NET is supporting now?

3. 44 (Correct)


46) what is the size of an empty class..?

1. 0
2. 1 (Correct)


47) what is hiding?

1. providing new implementation in the derived class which has override keyword in the base class
2. without having override keyword in the base class provide the new implementation in the derived class (Correct)

3. It is similar to overloading

48) what is the output of the following question


using System;

class test
{
static void Main()
{
int i = 5;
object o = i;
Console.WriteLine(o);
}
}

1.object
2. 5 (Correct)
3. Compile time error
4. Run time error

49) In which statement allows the script to add at the end of the body tag

1. RegisterStartupScript (Correct)
2. RegisterClientScriptBlock
3. all
4. none

50) As which html control the viewstate is stored in the page?

1. Text Field
2. Hidden Field (Correct)

3. DropDown List
4. Label with visibility false property

51) How ViewState value is Stored in the page by default

1. plain text
2. encrypted
3. encoded
4. base64 encoding (Correct)

52) --------is the process of making your IL code difficult to read

1. Machine.config
2. Reflection
3. obfuscation (Correct)
4. Filesystemwatcher

53) How we can trace an application by put which string in the web.config
1. trace enabled="true" requestLimit="10" pageOutput="false" traceMode="SortByTime" localOnly="true" (Correct)

2. trace enabled="true" requestLimit="10" pageOutput="true" traceMode="SortByTime" localOnly="true"

3. trace enabled="false" requestLimit="10" pageOutput="true" traceMode="SortByTime" localOnly="true"

4. all of above

54) D.V.Harinatha reddy wants build a website,in his home page he want to display an image of world by clicking on the country he want to redirect to local website for this we can select which control?


1. Image control
2. Image button
3. Image map control (Correct)
4. any one of above

55) What should the build action be for Nhibernate Xml files?


1. content

2. embedded resource (Correct)
3. text
4. xml

56) How to call javascript function from serverside?for example, a webform has one textbox control named 'txtCity' which accepts only alphabets.For this validation one javascript function is written named acceptChar.How to call acceptchar javascript function from serverside


1. controlname.Attributes.Add("("onkeypress", "acceptChar(' ')")
2. txtCity.Attributes.Add("("onkeypress", "acceptChar(' ')") (Correct)
3. Attributes.Add("("onkeypress", "acceptChar")
4. Attributes.Add("(onkeypress(),"acceptChar")

57) What are the types of web buttons in asp.net 2.0?
1. Submit button (Correct)
2. Command button
3. above 2
4. nonne of above

56) When we are usng HTML server controls than web server controls?

1. Conveting ASP Applications to the ASP.net
2. when control requires more java script
3. above 2 (Correct)
4. not above 2

57) Advantages of asp.net 2.0 compare to the version of 1.1

1. partial classes
2. master page
3. menu controls
4. all of above (Correct)

58) From which page we can find the trace details?

1. trace.aspx
2. trace.ascs
3. trace.axd (Correct)
4. all of above

59) ASP.NET with C# Certification Q

1. // (Correct)
2. /////////////
3. //////
4. //////////

60) From which port service request from browser.

1. 20 (Correct)
2. 21
3. 80
4. 443

61) You are in charge of creating a remote object that will return database records to the caller of the method. You want to keep track of the number of requests. Which activation mode would you use?
A. SingleCall
B. Singleton
C. Client-activated
D. Server-activated
1. A
2. B (Correct)
3. C
4. D

62) How to detect whether a cookie is a normal cookie or a multi-valued cookie

1. Cookie.IsMultivalued
2. HttpCookie.HasKeys (Correct)
3. Cookie.HasKeys
4. HttpCookie.Values
5. HttpCookie.HasValues

63) Which of the Validation has data type property

1. range validation (Correct)
2. Compare Validation
3. Summary VALIDATION
4. REQUIRED FILELD VALIDATION

64) IsClientConnected is a property of

1. Server
2. Response (Correct)
3. Request
4. Session

65) ClientCertificate is a collection of
1. Server
2. Response
3. Request (Correct)
4. ObjectContext

66) View State holds the control value even when I come back after navigating to another page (using Hyperlinks).

1. True
2. False (Correct)
3. Can't Say
4. None of the Above

67) How do you make Sessions not to use cookies?

1. Delete Cookies immediately after page is loaded
2. No, we cannot do this. Sessions will use cookies.
3. Enable cookieless property in Web.config (Correct)
4. None of the above

68) If cookies are disabled in client browser, will session tracking work?

1. No (Correct)
2. yes

3. none

69) What is thr Difference Between Machine.config and Web.config:?

1. Machine.config->Configuration file for all the applications in the system
2. Web.config->Config file for single application.
3. above 2 (Correct)

70) Dataset is faster than Data Grid

1. False (Correct)
2. True
3. Both are same in operation
4. None of the above

71) Trace object is available in which class?

1. System.Diagnostics
2. System.web
3. System.configuration
4. Both A and B (Correct)

72) Where view state variable can stored?

1. client side (Correct)
2. server side
3. In database
4. None of above

73) How many session levels are there?
1. 1
2. 2
3. 3 (Correct)
4. None of above

74) How many number of parameters we can take in Query String ?

1. One
2. Two
3. Four
4. 2086 Characters (Correct)
5. Depends On Browser