Managed code runs inside the environment of CLR i.e. .NET runtime. In short all IL are managed code. But if you are using some third party software example VB6 or VC++ component they are unmanaged code as .NET runtime (CLR) does not have control over the source code execution of the language.
Microsoft Dot Net Master
Microsoft Dot Net Master
Monday, April 18, 2011
What is a CLS(Common Language Specification)?
This is a subset of the CTS which all .NET languages are expected to support. It was always a dream of Microsoft to unite all different languages in to one umbrella and CLS is one step towards that. Microsoft has defined CLS which are nothing but guidelines that language to follow so that it can communicate with other .NET languages in a seamless manner.
What is a CTS?
In order that two language communicate smoothly CLR has CTS (Common Type System).Example in VB you have “Integer” and in C++ you have “long” these datatypes are not compatible so the interfacing between them is very complicated. In order to able that two different languages can 1. Basic .NET Framework 99 Communicate Microsoft introduced Common Type System. So “Integer” datatype in VB6 and “int” datatype in C++ will convert it to System.int32 which is datatype of CTS. CLS which is covered in the coming question is subset of CTS.
Note: If you have undergone COM programming period interfacing VB6 application with
VC++ application was a real pain as the datatype of both languages did not have a
common ground where they can come and interface, by having CTS interfacing is smooth.
What is a CLR?
Full form of CLR is Common Language Runtime and it forms the heart of the .NET framework.
All Languages have runtime and its the responsibility of the runtime to take care of the code
execution of the program. For example VC++ has MSCRT40.DLL,VB6 has MSVBVM60.DLL,
Java has Java Virtual Machine etc. Similarly .NET has CLR. Following are the responsibilities of
CLR
Garbage Collection :- CLR automatically manages memory thus eliminating
memory leaks. When objects are not referred GC automatically releases those
memories thus providing efficient memory management.
Code Access Security :- CAS grants rights to program depending on the security
configuration of the machine. Example the program has rights to edit or create
a new file but the security configuration of machine does not allow the program
to delete a file. CAS will take care that the code runs under the environment of
machines security configuration.
Code Verification :- This ensures proper code execution and type safety while
the code runs. It prevents the source code to perform illegal operation such as
accessing invalid memory locations etc.
IL( Intermediate language )-to-native translators and optimizer’s :- CLR uses
JIT and compiles the IL code to machine code and then executes. CLR also
determines depending on platform what is optimized way of running the IL
code.
What is a IL?
Twist : What is MSIL or CIL , What is JIT?
(IL)Intermediate Language is also known as MSIL (Microsoft Intermediate Language) or CIL
(Common Intermediate Language). All .NET source code is compiled to IL. This IL is then
converted to machine code at the point where the software is installed, or at run-time by a Just-In-
Time (JIT) compiler.
(IL)Intermediate Language is also known as MSIL (Microsoft Intermediate Language) or CIL
(Common Intermediate Language). All .NET source code is compiled to IL. This IL is then
converted to machine code at the point where the software is installed, or at run-time by a Just-In-
Time (JIT) compiler.
Saturday, April 16, 2011
ASP.NET Interview Questions
While different interviewers may ask distinctive questions. So we have to drawn up a list of frequently asked asp.net interview questions. Read all the questions for success in the job interview.
1. What is ASP.NET?
2. What are the differences between ASP.NET and ASP?
3. Tell me ASP.NET versions list?
4. Which version is easy and stable according to you?
5. What are the best practices to follow to secure connection strings in an ASP.NET web application?
6. What is the advantage of storing an XML file in the applications App_Data folder?
7. What are the steps to follow to avoid Script Injection attacks?
8. What is the difference between Class And Interface?
9. Which method can be used to remove forms authentication cookie?
10. How can you control access to subfolders in a web application?
11. Is it possible to encrypt view state data of an aspx page?
12. What are Cookies in ASP.NET?
13. What is the difference between Session Cookies and Persistent Cookies?
14. Are Cookies secure?
15. How do you create a permanent cookie?
16. What is caching?
17. Give a simple example to show how to cache a web form without using @OutputCache directive?
18. What is HttpCachePolicy object’s SetAllowResponseInBrowserHistory method used for?
19. What is an HTTP Handler?
20. What is the difference between asynchronous and synchronous HTTP Handlers?
21. What is HTTP module?
22. Which class is responsible for receiving and forwarding a request to the appropriate HTTP handler?
23. What is the difference between HTTP modules and HTTP handlers?
24. What is fragment caching?
25. When caching is set at both the Web form and user control levels, How does the cache settings interact?
26. What is PartialCaching attribute used for?
27. In which namespace is the DataSet class present?
28. What is the use of DataSet.HasChanges() Method?
29. What is Microsoft ADO.NET?
30. List the 4 common ADO.NET Namespaces?
31. What is the difference between DataReader and DataAdapter?
32. How do you read an XML file into a DataSet?
33. How is a property designated as read-only?
34. When do you use ExecuteReader, ExecuteNonQuery, ExecuteScalar methods?
35. Can you explain the difference between an ADO.NET Dataset and an ADO Recordset?
36. Which control would you use if you needed to make sure the values in two different controls matched?
37. Can you give an example of what might be best suited to place in the Application_Start and Session_Start subroutines?
38. How would you implement inheritance using VB.NET/C#?
39. What is the difference between boxing and unboxing?
40. Describe the difference between a Thread and a Process?
41. Describe the difference between inline and code behind?
42. How do you turn off cookies for one page in your site?
43. What are the 3 major types of connection objects in ADO.NET?
44. What is the difference between Named skins and Default skins?
45. What are the security concerns to keep in mind when using themes?
46. What are different page navigation techniques in ASP.NET?
47. What is the difference between Response.Redirect and Server.Transfer?
48. What is the difference between a web farm and a web garden?
49. What is the difference between Authentication and Authorization?
50. What are the best practices to keep in mind when accepting user input on a web application?
51. What are the steps to follow to share Session state information using a SQL database?
52. What is the difference between an EXE and a DLL?
53. What is cyclomatic complexity and why is it important?
54. What is the difference between a Debug and Release build?
55. What is the difference between Response.Write() and Response.Output.Write()?
1. What is ASP.NET?
2. What are the differences between ASP.NET and ASP?
3. Tell me ASP.NET versions list?
4. Which version is easy and stable according to you?
5. What are the best practices to follow to secure connection strings in an ASP.NET web application?
6. What is the advantage of storing an XML file in the applications App_Data folder?
7. What are the steps to follow to avoid Script Injection attacks?
8. What is the difference between Class And Interface?
9. Which method can be used to remove forms authentication cookie?
10. How can you control access to subfolders in a web application?
11. Is it possible to encrypt view state data of an aspx page?
12. What are Cookies in ASP.NET?
13. What is the difference between Session Cookies and Persistent Cookies?
14. Are Cookies secure?
15. How do you create a permanent cookie?
16. What is caching?
17. Give a simple example to show how to cache a web form without using @OutputCache directive?
18. What is HttpCachePolicy object’s SetAllowResponseInBrowserHistory method used for?
19. What is an HTTP Handler?
20. What is the difference between asynchronous and synchronous HTTP Handlers?
21. What is HTTP module?
22. Which class is responsible for receiving and forwarding a request to the appropriate HTTP handler?
23. What is the difference between HTTP modules and HTTP handlers?
24. What is fragment caching?
25. When caching is set at both the Web form and user control levels, How does the cache settings interact?
26. What is PartialCaching attribute used for?
27. In which namespace is the DataSet class present?
28. What is the use of DataSet.HasChanges() Method?
29. What is Microsoft ADO.NET?
30. List the 4 common ADO.NET Namespaces?
31. What is the difference between DataReader and DataAdapter?
32. How do you read an XML file into a DataSet?
33. How is a property designated as read-only?
34. When do you use ExecuteReader, ExecuteNonQuery, ExecuteScalar methods?
35. Can you explain the difference between an ADO.NET Dataset and an ADO Recordset?
36. Which control would you use if you needed to make sure the values in two different controls matched?
37. Can you give an example of what might be best suited to place in the Application_Start and Session_Start subroutines?
38. How would you implement inheritance using VB.NET/C#?
39. What is the difference between boxing and unboxing?
40. Describe the difference between a Thread and a Process?
41. Describe the difference between inline and code behind?
42. How do you turn off cookies for one page in your site?
43. What are the 3 major types of connection objects in ADO.NET?
44. What is the difference between Named skins and Default skins?
45. What are the security concerns to keep in mind when using themes?
46. What are different page navigation techniques in ASP.NET?
47. What is the difference between Response.Redirect and Server.Transfer?
48. What is the difference between a web farm and a web garden?
49. What is the difference between Authentication and Authorization?
50. What are the best practices to keep in mind when accepting user input on a web application?
51. What are the steps to follow to share Session state information using a SQL database?
52. What is the difference between an EXE and a DLL?
53. What is cyclomatic complexity and why is it important?
54. What is the difference between a Debug and Release build?
55. What is the difference between Response.Write() and Response.Output.Write()?
Subscribe to:
Posts (Atom)
