<rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:trackback="http://madskills.com/public/xml/rss/module/trackback/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:copyright="http://blogs.law.harvard.edu/tech/rss" xmlns:image="http://purl.org/rss/1.0/modules/image/">
    <channel>
        <title>Study</title>
        <link>http://geekswithblogs.net/Gaurav/category/7937.aspx</link>
        <description>Study</description>
        <language>en-US</language>
        <copyright>Gaurav Taneja</copyright>
        <managingEditor>taneja_gaurav@yahoo.com</managingEditor>
        <generator>Subtext Version 0.0.0.0</generator>
        <item>
            <title>FAQ on Sql Server </title>
            <link>http://geekswithblogs.net/Gaurav/archive/2008/04/03/120990.aspx</link>
            <description>&lt;div align="center" style="font-family: Times New Roman;"&gt;    &lt;/div&gt;
&lt;p class="MsoNormal" style="font-family: Times New Roman;"&gt;&lt;span style="font-size: 14pt; display: none;"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;
&lt;table width="100%" cellpadding="0" border="0" style="background: rgb(219, 248, 201) none repeat scroll 0% 50%; width: 100%; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial; font-family: Times New Roman;" class="MsoNormalTable"&gt;
    &lt;tbody&gt;
        &lt;tr style=""&gt;
            &lt;td style="padding: 0.75pt;"&gt;
            &lt;p class="MsoNormal"&gt;&lt;span style="color: blue;"&gt;What is normalization? Explain different levels of normalization?&lt;/span&gt;&lt;span style="font-size: 14pt;"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;
            &lt;/td&gt;
        &lt;/tr&gt;
    &lt;/tbody&gt;
&lt;/table&gt;
&lt;p style="font-family: Times New Roman;"&gt;&lt;span style="color: black;"&gt;Check out the article Q100139 from Microsoft knowledge base and of course, there's much more information available in the net. It'll be a good idea to get a hold of any RDBMS fundamentals text book, especially the one by C. J. Date. Most of the times, it will be okay if you can explain till third normal form.&lt;/span&gt;&lt;span style="font-size: 14pt;"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;
&lt;table width="100%" cellpadding="0" border="0" style="background: rgb(219, 248, 201) none repeat scroll 0% 50%; width: 100%; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial; font-family: Times New Roman;" class="MsoNormalTable"&gt;
    &lt;tbody&gt;
        &lt;tr style=""&gt;
            &lt;td style="padding: 0.75pt;"&gt;
            &lt;p class="MsoNormal"&gt;&lt;span style="color: blue;"&gt;What is denormalization and when would you go for it?&lt;/span&gt;&lt;span style="font-size: 14pt;"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;
            &lt;/td&gt;
        &lt;/tr&gt;
    &lt;/tbody&gt;
&lt;/table&gt;
&lt;p style="font-family: Times New Roman;"&gt;&lt;span style="color: black;"&gt;As the name indicates, denormalization is the reverse process of normalization. It's the controlled introduction of redundancy in to the database design. It helps improve the query performance as the number of joins could be reduced.&lt;/span&gt;&lt;span style="font-size: 14pt;"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;
&lt;table width="100%" cellpadding="0" border="0" style="background: rgb(219, 248, 201) none repeat scroll 0% 50%; width: 100%; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial; font-family: Times New Roman;" class="MsoNormalTable"&gt;
    &lt;tbody&gt;
        &lt;tr style=""&gt;
            &lt;td style="padding: 0.75pt;"&gt;
            &lt;p class="MsoNormal"&gt;&lt;span style="color: blue;"&gt;How do you implement one-to-one, one-to-many and many-to-many   relationships while designing tables?&lt;/span&gt;&lt;span style="font-size: 14pt;"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;
            &lt;/td&gt;
        &lt;/tr&gt;
    &lt;/tbody&gt;
&lt;/table&gt;
&lt;p style="font-family: Times New Roman;"&gt;&lt;span style="color: black;"&gt;One-to-One relationship can be implemented as a single table and rarely as two tables with primary and foreign key relationships.&lt;br /&gt;
One-to-Many relationships are implemented by splitting the data into two tables with primary key and foreign key relationships.&lt;br /&gt;
Many-to-Many relationships are implemented using a junction table with the keys from both the tables forming the composite primary key of the junction table.&lt;br /&gt;
&lt;br /&gt;
It will be a good idea to read up a database designing fundamentals text book.&lt;/span&gt;&lt;span style="font-size: 14pt;"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;
&lt;table width="100%" cellpadding="0" border="0" style="background: rgb(219, 248, 201) none repeat scroll 0% 50%; width: 100%; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial; font-family: Times New Roman;" class="MsoNormalTable"&gt;
    &lt;tbody&gt;
        &lt;tr style=""&gt;
            &lt;td style="padding: 0.75pt;"&gt;
            &lt;p class="MsoNormal"&gt;&lt;span style="color: blue;"&gt;What's the difference between a primary key and a unique key?&lt;/span&gt;&lt;span style="font-size: 14pt;"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;
            &lt;/td&gt;
        &lt;/tr&gt;
    &lt;/tbody&gt;
&lt;/table&gt;
&lt;p style="font-family: Times New Roman;"&gt;Both primary key and unique enforce uniqueness of the column on which they are defined. But by default primary key creates a clustered index on the column, where are unique creates a nonclustered index by default. Another major difference is that, primary key doesn't allow NULLs, but unique key allows one NULL only.&lt;span style="font-size: 14pt;"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;
&lt;table width="100%" cellpadding="0" border="0" style="background: rgb(219, 248, 201) none repeat scroll 0% 50%; width: 100%; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial; font-family: Times New Roman;" class="MsoNormalTable"&gt;
    &lt;tbody&gt;
        &lt;tr style=""&gt;
            &lt;td style="padding: 0.75pt;"&gt;
            &lt;p class="MsoNormal"&gt;&lt;span style="color: blue;"&gt;What are user defined datatypes and when you should go for them?&lt;/span&gt;&lt;span style="font-size: 14pt;"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;
            &lt;/td&gt;
        &lt;/tr&gt;
    &lt;/tbody&gt;
&lt;/table&gt;
&lt;p style="font-family: Times New Roman;"&gt;User defined datatypes let you extend the base SQL Server datatypes by providing a descriptive name, and format to the database. Take for example, in your database, there is a column called Flight_Num which appears in many tables. In all these tables it should be varchar(8). In this case you could create a user defined datatype called Flight_num_type of varchar(8) and use it across all your tables. &lt;br /&gt;
&lt;br /&gt;
See sp_addtype, sp_droptype in books online.&lt;span style="font-size: 14pt;"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;
&lt;table width="100%" cellpadding="0" border="0" style="background: rgb(219, 248, 201) none repeat scroll 0% 50%; width: 100%; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial; font-family: Times New Roman;" class="MsoNormalTable"&gt;
    &lt;tbody&gt;
        &lt;tr style=""&gt;
            &lt;td style="padding: 0.75pt;"&gt;
            &lt;p class="MsoNormal"&gt;&lt;span style="color: blue;"&gt;What is bit datatype and what's the information that can be   stored inside a bit column?&lt;/span&gt;&lt;span style="font-size: 14pt;"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;
            &lt;/td&gt;
        &lt;/tr&gt;
    &lt;/tbody&gt;
&lt;/table&gt;
&lt;p style="font-family: Times New Roman;"&gt;Bit datatype is used to store boolean information like 1 or 0 (true or false). Untill SQL Server 6.5 bit datatype could hold either a 1 or 0 and there was no support for NULL. But from SQL Server 7.0 onwards, bit datatype can represent a third state, which is NULL. &lt;span style="font-size: 14pt;"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;
&lt;table width="100%" cellpadding="0" border="0" style="background: rgb(219, 248, 201) none repeat scroll 0% 50%; width: 100%; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial; font-family: Times New Roman;" class="MsoNormalTable"&gt;
    &lt;tbody&gt;
        &lt;tr style=""&gt;
            &lt;td style="padding: 0.75pt;"&gt;
            &lt;p class="MsoNormal"&gt;&lt;span style="color: blue;"&gt;Define candidate key, alternate key, composite key.&lt;/span&gt;&lt;span style="font-size: 14pt;"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;
            &lt;/td&gt;
        &lt;/tr&gt;
    &lt;/tbody&gt;
&lt;/table&gt;
&lt;p style="font-family: Times New Roman;"&gt;A candidate key is one that can identify each row of a table uniquely. Generally a candidate key becomes the primary key of the table. If the table has more than one candidate key, one of them will become the primary key, and the rest are called alternate keys. &lt;br /&gt;
&lt;br /&gt;
A key formed by combining at least two or more columns is called composite key. &lt;span style="font-size: 14pt;"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;
&lt;table width="100%" cellpadding="0" border="0" style="background: rgb(219, 248, 201) none repeat scroll 0% 50%; width: 100%; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial; font-family: Times New Roman;" class="MsoNormalTable"&gt;
    &lt;tbody&gt;
        &lt;tr style=""&gt;
            &lt;td style="padding: 0.75pt;"&gt;
            &lt;p class="MsoNormal"&gt;&lt;span style="color: blue;"&gt;What are defaults? Is there a column to which a default can't be   bound?&lt;/span&gt;&lt;span style="font-size: 14pt;"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;
            &lt;/td&gt;
        &lt;/tr&gt;
    &lt;/tbody&gt;
&lt;/table&gt;
&lt;p style="font-family: Times New Roman;"&gt;A default is a value that will be used by a column, if no value is supplied to that column while inserting data. IDENTITY columns and timestamp columns can't have defaults bound to them. See CREATE DEFUALT in books online.&lt;span style="font-size: 14pt;"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;
&lt;table width="100%" cellpadding="0" border="0" style="background: rgb(219, 248, 201) none repeat scroll 0% 50%; width: 100%; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial; font-family: Times New Roman;" class="MsoNormalTable"&gt;
    &lt;tbody&gt;
        &lt;tr style=""&gt;
            &lt;td style="padding: 0.75pt;"&gt;
            &lt;p class="MsoNormal"&gt;&lt;span style="color: blue;"&gt;What is a transaction and what are ACID properties?&lt;/span&gt;&lt;span style="font-size: 14pt;"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;
            &lt;/td&gt;
        &lt;/tr&gt;
    &lt;/tbody&gt;
&lt;/table&gt;
&lt;p style="font-family: Times New Roman;"&gt;&lt;span style="color: black;"&gt;A transaction is a logical unit of work in which, all the steps must be performed or none. ACID stands for Atomicity, Consistency, Isolation, Durability. These are the properties of a transaction. For more information and explanation of these properties, see SQL Server books online or any RDBMS fundamentals text book. &lt;/span&gt;&lt;span style="font-size: 14pt;"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;
&lt;table width="100%" cellpadding="0" border="0" style="background: rgb(219, 248, 201) none repeat scroll 0% 50%; width: 100%; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial; font-family: Times New Roman;" class="MsoNormalTable"&gt;
    &lt;tbody&gt;
        &lt;tr style=""&gt;
            &lt;td style="padding: 0.75pt;"&gt;
            &lt;p class="MsoNormal"&gt;&lt;span style="color: blue;"&gt;Explain different isolation levels&lt;/span&gt;&lt;span style="font-size: 14pt;"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;
            &lt;/td&gt;
        &lt;/tr&gt;
    &lt;/tbody&gt;
&lt;/table&gt;
&lt;p style="font-family: Times New Roman;"&gt;&lt;span style="color: black;"&gt;An isolation level determines the degree of isolation of data between concurrent transactions. The default SQL Server isolation level is Read Committed. Here are the other isolation levels (in the ascending order of isolation): Read Uncommitted, Read Committed, Repeatable Read, Serializable. See SQL Server books online for an explanation of the isolation levels. Be sure to read about SET TRANSACTION ISOLATION LEVEL, which lets you customize the isolation level at the connection level.&lt;/span&gt;&lt;span style="font-size: 14pt;"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;
&lt;table width="100%" cellpadding="0" border="0" style="background: rgb(219, 248, 201) none repeat scroll 0% 50%; width: 100%; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial; font-family: Times New Roman;" class="MsoNormalTable"&gt;
    &lt;tbody&gt;
        &lt;tr style=""&gt;
            &lt;td style="padding: 0.75pt;"&gt;
            &lt;p class="MsoNormal"&gt;&lt;span style="color: blue;"&gt;CREATE INDEX myIndex ON myTable(myColumn)&lt;br /&gt;
            &lt;br /&gt;
            What type of Index will get created after executing the above statement?&lt;/span&gt;&lt;span style="font-size: 14pt;"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;
            &lt;/td&gt;
        &lt;/tr&gt;
    &lt;/tbody&gt;
&lt;/table&gt;
&lt;p style="font-family: Times New Roman;"&gt;&lt;span style="color: black;"&gt;Non-clustered index. Important thing to note: By default a clustered index gets created on the primary key, unless specified otherwise.&lt;/span&gt;&lt;span style="font-size: 14pt;"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;
&lt;table width="100%" cellpadding="0" border="0" style="background: rgb(219, 248, 201) none repeat scroll 0% 50%; width: 100%; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial; font-family: Times New Roman;" class="MsoNormalTable"&gt;
    &lt;tbody&gt;
        &lt;tr style=""&gt;
            &lt;td style="padding: 0.75pt;"&gt;
            &lt;p class="MsoNormal"&gt;&lt;span style="color: blue;"&gt;What's the maximum size of a row?&lt;/span&gt;&lt;span style="font-size: 14pt;"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;
            &lt;/td&gt;
        &lt;/tr&gt;
    &lt;/tbody&gt;
&lt;/table&gt;
&lt;p style="font-family: Times New Roman;"&gt;&lt;span style="color: black;"&gt;8060 bytes. Don't be surprised with questions like 'what is the maximum number of columns per table'. Check out SQL Server books online for the page titled: "Maximum Capacity Specifications".&lt;/span&gt;&lt;span style="font-size: 14pt;"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;
&lt;table width="100%" cellpadding="0" border="0" style="background: rgb(219, 248, 201) none repeat scroll 0% 50%; width: 100%; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial; font-family: Times New Roman;" class="MsoNormalTable"&gt;
    &lt;tbody&gt;
        &lt;tr style=""&gt;
            &lt;td style="padding: 0.75pt;"&gt;
            &lt;p class="MsoNormal"&gt;&lt;span style="color: blue;"&gt;Explain Active/Active and Active/Passive cluster configurations&lt;/span&gt;&lt;span style="font-size: 14pt;"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;
            &lt;/td&gt;
        &lt;/tr&gt;
    &lt;/tbody&gt;
&lt;/table&gt;
&lt;p style="font-family: Times New Roman;"&gt;&lt;span style="color: black;"&gt;Hopefully you have experience setting up cluster servers. But if you don't, at least be familiar with the way clustering works and the two clusterning configurations Active/Active and Active/Passive. SQL Server books online has enough information on this topic and there is a good white paper available on Microsoft site.&lt;/span&gt;&lt;span style="font-size: 14pt;"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;
&lt;table width="100%" cellpadding="0" border="0" style="background: rgb(219, 248, 201) none repeat scroll 0% 50%; width: 100%; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial; font-family: Times New Roman;" class="MsoNormalTable"&gt;
    &lt;tbody&gt;
        &lt;tr style=""&gt;
            &lt;td style="padding: 0.75pt;"&gt;
            &lt;p class="MsoNormal"&gt;&lt;span style="color: blue;"&gt;Explain the architecture of SQL Server&lt;/span&gt;&lt;span style="font-size: 14pt;"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;
            &lt;/td&gt;
        &lt;/tr&gt;
    &lt;/tbody&gt;
&lt;/table&gt;
&lt;p style="font-family: Times New Roman;"&gt;&lt;span style="color: black;"&gt;This is a very important question and you better be able to answer it if consider yourself a DBA. SQL Server books online is the best place to read about SQL Server architecture. Read up the chapter dedicated to SQL Server Architecture.&lt;/span&gt;&lt;span style="font-size: 14pt;"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;
&lt;table width="100%" cellpadding="0" border="0" style="background: rgb(219, 248, 201) none repeat scroll 0% 50%; width: 100%; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial; font-family: Times New Roman;" class="MsoNormalTable"&gt;
    &lt;tbody&gt;
        &lt;tr style=""&gt;
            &lt;td style="padding: 0.75pt;"&gt;
            &lt;p class="MsoNormal"&gt;&lt;span style="color: blue;"&gt;What is lock escalation?&lt;/span&gt;&lt;span style="font-size: 14pt;"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;
            &lt;/td&gt;
        &lt;/tr&gt;
    &lt;/tbody&gt;
&lt;/table&gt;
&lt;p style="font-family: Times New Roman;"&gt;Lock escalation is the process of converting a lot of low level locks (like row locks, page locks) into higher level locks (like table locks). Every lock is a memory structure too many locks would mean, more memory being occupied by locks. To prevent this from happening, SQL Server escalates the many fine-grain locks to fewer coarse-grain locks. Lock escalation threshold was definable in SQL Server 6.5, but from SQL Server 7.0 onwards it's dynamically managed by SQL Server.&lt;span style="font-size: 14pt;"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;
&lt;table width="100%" cellpadding="0" border="0" style="background: rgb(219, 248, 201) none repeat scroll 0% 50%; width: 100%; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial; font-family: Times New Roman;" class="MsoNormalTable"&gt;
    &lt;tbody&gt;
        &lt;tr style=""&gt;
            &lt;td style="padding: 0.75pt;"&gt;
            &lt;p class="MsoNormal"&gt;&lt;span style="color: blue;"&gt;What's the difference between DELETE TABLE and TRUNCATE TABLE   commands?&lt;/span&gt;&lt;span style="font-size: 14pt;"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;
            &lt;/td&gt;
        &lt;/tr&gt;
    &lt;/tbody&gt;
&lt;/table&gt;
&lt;p style="font-family: Times New Roman;"&gt;DELETE TABLE is a logged operation, so the deletion of each row gets logged in the transaction log, which makes it slow. TRUNCATE TABLE also deletes all the rows in a table, but it won't log the deletion of each row, instead it logs the deallocation of the data pages of the table, which makes it faster. Of course, TRUNCATE TABLE can be rolled back.&lt;span style="font-size: 14pt;"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;
&lt;table width="100%" cellpadding="0" border="0" style="background: rgb(219, 248, 201) none repeat scroll 0% 50%; width: 100%; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial; font-family: Times New Roman;" class="MsoNormalTable"&gt;
    &lt;tbody&gt;
        &lt;tr style=""&gt;
            &lt;td style="padding: 0.75pt;"&gt;
            &lt;p class="MsoNormal"&gt;&lt;span style="color: blue;"&gt;Explain the storage models of OLAP&lt;/span&gt;&lt;span style="font-size: 14pt;"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;
            &lt;/td&gt;
        &lt;/tr&gt;
    &lt;/tbody&gt;
&lt;/table&gt;
&lt;p style="font-family: Times New Roman;"&gt;&lt;span style="color: black;"&gt;Check out MOLAP, ROLAP and HOLAP in SQL Server books online for more infomation.&lt;/span&gt;&lt;span style="font-size: 14pt;"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;
&lt;table width="100%" cellpadding="0" border="0" style="background: rgb(219, 248, 201) none repeat scroll 0% 50%; width: 100%; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial; font-family: Times New Roman;" class="MsoNormalTable"&gt;
    &lt;tbody&gt;
        &lt;tr style=""&gt;
            &lt;td style="padding: 0.75pt;"&gt;
            &lt;p class="MsoNormal"&gt;&lt;span style="color: blue;"&gt;What are the new features introduced in SQL Server 2000 (or the   latest release of SQL Server at the time of your interview)? What changed   between the previous version of SQL Server and the current version?&lt;/span&gt;&lt;span style="font-size: 14pt;"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;
            &lt;/td&gt;
        &lt;/tr&gt;
    &lt;/tbody&gt;
&lt;/table&gt;
&lt;p style="font-family: Times New Roman;"&gt;This question is generally asked to see how current is your knowledge. Generally there is a section in the beginning of the books online titled "What's New", which has all such information. Of course, reading just that is not enough, you should have tried those things to better answer the questions. Also check out the section titled "Backward Compatibility" in books online which talks about the changes that have taken place in the new version.&lt;span style="font-size: 14pt;"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;
&lt;table width="100%" cellpadding="0" border="0" style="background: rgb(219, 248, 201) none repeat scroll 0% 50%; width: 100%; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial; font-family: Times New Roman;" class="MsoNormalTable"&gt;
    &lt;tbody&gt;
        &lt;tr style=""&gt;
            &lt;td style="padding: 0.75pt;"&gt;
            &lt;p class="MsoNormal"&gt;&lt;span style="color: blue;"&gt;What are constraints? Explain different types of constraints.&lt;/span&gt;&lt;span style="font-size: 14pt;"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;
            &lt;/td&gt;
        &lt;/tr&gt;
    &lt;/tbody&gt;
&lt;/table&gt;
&lt;p style="font-family: Times New Roman;"&gt;Constraints enable the RDBMS enforce the integrity of the database automatically, without needing you to create triggers, rule or defaults. &lt;br /&gt;
&lt;br /&gt;
Types of constraints: NOT NULL, CHECK, UNIQUE, PRIMARY KEY, FOREIGN KEY&lt;br /&gt;
&lt;br /&gt;
For an explanation of these constraints see books online for the pages titled: "Constraints" and "CREATE TABLE", "ALTER TABLE"&lt;span style="font-size: 14pt;"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;
&lt;table width="100%" cellpadding="0" border="0" style="background: rgb(219, 248, 201) none repeat scroll 0% 50%; width: 100%; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial; font-family: Times New Roman;" class="MsoNormalTable"&gt;
    &lt;tbody&gt;
        &lt;tr style=""&gt;
            &lt;td style="padding: 0.75pt;"&gt;
            &lt;p class="MsoNormal"&gt;&lt;span style="color: blue;"&gt;Whar is an index? What are the types of indexes? How many   clustered indexes can be created on a table? I create a separate index on   each column of a table. what are the advantages and disadvantages of this   approach?&lt;/span&gt;&lt;span style="font-size: 14pt;"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;
            &lt;/td&gt;
        &lt;/tr&gt;
    &lt;/tbody&gt;
&lt;/table&gt;
&lt;p style="font-family: Times New Roman;"&gt;Indexes in SQL Server are similar to the indexes in books. They help SQL Server retrieve the data quicker.&lt;br /&gt;
&lt;br /&gt;
Indexes are of two types. Clustered indexes and non-clustered indexes. When you craete a clustered index on a table, all the rows in the table are stored in the order of the clustered index key. So, there can be only one clustered index per table. Non-clustered indexes have their own storage separate from the table data storage. Non-clustered indexes are stored as B-tree structures (so do clustered indexes), with the leaf level nodes having the index key and it's row locater. The row located could be the RID or the Clustered index key, depending up on the absence or presence of clustered index on the table.&lt;br /&gt;
&lt;br /&gt;
If you create an index on each column of a table, it improves the query performance, as the query optimizer can choose from all the existing indexes to come up with an efficient execution plan. At the same t ime, data modification operations (such as INSERT, UPDATE, DELETE) will become slow, as every time data changes in the table, all the indexes need to be updated. Another disadvantage is that, indexes need disk space, the more indexes you have, more disk space is used.&lt;span style="font-size: 14pt;"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p align="center" style="text-align: center; font-family: Times New Roman;"&gt;&lt;span style="font-size: 14pt;"&gt;&lt;a href="http://vyaskn.tripod.com/#top"&gt;&lt;u&gt;&lt;span style="font-size: 12pt; color: blue;"&gt;&lt;/span&gt;&lt;/u&gt;&lt;/a&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;
&lt;div align="center" style="font-family: Times New Roman;"&gt;  &lt;/div&gt;
&lt;p class="MsoNormal" style="font-family: Times New Roman;"&gt;&lt;span style="font-size: 14pt; display: none;"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;
&lt;table width="100%" cellpadding="0" border="0" style="background: rgb(219, 248, 201) none repeat scroll 0% 50%; width: 100%; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial; font-family: Times New Roman;" class="MsoNormalTable"&gt;
    &lt;tbody&gt;
        &lt;tr style=""&gt;
            &lt;td style="padding: 0.75pt;"&gt;
            &lt;p class="MsoNormal"&gt;&lt;span style="color: blue;"&gt;What is RAID and what are different types of RAID configurations?&lt;/span&gt;&lt;span style="font-size: 14pt;"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;
            &lt;/td&gt;
        &lt;/tr&gt;
    &lt;/tbody&gt;
&lt;/table&gt;
&lt;p style="font-family: Times New Roman;"&gt;&lt;span style="color: black;"&gt;RAID stands for Redundant Array of Inexpensive Disks, used to provide fault tolerance to database servers. There are six RAID levels 0 through 5 offering different levels of performance, fault tolerance. MSDN has some information about RAID levels and for detailed information, check out the &lt;/span&gt;&lt;span style="font-size: 14pt;"&gt;&lt;a target="_new" href="http://www.raid-advisory.com/"&gt;&lt;span style="font-size: 12pt; color: blue;"&gt;RAID advisory board's homepage&lt;/span&gt;&lt;/a&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;
&lt;table width="100%" cellpadding="0" border="0" style="background: rgb(219, 248, 201) none repeat scroll 0% 50%; width: 100%; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial; font-family: Times New Roman;" class="MsoNormalTable"&gt;
    &lt;tbody&gt;
        &lt;tr style=""&gt;
            &lt;td style="padding: 0.75pt;"&gt;
            &lt;p class="MsoNormal"&gt;&lt;span style="color: blue;"&gt;What are the steps you will take to improve performance of a poor   performing query?&lt;/span&gt;&lt;span style="font-size: 14pt;"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;
            &lt;/td&gt;
        &lt;/tr&gt;
    &lt;/tbody&gt;
&lt;/table&gt;
&lt;p style="font-family: Times New Roman;"&gt;&lt;span style="color: black;"&gt;This is a very open ended question and there could be a lot of reasons behind the poor performance of a query. But some general issues that you could talk about would be: No indexes, table scans, missing or out of date statistics, blocking, excess recompilations of stored procedures, procedures and triggers without SET NOCOUNT ON, poorly written query with unnecessarily complicated joins, too much normalization, excess usage of cursors and temporary tables.&lt;br /&gt;
&lt;br /&gt;
Some of the tools/ways that help you troubleshooting performance problems are: SET SHOWPLAN_ALL ON, SET SHOWPLAN_TEXT ON, SET STATISTICS IO ON, SQL Server Profiler, Windows NT /2000 Performance monitor, Graphical execution plan in Query Analyzer.&lt;br /&gt;
&lt;br /&gt;
Download the white paper on performance tuning SQL Server from Microsoft web site. Don't forget to check out &lt;/span&gt;&lt;span style="font-size: 14pt;"&gt;&lt;a target="_new" href="http://www.sql-server-performance.com/"&gt;&lt;span style="font-size: 12pt; color: blue;"&gt;sql-server-performance.com&lt;/span&gt;&lt;/a&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;
&lt;table width="100%" cellpadding="0" border="0" style="background: rgb(219, 248, 201) none repeat scroll 0% 50%; width: 100%; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial; font-family: Times New Roman;" class="MsoNormalTable"&gt;
    &lt;tbody&gt;
        &lt;tr style=""&gt;
            &lt;td style="padding: 0.75pt;"&gt;
            &lt;p class="MsoNormal"&gt;&lt;span style="color: blue;"&gt;What are the steps you will take, if you are tasked with securing   an SQL Server?&lt;/span&gt;&lt;span style="font-size: 14pt;"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;
            &lt;/td&gt;
        &lt;/tr&gt;
    &lt;/tbody&gt;
&lt;/table&gt;
&lt;p style="font-family: Times New Roman;"&gt;&lt;span style="color: black;"&gt;Again this is another open ended question. Here are some things you could talk about: Preferring NT authentication, using server, databse and application roles to control access to the data, securing the physical database files using NTFS permissions, using an unguessable SA password, restricting physical access to the SQL Server, renaming the Administrator account on the SQL Server computer, disabling the Guest account, enabling auditing, using multiprotocol encryption, setting up SSL, setting up firewalls, isolating SQL Server from the web server etc.&lt;br /&gt;
&lt;br /&gt;
Read the white paper on SQL Server security from Microsoft website. Also check out &lt;/span&gt;&lt;span style="font-size: 14pt;"&gt;&lt;a target="_new" href="http://vyaskn.tripod.com/sql_server_security_best_practices.htm"&gt;&lt;span style="font-size: 12pt; color: blue;"&gt;My SQL Server security best practices&lt;/span&gt;&lt;/a&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;
&lt;table width="100%" cellpadding="0" border="0" style="background: rgb(219, 248, 201) none repeat scroll 0% 50%; width: 100%; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial; font-family: Times New Roman;" class="MsoNormalTable"&gt;
    &lt;tbody&gt;
        &lt;tr style=""&gt;
            &lt;td style="padding: 0.75pt;"&gt;
            &lt;p class="MsoNormal"&gt;&lt;span style="color: blue;"&gt;What is a deadlock and what is a live lock? How will you go about   resolving deadlocks?&lt;/span&gt;&lt;span style="font-size: 14pt;"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;
            &lt;/td&gt;
        &lt;/tr&gt;
    &lt;/tbody&gt;
&lt;/table&gt;
&lt;p style="font-family: Times New Roman;"&gt;&lt;span style="color: black;"&gt;Deadlock is a situation when two processes, each having a lock on one piece of data, attempt to acquire a lock on the other's piece. Each process  would wait indefinitely for the other to release the lock, unless one of the user processes is terminated. SQL Server detects deadlocks and terminates one user's process.&lt;br /&gt;
&lt;br /&gt;
A livelock is one, where a  request for an exclusive lock is repeatedly denied because a series of overlapping shared locks keeps interfering. SQL Server detects the situation after four denials and refuses further shared locks. A livelock also occurs when read transactions monopolize a table or page, forcing a write transaction to wait indefinitely.&lt;br /&gt;
&lt;br /&gt;
Check out SET DEADLOCK_PRIORITY and "Minimizing Deadlocks"  in SQL Server books online. Also check out the article Q169960 from Microsoft knowledge base.&lt;/span&gt;&lt;span style="font-size: 14pt;"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;
&lt;table width="100%" cellpadding="0" border="0" style="background: rgb(219, 248, 201) none repeat scroll 0% 50%; width: 100%; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial; font-family: Times New Roman;" class="MsoNormalTable"&gt;
    &lt;tbody&gt;
        &lt;tr style=""&gt;
            &lt;td style="padding: 0.75pt;"&gt;
            &lt;p class="MsoNormal"&gt;&lt;span style="color: blue;"&gt;What is blocking and how would you troubleshoot it?&lt;/span&gt;&lt;span style="font-size: 14pt;"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;
            &lt;/td&gt;
        &lt;/tr&gt;
    &lt;/tbody&gt;
&lt;/table&gt;
&lt;p style="font-family: Times New Roman;"&gt;Blocking happens when one connection from an application holds a lock and a second connection requires a conflicting lock type. This forces the second connection to wait, blocked on the first. &lt;br /&gt;
&lt;br /&gt;
Read up the following topics in SQL Server books online: Understanding and avoiding blocking, Coding efficient transactions.&lt;span style="font-size: 14pt;"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;
&lt;table width="100%" cellpadding="0" border="0" style="background: rgb(219, 248, 201) none repeat scroll 0% 50%; width: 100%; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial; font-family: Times New Roman;" class="MsoNormalTable"&gt;
    &lt;tbody&gt;
        &lt;tr style=""&gt;
            &lt;td style="padding: 0.75pt;"&gt;
            &lt;p class="MsoNormal"&gt;&lt;span style="color: blue;"&gt;Explain CREATE DATABASE syntax&lt;/span&gt;&lt;span style="font-size: 14pt;"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;
            &lt;/td&gt;
        &lt;/tr&gt;
    &lt;/tbody&gt;
&lt;/table&gt;
&lt;p style="font-family: Times New Roman;"&gt;Many of us are used to craeting databases from the Enterprise Manager or by just issuing the command: CREATE DATABAE MyDB. But what if you have to create a database with two filegroups, one on drive C and the other on drive D with log on drive E with an initial size of 600 MB and with a growth factor of 15%? That's why being a DBA you should be familiar with the CREATE DATABASE syntax. Check out SQL Server books online for more information.&lt;span style="font-size: 14pt;"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;
&lt;table width="100%" cellpadding="0" border="0" style="background: rgb(219, 248, 201) none repeat scroll 0% 50%; width: 100%; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial; font-family: Times New Roman;" class="MsoNormalTable"&gt;
    &lt;tbody&gt;
        &lt;tr style=""&gt;
            &lt;td style="padding: 0.75pt;"&gt;
            &lt;p class="MsoNormal"&gt;&lt;span style="color: blue;"&gt;How to restart SQL Server in single user mode? How to start SQL   Server in minimal configuration mode?&lt;/span&gt;&lt;span style="font-size: 14pt;"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;
            &lt;/td&gt;
        &lt;/tr&gt;
    &lt;/tbody&gt;
&lt;/table&gt;
&lt;p style="font-family: Times New Roman;"&gt;SQL Server can be started from command line, using the SQLSERVR.EXE. This EXE has some very important parameters with which a DBA should be familiar with. -m is used for starting SQL Server in single user mode and -f is used to start the SQL Server in minimal confuguration mode. Check out SQL Server books online for more parameters and their explanations.&lt;span style="font-size: 14pt;"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;
&lt;table width="100%" cellpadding="0" border="0" style="background: rgb(219, 248, 201) none repeat scroll 0% 50%; width: 100%; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial; font-family: Times New Roman;" class="MsoNormalTable"&gt;
    &lt;tbody&gt;
        &lt;tr style=""&gt;
            &lt;td style="padding: 0.75pt;"&gt;
            &lt;p class="MsoNormal"&gt;&lt;span style="color: blue;"&gt;As a part of your job, what are the DBCC commands that you   commonly use for database maintenance?&lt;/span&gt;&lt;span style="font-size: 14pt;"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;
            &lt;/td&gt;
        &lt;/tr&gt;
    &lt;/tbody&gt;
&lt;/table&gt;
&lt;p style="font-family: Times New Roman;"&gt;DBCC CHECKDB, DBCC CHECKTABLE, DBCC CHECKCATALOG, DBCC CHECKALLOC, DBCC SHOWCONTIG, DBCC SHRINKDATABASE, DBCC SHRINKFILE etc. But there are a whole load of DBCC commands which are very useful for DBAs. Check out SQL Server books online for more information.&lt;span style="font-size: 14pt;"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;
&lt;table width="100%" cellpadding="0" border="0" style="background: rgb(219, 248, 201) none repeat scroll 0% 50%; width: 100%; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial; font-family: Times New Roman;" class="MsoNormalTable"&gt;
    &lt;tbody&gt;
        &lt;tr style=""&gt;
            &lt;td style="padding: 0.75pt;"&gt;
            &lt;p class="MsoNormal"&gt;&lt;span style="color: blue;"&gt;What are statistics, under what circumstances they go out of   date, how do you update them?&lt;/span&gt;&lt;span style="font-size: 14pt;"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;
            &lt;/td&gt;
        &lt;/tr&gt;
    &lt;/tbody&gt;
&lt;/table&gt;
&lt;p style="font-family: Times New Roman;"&gt;Statistics determine the selectivity of the indexes. If an indexed column has unique values then the selectivity of that index is more, as opposed to an index with non-unique values. Query optimizer uses these indexes in determining whether to choose an index or not while executing a query. &lt;br /&gt;
&lt;br /&gt;
Some situations under which you should update statistics:&lt;br /&gt;
1) If there is significant change in the key values in the index&lt;br /&gt;
2) If a large amount of data in an indexed column has been added, changed, or removed (that is, if the distribution of key values has changed), or the table has been truncated using the TRUNCATE TABLE statement and then repopulated&lt;br /&gt;
3) Database is upgraded from a previous version&lt;br /&gt;
&lt;br /&gt;
Look up SQL Server books online for the following commands: UPDATE STATISTICS, STATS_DATE, DBCC SHOW_STATISTICS, CREATE STATISTICS, DROP STATISTICS, sp_autostats, sp_createstats, sp_updatestats&lt;span style="font-size: 14pt;"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;
&lt;table width="100%" cellpadding="0" border="0" style="background: rgb(219, 248, 201) none repeat scroll 0% 50%; width: 100%; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial; font-family: Times New Roman;" class="MsoNormalTable"&gt;
    &lt;tbody&gt;
        &lt;tr style=""&gt;
            &lt;td style="padding: 0.75pt;"&gt;
            &lt;p class="MsoNormal"&gt;&lt;span style="color: blue;"&gt;What are the different ways of moving data/databases between   servers and databases in SQL Server?&lt;/span&gt;&lt;span style="font-size: 14pt;"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;
            &lt;/td&gt;
        &lt;/tr&gt;
    &lt;/tbody&gt;
&lt;/table&gt;
&lt;p style="font-family: Times New Roman;"&gt;There are lots of options available, you have to choose your option depending upon your requirements. Some of the options you have are: BACKUP/RESTORE, dettaching and attaching databases, replication, DTS, BCP, logshipping, INSERT...SELECT, SELECT...INTO, creating INSERT scripts to generate data.&lt;span style="font-size: 14pt;"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;
&lt;table width="100%" cellpadding="0" border="0" style="background: rgb(219, 248, 201) none repeat scroll 0% 50%; width: 100%; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial; font-family: Times New Roman;" class="MsoNormalTable"&gt;
    &lt;tbody&gt;
        &lt;tr style=""&gt;
            &lt;td style="padding: 0.75pt;"&gt;
            &lt;p class="MsoNormal"&gt;&lt;span style="color: blue;"&gt;Explian different types of BACKUPs avaialabe in SQL Server? Given   a particular scenario, how would you go about choosing a backup plan?&lt;/span&gt;&lt;span style="font-size: 14pt;"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;
            &lt;/td&gt;
        &lt;/tr&gt;
    &lt;/tbody&gt;
&lt;/table&gt;
&lt;p style="font-family: Times New Roman;"&gt;Types of backups you can create in SQL Sever 7.0+ are Full database backup, differential database backup, transaction log backup, filegroup backup. Check out the BACKUP and RESTORE commands in SQL Server books online. Be prepared to write the commands in your interview. Books online also has information on detailed backup/restore architecture and when one should go for a particular kind of backup.&lt;span style="font-size: 14pt;"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;
&lt;table width="100%" cellpadding="0" border="0" style="background: rgb(219, 248, 201) none repeat scroll 0% 50%; width: 100%; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial; font-family: Times New Roman;" class="MsoNormalTable"&gt;
    &lt;tbody&gt;
        &lt;tr style=""&gt;
            &lt;td style="padding: 0.75pt;"&gt;
            &lt;p class="MsoNormal"&gt;&lt;span style="color: blue;"&gt;What is database replicaion? What are the different types of   replication you can set up in SQL Server?&lt;/span&gt;&lt;span style="font-size: 14pt;"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;
            &lt;/td&gt;
        &lt;/tr&gt;
    &lt;/tbody&gt;
&lt;/table&gt;
&lt;p style="font-family: Times New Roman;"&gt;Replication is the process of copying/moving data between databases on the same or different servers. SQL Server supports the following types of replication scenarios:&lt;span style="font-size: 14pt;"&gt; &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;
&lt;ul type="disc" style="font-family: Times New Roman;"&gt;
    &lt;li style="" class="MsoNormal"&gt;Snapshot replication&lt;span style="font-size: 14pt;"&gt; &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/li&gt;
    &lt;li style="" class="MsoNormal"&gt;Transactional replication (with immediate      updating subscribers, with queued updating subscribers)&lt;span style="font-size: 14pt;"&gt; &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/li&gt;
    &lt;li style="" class="MsoNormal"&gt;Merge replication&lt;span style="font-size: 14pt;"&gt; &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p style="font-family: Times New Roman;"&gt;See SQL Server books online for indepth coverage on replication. Be prepared to explain how different replication agents function, what are the main system tables used in replication etc.&lt;span style="font-size: 14pt;"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;
&lt;table width="100%" cellpadding="0" border="0" style="background: rgb(219, 248, 201) none repeat scroll 0% 50%; width: 100%; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial; font-family: Times New Roman;" class="MsoNormalTable"&gt;
    &lt;tbody&gt;
        &lt;tr style=""&gt;
            &lt;td style="padding: 0.75pt;"&gt;
            &lt;p class="MsoNormal"&gt;&lt;span style="color: blue;"&gt;How to determine the service pack currently installed on SQL   Server?&lt;/span&gt;&lt;span style="font-size: 14pt;"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;
            &lt;/td&gt;
        &lt;/tr&gt;
    &lt;/tbody&gt;
&lt;/table&gt;
&lt;p style="font-family: Times New Roman;"&gt;&lt;span style="color: black;"&gt;The global variable @@Version stores the build number of the sqlservr.exe, which is used to determine the service pack installed. To know more about this process visit &lt;/span&gt;&lt;span style="font-size: 14pt;"&gt;&lt;a href="http://vyaskn.tripod.com/sqlsps.htm"&gt;&lt;span style="font-size: 12pt; color: blue;"&gt;SQL Server service packs and versions.&lt;/span&gt;&lt;/a&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;
&lt;div align="center" style="font-family: Times New Roman;"&gt;  &lt;/div&gt;
&lt;p class="MsoNormal" style="font-family: Times New Roman;"&gt;&lt;span style="font-size: 14pt; display: none;"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;
&lt;table width="100%" cellpadding="0" border="0" style="background: rgb(219, 248, 201) none repeat scroll 0% 50%; width: 100%; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial; font-family: Times New Roman;" class="MsoNormalTable"&gt;
    &lt;tbody&gt;
        &lt;tr style=""&gt;
            &lt;td style="padding: 0.75pt;"&gt;
            &lt;p class="MsoNormal"&gt;&lt;span style="color: blue;"&gt;What are cursors? Explain different types of cursors. What are   the disadvantages of cursors? How can you avoid cursors?&lt;/span&gt;&lt;span style="font-size: 14pt;"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;
            &lt;/td&gt;
        &lt;/tr&gt;
    &lt;/tbody&gt;
&lt;/table&gt;
&lt;p style="font-family: Times New Roman;"&gt;Cursors allow row-by-row prcessing of the resultsets.&lt;br /&gt;
&lt;br /&gt;
Types of cursors: Static, Dynamic, Forward-only, Keyset-driven. See books online for more information.&lt;br /&gt;
&lt;br /&gt;
Disadvantages of cursors: Each time you fetch a row from the cursor, it results in a network roundtrip, where as a normal SELECT query makes only one rowundtrip, however large the resultset is. Cursors are also costly because they require more resources and temporary storage (results in more IO operations). Furthere, there are restrictions on the SELECT statements that can be used with some types of cursors.&lt;br /&gt;
&lt;br /&gt;
Most of the times, set based operations can be used instead of cursors. Here is an example:&lt;br /&gt;
&lt;br /&gt;
If you have to give a flat hike to your employees using the following criteria:&lt;br /&gt;
&lt;br /&gt;
Salary between 30000 and 40000 -- 5000 hike&lt;br /&gt;
Salary between 40000 and 55000 -- 7000 hike&lt;br /&gt;
Salary between 55000 and 65000 -- 9000 hike&lt;br /&gt;
&lt;br /&gt;
In this situation many developers tend to use a cursor, determine each employee's salary and update his salary according to the above formula. But the same can be achieved by multiple update statements or can be combined in a single UPDATE statement as shown below:&lt;br /&gt;
&lt;br /&gt;
&lt;span style="color: blue;"&gt;UPDATE tbl_emp SET salary = &lt;br /&gt;
CASE WHEN salary BETWEEN 30000 AND 40000 THEN salary + 5000&lt;br /&gt;
WHEN salary BETWEEN 40000 AND 55000 THEN salary + 7000&lt;br /&gt;
WHEN salary BETWEEN 55000 AND 65000 THEN salary + 10000&lt;br /&gt;
END&lt;br /&gt;
&lt;br /&gt;
&lt;/span&gt;Another situation in which developers tend to use cursors: You need to call a stored procedure when a column in a particular row meets certain condition. You don't have to use cursors for this. This can be achieved using WHILE loop, as long as there is a unique key to identify each row. For examples of using WHILE loop for row by row processing, check out the '&lt;span style="font-size: 14pt;"&gt;&lt;a href="http://vyaskn.tripod.com/code.htm"&gt;&lt;span style="font-size: 12pt; color: blue;"&gt;My code library&lt;/span&gt;&lt;/a&gt;&lt;/span&gt;' section of my site or &lt;span style="font-size: 14pt;"&gt;&lt;a href="http://vyaskn.tripod.com/search.htm"&gt;&lt;span style="font-size: 12pt; color: blue;"&gt;search&lt;/span&gt;&lt;/a&gt;&lt;/span&gt; for WHILE.&lt;span style="font-size: 14pt;"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;
&lt;table width="100%" cellpadding="0" border="0" style="background: rgb(219, 248, 201) none repeat scroll 0% 50%; width: 100%; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial; font-family: Times New Roman;" class="MsoNormalTable"&gt;
    &lt;tbody&gt;
        &lt;tr style=""&gt;
            &lt;td style="padding: 0.75pt;"&gt;
            &lt;p class="MsoNormal"&gt;&lt;span style="color: blue;"&gt;Write down the general syntax for a SELECT statements covering   all the options.&lt;/span&gt;&lt;span style="font-size: 14pt;"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;
            &lt;/td&gt;
        &lt;/tr&gt;
    &lt;/tbody&gt;
&lt;/table&gt;
&lt;p style="font-family: Times New Roman;"&gt;Here's the basic syntax: (Also checkout SELECT in books online for advanced syntax).&lt;br /&gt;
&lt;br /&gt;
SELECT select_list&lt;br /&gt;
[INTO new_table_]&lt;br /&gt;
FROM table_source&lt;br /&gt;
[WHERE search_condition]&lt;br /&gt;
[GROUP BY group_by_expression]&lt;br /&gt;
[HAVING search_condition]&lt;br /&gt;
[ORDER BY order_expression [ASC | DESC] ]&lt;span style="font-size: 14pt;"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;
&lt;table width="100%" cellpadding="0" border="0" style="background: rgb(219, 248, 201) none repeat scroll 0% 50%; width: 100%; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial; font-family: Times New Roman;" class="MsoNormalTable"&gt;
    &lt;tbody&gt;
        &lt;tr style=""&gt;
            &lt;td style="padding: 0.75pt;"&gt;
            &lt;p class="MsoNormal"&gt;&lt;span style="color: blue;"&gt;What is a join and explain different types of joins.&lt;/span&gt;&lt;span style="font-size: 14pt;"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;
            &lt;/td&gt;
        &lt;/tr&gt;
    &lt;/tbody&gt;
&lt;/table&gt;
&lt;p style="font-family: Times New Roman;"&gt;Joins are used in queries to explain how different tables are related. Joins also let you select data from a table depending upon data from another table. &lt;br /&gt;
&lt;br /&gt;
Types of joins: INNER JOINs, OUTER JOINs, CROSS JOINs. OUTER JOINs are further classified as LEFT OUTER JOINS, RIGHT OUTER JOINS and FULL OUTER JOINS.&lt;br /&gt;
&lt;br /&gt;
For more information see pages from books online titled: "Join Fundamentals" and "Using Joins".&lt;span style="font-size: 14pt;"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;
&lt;table width="100%" cellpadding="0" border="0" style="background: rgb(219, 248, 201) none repeat scroll 0% 50%; width: 100%; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial; font-family: Times New Roman;" class="MsoNormalTable"&gt;
    &lt;tbody&gt;
        &lt;tr style=""&gt;
            &lt;td style="padding: 0.75pt;"&gt;
            &lt;p class="MsoNormal"&gt;&lt;span style="color: blue;"&gt;Can you have a nested transaction?&lt;/span&gt;&lt;span style="font-size: 14pt;"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;
            &lt;/td&gt;
        &lt;/tr&gt;
    &lt;/tbody&gt;
&lt;/table&gt;
&lt;p style="font-family: Times New Roman;"&gt;Yes, very much. Check out BEGIN TRAN, COMMIT, ROLLBACK, SAVE TRAN and @@TRANCOUNT&lt;span style="font-size: 14pt;"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;
&lt;table width="100%" cellpadding="0" border="0" style="background: rgb(219, 248, 201) none repeat scroll 0% 50%; width: 100%; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial; font-family: Times New Roman;" class="MsoNormalTable"&gt;
    &lt;tbody&gt;
        &lt;tr style=""&gt;
            &lt;td style="padding: 0.75pt;"&gt;
            &lt;p class="MsoNormal"&gt;&lt;span style="color: blue;"&gt;What is an extended stored procedure? Can you instantiate a COM   object by using T-SQL?&lt;/span&gt;&lt;span style="font-size: 14pt;"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;
            &lt;/td&gt;
        &lt;/tr&gt;
    &lt;/tbody&gt;
&lt;/table&gt;
&lt;p style="font-family: Times New Roman;"&gt;An extended stored procedure is a function within a DLL (written in a programming language like C, C++ using Open Data Services (ODS) API) that can be called from T-SQL, just the way we call normal stored procedures using the EXEC statement. See books online to learn how to create extended stored procedures and how to add them to SQL Server. &lt;br /&gt;
&lt;br /&gt;
Yes, you can instantiate a COM (written in languages like VB, VC++) object from T-SQL by using sp_OACreate stored procedure. Also see books online for sp_OAMethod, sp_OAGetProperty, sp_OASetProperty, sp_OADestroy. For an example of creating a COM object in VB and calling it from T-SQL, see '&lt;span style="font-size: 14pt;"&gt;&lt;a href="http://vyaskn.tripod.com/code.htm"&gt;&lt;span style="font-size: 12pt; color: blue;"&gt;My code library&lt;/span&gt;&lt;/a&gt;&lt;/span&gt;' section of this site. &lt;span style="font-size: 14pt;"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;
&lt;table width="100%" cellpadding="0" border="0" style="background: rgb(219, 248, 201) none repeat scroll 0% 50%; width: 100%; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial; font-family: Times New Roman;" class="MsoNormalTable"&gt;
    &lt;tbody&gt;
        &lt;tr style=""&gt;
            &lt;td style="padding: 0.75pt;"&gt;
            &lt;p class="MsoNormal"&gt;&lt;span style="color: blue;"&gt;What is the system function to get the current user's user id?&lt;/span&gt;&lt;span style="font-size: 14pt;"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;
            &lt;/td&gt;
        &lt;/tr&gt;
    &lt;/tbody&gt;
&lt;/table&gt;
&lt;p style="font-family: Times New Roman;"&gt;USER_ID(). Also check out other system functions like USER_NAME(), SYSTEM_USER, SESSION_USER, CURRENT_USER, USER, SUSER_SID(), HOST_NAME(). &lt;span style="font-size: 14pt;"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;
&lt;table width="100%" cellpadding="0" border="0" style="background: rgb(219, 248, 201) none repeat scroll 0% 50%; width: 100%; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial; font-family: Times New Roman;" class="MsoNormalTable"&gt;
    &lt;tbody&gt;
        &lt;tr style=""&gt;
            &lt;td style="padding: 0.75pt;"&gt;
            &lt;p class="MsoNormal"&gt;&lt;span style="color: blue;"&gt;What are triggers? How many triggers you can have on a table? How   to invoke a trigger on demand?&lt;/span&gt;&lt;span style="font-size: 14pt;"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;
            &lt;/td&gt;
        &lt;/tr&gt;
    &lt;/tbody&gt;
&lt;/table&gt;
&lt;p style="font-family: Times New Roman;"&gt;Triggers are special kind of stored procedures that get executed automatically when an INSERT, UPDATE or DELETE operation takes place on a table. &lt;br /&gt;
&lt;br /&gt;
In SQL Server 6.5 you could define only 3 triggers per table, one for INSERT, one for UPDATE and one for DELETE. From SQL Server 7.0 onwards, this restriction is gone, and you could create multiple triggers per each action. But in 7.0 there's no way to control the order in which the triggers fire. In SQL Server 2000 you could specify which trigger fires first or fires last using sp_settriggerorder&lt;br /&gt;
&lt;br /&gt;
Triggers can't be invoked on demand. They get triggered only when an associated action (INSERT, UPDATE, DELETE) happens on the table on which they are defined.&lt;br /&gt;
&lt;br /&gt;
Triggers are generally used to implement business rules, auditing. Triggers can also be used to extend the referential integrity checks, but wherever possible, use constraints for this purpose, instead of triggers, as constraints are much faster.&lt;br /&gt;
&lt;br /&gt;
Till SQL Server 7.0, triggers fire only after the data modification operation happens. So in a way, they are called post triggers. But in SQL Server 2000 you could create pre triggers also. Search SQL Server 2000 books online for INSTEAD OF triggers. &lt;br /&gt;
&lt;br /&gt;
Also check out books online for 'inserted table', 'deleted table' and COLUMNS_UPDATED()&lt;span style="font-size: 14pt;"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;
&lt;table width="100%" cellpadding="0" border="0" style="background: rgb(219, 248, 201) none repeat scroll 0% 50%; width: 100%; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial; font-family: Times New Roman;" class="MsoNormalTable"&gt;
    &lt;tbody&gt;
        &lt;tr style=""&gt;
            &lt;td style="padding: 0.75pt;"&gt;
            &lt;p class="MsoNormal"&gt;&lt;span style="color: blue;"&gt;There is a trigger defined for INSERT operations on a table, in an   OLTP system. The trigger is written to instantiate a COM object and pass the   newly insterted rows to it for some custom processing. What do you think of   this implementation? Can this be implemented better?&lt;/span&gt;&lt;span style="font-size: 14pt;"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;
            &lt;/td&gt;
        &lt;/tr&gt;
    &lt;/tbody&gt;
&lt;/table&gt;
&lt;p style="font-family: Times New Roman;"&gt;Instantiating COM objects is a time consuming process and since you are doing it from within a trigger, it slows down the data insertion process. Same is the case with sending emails from triggers. This scenario can be better implemented by logging all the necessary data into a separate table, and have a job which periodically checks this table and does the needful.&lt;span style="font-size: 14pt;"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;
&lt;table width="100%" cellpadding="0" border="0" style="background: rgb(219, 248, 201) none repeat scroll 0% 50%; width: 100%; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial; font-family: Times New Roman;" class="MsoNormalTable"&gt;
    &lt;tbody&gt;
        &lt;tr style=""&gt;
            &lt;td style="padding: 0.75pt;"&gt;
            &lt;p class="MsoNormal"&gt;&lt;span style="color: blue;"&gt;What is a self join? Explain it with an example.&lt;/span&gt;&lt;span style="font-size: 14pt;"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;
            &lt;/td&gt;
        &lt;/tr&gt;
    &lt;/tbody&gt;
&lt;/table&gt;
&lt;p style="font-family: Times New Roman;"&gt;Self join is just like any other join, except that two instances of the same table will be joined in the query. Here is an example: Employees table which contains rows for normal employees as well as managers. So, to find out the managers of all the employees, you need a self join.&lt;br /&gt;
&lt;span style="color: blue;"&gt;&lt;br /&gt;
CREATE TABLE emp &lt;br /&gt;
(&lt;br /&gt;
empid int,&lt;br /&gt;
mgrid int,&lt;br /&gt;
empname char(10)&lt;br /&gt;
)&lt;br /&gt;
&lt;br /&gt;
INSERT emp SELECT 1,2,'Vyas'&lt;br /&gt;
INSERT emp SELECT 2,3,'Mohan'&lt;br /&gt;
INSERT emp SELECT 3,NULL,'Shobha'&lt;br /&gt;
INSERT emp SELECT 4,2,'Shridhar'&lt;br /&gt;
INSERT emp SELECT 5,2,'Sourabh'&lt;br /&gt;
&lt;br /&gt;
SELECT t1.empname [Employee], t2.empname [Manager]&lt;br /&gt;
FROM emp t1, emp t2&lt;br /&gt;
WHERE t1.mgrid = t2.empid&lt;/span&gt;&lt;span style="font-size: 14pt;"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p style="font-family: Times New Roman;"&gt;Here's an advanced query using a LEFT OUTER JOIN that even returns the employees without managers (super bosses)&lt;span style="font-size: 14pt;"&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;/span&gt;&lt;span style="color: blue;"&gt;SELECT t1.empname [Employee], COALESCE(t2.empname, 'No manager') [Manager]&lt;br /&gt;
FROM emp t1 &lt;br /&gt;
LEFT OUTER JOIN&lt;br /&gt;
emp t2&lt;br /&gt;
ON &lt;br /&gt;
t1.mgrid = t2.empid&lt;/span&gt; &lt;span style="font-size: 14pt;"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;
&lt;table width="100%" cellpadding="0" border="0" style="background: rgb(219, 248, 201) none repeat scroll 0% 50%; width: 100%; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial; font-family: Times New Roman;" class="MsoNormalTable"&gt;
    &lt;tbody&gt;
        &lt;tr style=""&gt;
            &lt;td style="padding: 0.75pt;"&gt;
            &lt;p class="MsoNormal"&gt;&lt;span style="color: blue;"&gt;Given an employee table, how would you find out the second   highest salary?&lt;/span&gt;&lt;span style="font-size: 14pt;"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;
            &lt;/td&gt;
        &lt;/tr&gt;
    &lt;/tbody&gt;
&lt;/table&gt;&lt;p&gt;&lt;a href="http://www.pheedo.com/click.phdo?x=6cda6ad746d942b9a1110d0715a4fa12&amp;u=120990"&gt;&lt;img src="http://www.pheedo.com/img.phdo?x=6cda6ad746d942b9a1110d0715a4fa12&amp;u=120990" border="0"/&gt;&lt;/a&gt;&lt;/p&gt;&lt;iframe src="http://ads.geekswithblogs.net/a.aspx?ZoneID=5&amp;amp;Task=Get&amp;amp;PageID=31016&amp;amp;SiteID=1" width=1 height=1 Marginwidth=0 Marginheight=0 Hspace=0 Vspace=0 Frameborder=0 Scrolling=No&gt;
&lt;script language='javascript1.1' src="http://ads.geekswithblogs.net/a.aspx?ZoneID=5&amp;amp;Task=Get&amp;amp;Browser=NETSCAPE4&amp;amp;NoCache=True&amp;PageID=31016&amp;amp;SiteID=1"&gt;&lt;/script&gt;
&lt;noscript&gt;&lt;a href="http://ads.geekswithblogs.net/a.aspx?ZoneID=5&amp;amp;Task=Click&amp;amp;Mode=HTML&amp;amp;SiteID=1&amp;amp;PageID=31016" target="_blank"&gt;
&lt;img src="http://ads.geekswithblogs.net/a.aspx?ZoneID=5&amp;amp;Task=Get&amp;amp;Mode=HTML&amp;amp;SiteID=1&amp;amp;PageID=31016" width="1" height="1" border="0"  alt=""&gt;&lt;/a&gt;
&lt;/noscript&gt;
&lt;/iframe&gt;
&lt;img src="http://geekswithblogs.net/Gaurav/aggbug/120990.aspx" width="1" height="1" /&gt;</description>
            <dc:creator>Gaurav Taneja</dc:creator>
            <guid>http://geekswithblogs.net/Gaurav/archive/2008/04/03/120990.aspx</guid>
            <pubDate>Thu, 03 Apr 2008 05:26:12 GMT</pubDate>
            <wfw:comment>http://geekswithblogs.net/Gaurav/comments/120990.aspx</wfw:comment>
            <comments>http://geekswithblogs.net/Gaurav/archive/2008/04/03/120990.aspx#feedback</comments>
            <wfw:commentRss>http://geekswithblogs.net/Gaurav/comments/commentRss/120990.aspx</wfw:commentRss>
            <trackback:ping>http://geekswithblogs.net/Gaurav/services/trackbacks/120990.aspx</trackback:ping>
        </item>
        <item>
            <title>Simple Questions on .NET</title>
            <link>http://geekswithblogs.net/Gaurav/archive/2008/04/02/120987.aspx</link>
            <description>&lt;p align="right" class="MsoNormal" style="text-align: right; font-family: Arial;"&gt;&lt;font size="3"&gt;&lt;span style="font-size: 10pt;"&gt;&lt;a href="http://groups.msn.com/MumbaiUserGroup/yourwebpage3.msnw" target="_top"&gt; &lt;/a&gt;&lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/font&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="font-family: Arial;"&gt;&lt;font size="3"&gt;&lt;strong&gt;&lt;span style="font-size: 10pt;"&gt;When was .NET announced?&lt;/span&gt;&lt;/strong&gt;&lt;strong&gt;&lt;span style="font-size: 10pt;"&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/strong&gt;&lt;span style="font-size: 10pt;"&gt;Bill Gates delivered a keynote at Forum 2000, held June 22, 2000, outlining the .NET 'vision'. The July 2000 PDC had a number of sessions on .NET technology, and delegates were given CDs containing a pre-release version of the .NET framework/SDK and Visual Studio.NET.&lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/font&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="font-family: Arial;"&gt;&lt;font size="3"&gt; &lt;o:p&gt;&lt;/o:p&gt;&lt;/font&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="font-family: Arial;"&gt;&lt;font size="3"&gt;&lt;strong&gt;&lt;span style="font-size: 10pt;"&gt;When was the first version of .NET released?&lt;/span&gt;&lt;/strong&gt;&lt;strong&gt;&lt;span style="font-size: 10pt;"&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/strong&gt;&lt;span style="font-size: 10pt;"&gt;The final version of the 1.0 SDK and runtime was made publicly available around 6pm PST on 15-Jan-2002. At the same time, the final version of Visual Studio.NET was made available to MSDN subscribers.&lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/font&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="font-family: Arial;"&gt;&lt;font size="3"&gt; &lt;o:p&gt;&lt;/o:p&gt;&lt;/font&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="font-family: Arial;"&gt;&lt;font size="3"&gt;&lt;strong&gt;&lt;span style="font-size: 10pt;"&gt;What platforms does the .NET Framework run on?&lt;/span&gt;&lt;/strong&gt;&lt;span style="font-size: 10pt;"&gt;&lt;br /&gt;
The runtime supports Windows XP, Windows 2000, NT4 SP6a and Windows ME/98. Windows 95 is not supported. Some parts of the framework do not work on all platforms - for example, ASP.NET is only supported on Windows XP and Windows 2000. Windows 98/ME cannot be used for development.&lt;br /&gt;
IIS is not supported on Windows XP Home Edition, and so cannot be used to host ASP.NET. However, the ASP.NET Web Matrix &lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/font&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="font-family: Arial;"&gt;&lt;font size="3"&gt;&lt;span style="font-size: 10pt;"&gt;web server does run on XP Home.&lt;br /&gt;
The Mono project is attempting to implement the .NET framework on Linux.&lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/font&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="font-family: Arial;"&gt;&lt;font size="3"&gt; &lt;o:p&gt;&lt;/o:p&gt;&lt;/font&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="font-family: Arial;"&gt;&lt;font size="3"&gt;&lt;strong&gt;&lt;span style="font-size: 10pt;"&gt;What is the CLR?&lt;/span&gt;&lt;/strong&gt;&lt;strong&gt;&lt;span style="font-size: 10pt;"&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/strong&gt;&lt;span style="font-size: 10pt;"&gt;CLR = Common Language Runtime. The CLR is a set of standard resources that (in theory) any .NET program can take advantage of, regardless of programming language. Robert Schmidt (Microsoft) lists the following CLR resources in his MSDN PDC# article:&lt;br /&gt;
Object-oriented programming model (inheritance, polymorphism, exception handling, garbage collection) &lt;br /&gt;
&lt;em&gt; Security model &lt;/em&gt;&lt;em&gt;&lt;br /&gt;
&lt;em&gt; Type system &lt;/em&gt;&lt;br /&gt;
&lt;em&gt; All .NET base classes &lt;/em&gt;&lt;br /&gt;
&lt;em&gt; Many .NET framework classes &lt;/em&gt;&lt;br /&gt;
&lt;em&gt; Development, debugging, and profiling tools &lt;/em&gt;&lt;br /&gt;
&lt;em&gt; Execution and code management &lt;/em&gt;&lt;br /&gt;
&lt;em&gt; IL-to-native translators and optimizers &lt;/em&gt;&lt;/em&gt;&lt;br /&gt;
What this means is that in the .NET world, different programming languages will be more equal in capability than they have ever been before, although clearly not all languages will support all CLR services.&lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/font&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="font-family: Arial;"&gt;&lt;font size="3"&gt; &lt;o:p&gt;&lt;/o:p&gt;&lt;/font&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="font-family: Arial;"&gt;&lt;font size="3"&gt;&lt;strong&gt;&lt;span style="font-size: 10pt;"&gt;What is the CTS?&lt;/span&gt;&lt;/strong&gt;&lt;strong&gt;&lt;span style="font-size: 10pt;"&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/strong&gt;&lt;span style="font-size: 10pt;"&gt;CTS = Common Type System. This is the range of types that the .NET runtime understands, and therefore that .NET applications can use. However note that not all .NET languages will support all the types in the CTS. The CTS is a superset of the CLS.&lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/font&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="font-family: Arial;"&gt;&lt;font size="3"&gt; &lt;o:p&gt;&lt;/o:p&gt;&lt;/font&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="font-family: Arial;"&gt;&lt;font size="3"&gt;&lt;strong&gt;&lt;span style="font-size: 10pt;"&gt;What is the CLS?&lt;/span&gt;&lt;/strong&gt;&lt;strong&gt;&lt;span style="font-size: 10pt;"&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/strong&gt;&lt;span style="font-size: 10pt;"&gt;CLS = Common Language Specification. This is a subset of the CTS which all .NET languages are expected to support. The idea is that any program which uses CLS-compliant types can interoperate with any .NET program written in any language.&lt;br /&gt;
In theory this allows very tight interop between different .NET languages - for example allowing a C# class to inherit from a VB class.&lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/font&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="font-family: Arial;"&gt;&lt;font size="3"&gt; &lt;o:p&gt;&lt;/o:p&gt;&lt;/font&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="font-family: Arial;"&gt;&lt;font size="3"&gt;&lt;strong&gt;&lt;span style="font-size: 10pt;"&gt;What is IL?&lt;/span&gt;&lt;/strong&gt;&lt;strong&gt;&lt;span style="font-size: 10pt;"&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/strong&gt;&lt;span style="font-size: 10pt;"&gt;IL = Intermediate Language. Also known as MSIL (Microsoft Intermediate Language) or CIL (Common Intermediate Language). All .NET source code (of any language) is compiled to IL. The 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.&lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/font&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="font-family: Arial;"&gt;&lt;font size="3"&gt; &lt;o:p&gt;&lt;/o:p&gt;&lt;/font&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="font-family: Arial;"&gt;&lt;font size="3"&gt;&lt;strong&gt;&lt;span style="font-size: 10pt;"&gt;What does 'managed' mean in the .NET context?&lt;/span&gt;&lt;/strong&gt;&lt;strong&gt;&lt;span style="font-size: 10pt;"&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/strong&gt;&lt;span style="font-size: 10pt;"&gt;The term 'managed' is the cause of much confusion. It is used in various places within .NET, meaning slightly different things.Managed code: The .NET framework provides several core run-time services to the programs that run within it - for example &lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/font&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="font-family: Arial;"&gt;&lt;font size="3"&gt;&lt;span style="font-size: 10pt;"&gt;exception handling and security. For these services to work, the code must provide a minimum level of information to the runtime. &lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/font&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="font-family: Arial;"&gt;&lt;font size="3"&gt;&lt;span style="font-size: 10pt;"&gt;Such code is called managed code. All C# and Visual Basic.NET code is managed by default. VS7 C++ code is not managed by default, but the compiler can produce managed code by specifying a command-line switch (/com+).&lt;br /&gt;
&lt;em&gt;Managed data&lt;/em&gt;: This is data that is allocated and de-allocated by the .NET runtime's garbage collector. C# and VB.NET data is always managed. VS7 C++ data is unmanaged by default, even when using the /com+ switch, but it can be marked as managed using the __gc keyword.Managed classes: This is usually referred to in the context of Managed Extensions (ME) for C++. When using ME C++, a class can be marked with the __gc keyword. As the name suggests, this means that the memory for instances of the class is managed by the garbage collector, but it also means more than that. The class becomes a fully paid-up member of the .NET community with the benefits and restrictions that brings. An example of a benefit is proper interop with classes written in other languages - for example, a managed C++ class can inherit from a VB class. An example of a restriction is that a managed class can only inherit from one base class.&lt;/span&gt;&lt;/font&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="font-family: Arial;"&gt;&lt;font size="3"&gt; &lt;o:p&gt;&lt;/o:p&gt;&lt;/font&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="font-family: Arial;"&gt;&lt;font size="3"&gt;&lt;strong&gt;&lt;span style="font-size: 10pt;"&gt;What is reflection?&lt;/span&gt;&lt;/strong&gt;&lt;strong&gt;&lt;span style="font-size: 10pt;"&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/strong&gt;&lt;span style="font-size: 10pt;"&gt;All .NET compilers produce metadata about the types defined in the modules they produce. This metadata is packaged along with the module (modules in turn are packaged together in assemblies), and can be accessed by a mechanism called reflection. The System.Reflection namespace contains classes that can be used to interrogate the types for a module/assembly. &lt;br /&gt;
Using reflection to access .NET metadata is very similar to using ITypeLib/ITypeInfo to access type library data in COM, and it is used for similar purposes - e.g. determining data type sizes for marshaling data across context/process/machine boundaries.&lt;br /&gt;
Reflection can also be used to dynamically invoke methods (see System.Type.InvokeMember ) ,  or even create types dynamically at run-time (see System.Reflection.Emit.TypeBuilder). &lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/font&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="font-family: Arial;"&gt;&lt;font size="3"&gt; &lt;o:p&gt;&lt;/o:p&gt;&lt;/font&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="font-family: Arial;"&gt;&lt;font size="3"&gt;&lt;strong&gt;&lt;span style="font-size: 10pt;"&gt;What is the difference between Finalize and Dispose (Garbage collection) ?&lt;/span&gt;&lt;/strong&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/font&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="font-family: Arial;"&gt;&lt;font size="3"&gt;&lt;span style="font-size: 10pt;"&gt;Class instances often encapsulate control over resources that are not managed by the runtime, such as window handles (HWND), database connections, and so on. Therefore, you should provide both an explicit and an implicit way to free those resources. Provide implicit control by implementing the protected Finalize Method on an object (destructor syntax in C# and the Managed Extensions for C++). The garbage collector calls this method at some point after there are no longer any valid references to the object. In some cases, you might want to provide programmers using an object with the ability to explicitly release these external resources before the garbage collector frees the object. If an external resource is scarce or expensive, better performance can be achieved if the programmer explicitly releases resources when they are no longer being used. To provide explicit control, implement the Dispose method provided by the IDisposable Interface. The consumer of the object should call this method when it is done using the object. &lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/font&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="font-family: Arial;"&gt;&lt;font size="3"&gt;&lt;span style="font-size: 10pt;"&gt;Dispose can be called even if other references to the object are alive. Note that even when you provide explicit control by way of Dispose, you should provide implicit cleanup using the Finalize method. Finalize provides a backup to prevent resources from &lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/font&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="font-family: Arial;"&gt;&lt;font size="3"&gt;&lt;span style="font-size: 10pt;"&gt;permanently leaking if the programmer fails to call Dispose.&lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/font&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="font-family: Arial;"&gt;&lt;font size="3"&gt; &lt;o:p&gt;&lt;/o:p&gt;&lt;/font&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="font-family: Arial;"&gt;&lt;font size="3"&gt;&lt;strong&gt;&lt;span style="font-size: 10pt;"&gt;What is Partial Assembly References?&lt;/span&gt;&lt;/strong&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/font&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="font-family: Arial;"&gt;&lt;font size="3"&gt;&lt;strong&gt;&lt;span style="font-size: 10pt;"&gt;Full Assembly reference:&lt;/span&gt;&lt;/strong&gt;&lt;span style="font-size: 10pt;"&gt; A full assembly reference includes the assembly's text name, version, culture, and public key token (if the assembly has a strong name). A full assembly reference is required if you reference any assembly that is part of the common &lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/font&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="font-family: Arial;"&gt;&lt;font size="3"&gt;&lt;span style="font-size: 10pt;"&gt;language runtime or any assembly located in the global assembly cache.&lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/font&gt;&lt;/p&gt;
&lt;p style="margin: 0in 0in 0.0001pt; font-family: Arial;"&gt;&lt;font size="3"&gt; &lt;o:p&gt;&lt;/o:p&gt;&lt;/font&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="font-family: Arial;"&gt;&lt;font size="3"&gt;&lt;strong&gt;&lt;span style="font-size: 10pt;"&gt;Partial Assembly reference:&lt;/span&gt;&lt;/strong&gt;&lt;span style="font-size: 10pt;"&gt; We can dynamically reference an assembly by providing only partial information, such as specifying only the assembly name. When you specify a partial assembly reference, the runtime looks for the assembly only in the application &lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/font&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="font-family: Arial;"&gt;&lt;font size="3"&gt;&lt;span style="font-size: 10pt;"&gt;directory.&lt;br /&gt;
We can make partial references to an assembly in your code one of the following ways:&lt;br /&gt;
-&amp;gt; Use a method such as System.Reflection.&lt;strong&gt;Assembly.Load&lt;/strong&gt; and specify only a partial reference. The runtime checks for the assembly in the application directory.&lt;br /&gt;
-&amp;gt; Use the System.Reflection.&lt;strong&gt;Assembly.LoadWithPartialName&lt;/strong&gt; method and specify only a partial reference. The runtime checks for the assembly in the application directory and in the global assembly cache&lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/font&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="font-family: Arial;"&gt;&lt;font size="3"&gt; &lt;o:p&gt;&lt;/o:p&gt;&lt;/font&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="font-family: Arial;"&gt;&lt;font size="3"&gt;&lt;strong&gt;&lt;span style="font-size: 10pt;"&gt;Changes to which portion of version number indicates an incompatible change?&lt;/span&gt;&lt;/strong&gt;&lt;strong&gt;&lt;span style="font-size: 10pt;"&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/strong&gt;&lt;span style="font-size: 10pt;"&gt;Major or minor. Changes to the major or minor portion of the version number indicate an incompatible change. Under this convention then, version 2.0.0.0 would be considered incompatible with version 1.0.0.0. Examples of an incompatible change would be a change to the types of some method parameters or the removal of a type or method altogether. Build. The Build number is typically used to distinguish between daily builds or smaller compatible releases. Revision. Changes to the revision number are typically reserved for an incremental build needed to fix a particular bug. You'll sometimes hear this referred to as the "emergency bug fix" number in that the revision is what is often changed when a fix to a specific bug is &lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/font&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="font-family: Arial;"&gt;&lt;font size="3"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/font&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="font-family: Arial;"&gt;&lt;font size="3"&gt;&lt;strong&gt;&lt;span style="font-size: 10pt;"&gt;What is side-by-side execution? Can two application one using private assembly and other using Shared assembly be stated as a side-by-side executables?&lt;/span&gt;&lt;/strong&gt;&lt;strong&gt;&lt;span style="font-size: 10pt;"&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/strong&gt;&lt;span style="font-size: 10pt;"&gt;Side-by-side execution is the ability to run multiple versions of an application or component on the same computer. You can have multiple versions of the common language runtime, and multiple versions of applications and components that use a version of the runtime, on the same computer at the same time. Since versioning is only applied to shared assemblies, and not to private assemblies, two application one using private assembly and one using shared assembly cannot be stated as side-by-side &lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/font&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="font-family: Arial;"&gt;&lt;font size="3"&gt;&lt;span style="font-size: 10pt;"&gt;executables.&lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/font&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="font-family: Arial;"&gt;&lt;font size="3"&gt; &lt;o:p&gt;&lt;/o:p&gt;&lt;/font&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="font-family: Arial;"&gt;&lt;font size="3"&gt;&lt;strong&gt;&lt;span style="font-size: 10pt;"&gt;Why string are called Immutable data Type ?&lt;/span&gt;&lt;/strong&gt;&lt;strong&gt;&lt;span style="font-size: 10pt;"&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/strong&gt;&lt;span style="font-size: 10pt;"&gt;The memory representation of string is an Array of Characters, So on re-assigning the new array of Char is formed &amp;amp; the start address is changed . Thus keeping the Old string in Memory for Garbage Collector to be disposed.&lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/font&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="font-family: Arial;"&gt;&lt;font size="3"&gt; &lt;o:p&gt;&lt;/o:p&gt;&lt;/font&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="font-family: Arial;"&gt;&lt;font size="3"&gt;&lt;strong&gt;&lt;span style="font-size: 10pt;"&gt;What does assert() method do?&lt;/span&gt;&lt;/strong&gt;&lt;span style="font-size: 10pt;"&gt;&lt;br /&gt;
In debug compilation, assert takes in a Boolean condition as a parameter, and shows the error dialog if the condition is false. The program proceeds without any interruption if the condition is true.&lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/font&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="font-family: Arial;"&gt;&lt;font size="3"&gt; &lt;o:p&gt;&lt;/o:p&gt;&lt;/font&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="font-family: Arial;"&gt;&lt;font size="3"&gt;&lt;strong&gt;&lt;span style="font-size: 10pt;"&gt;What's the difference between the Debug class and Trace class?&lt;/span&gt;&lt;/strong&gt;&lt;strong&gt;&lt;span style="font-size: 10pt;"&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/strong&gt;&lt;span style="font-size: 10pt;"&gt;Documentation looks the same.  Use Debug class for debug builds, use Trace class for both debug and release builds.&lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/font&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="font-family: Arial;"&gt;&lt;font size="3"&gt; &lt;o:p&gt;&lt;/o:p&gt;&lt;/font&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="font-family: Arial;"&gt;&lt;font size="3"&gt;&lt;strong&gt;&lt;span style="font-size: 10pt;"&gt;Why are there five tracing levels in System.Diagnostics.TraceSwitcher?&lt;/span&gt;&lt;/strong&gt;&lt;span style="font-size: 10pt;"&gt;&lt;br /&gt;
The tracing dumps can be quite verbose.  For applications that are constantly running you run the risk of overloading the machine and the hard drive.  Five levels range from None to Verbose, allowing you to fine-tune the tracing activities.&lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/font&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="font-family: Arial;"&gt;&lt;font size="3"&gt; &lt;o:p&gt;&lt;/o:p&gt;&lt;/font&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="font-family: Arial;"&gt;&lt;font size="3"&gt;&lt;strong&gt;&lt;span style="font-size: 10pt;"&gt;Where is the output of TextWriterTraceListener redirected?&lt;/span&gt;&lt;/strong&gt;&lt;strong&gt;&lt;span style="font-size: 10pt;"&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/strong&gt;&lt;span style="font-size: 10pt;"&gt;To the Console or a text file depending on the parameter passed to the constructor.&lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/font&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="font-family: Arial;"&gt;&lt;font size="3"&gt; &lt;o:p&gt;&lt;/o:p&gt;&lt;/font&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="font-family: Arial;"&gt;&lt;font size="3"&gt;&lt;strong&gt;&lt;span style="font-size: 10pt;"&gt;How do assemblies find each other?&lt;/span&gt;&lt;/strong&gt;&lt;span style="font-size: 10pt;"&gt;&lt;br /&gt;
By searching directory paths. There are several factors which can affect the path (such as the AppDomain host, and application configuration files), but for private assemblies the search path is normally the application's directory and its sub-directories. For shared assemblies, the search path is normally same as the private assembly path plus the shared assembly cache.&lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/font&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="font-family: Arial;"&gt;&lt;font size="3"&gt; &lt;o:p&gt;&lt;/o:p&gt;&lt;/font&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="font-family: Arial;"&gt;&lt;font size="3"&gt;&lt;strong&gt;&lt;span style="font-size: 10pt;"&gt;How does assembly versioning work?&lt;/span&gt;&lt;/strong&gt;&lt;strong&gt;&lt;span style="font-size: 10pt;"&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/strong&gt;&lt;span style="font-size: 10pt;"&gt;Each assembly has a version number called the compatibility version. Also each reference to an assembly (from another assembly) includes both the name and version of the referenced assembly.The version number has four numeric parts (e.g. 5.5.2.33). Assemblies with either of the first two parts different are normally viewed as incompatible. If the first two parts are the same, but the third is different, the assemblies are deemed as 'maybe compatible'. If only the fourth part is different, the assemblies are deemed compatible. However, this is just the default guideline - it is the version policy that decides to what extent these rules are enforced. The version policy can be specified via the application configuration file.&lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/font&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="font-family: Arial;"&gt;&lt;font size="3"&gt; &lt;o:p&gt;&lt;/o:p&gt;&lt;/font&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="font-family: Arial;"&gt;&lt;font size="3"&gt;&lt;strong&gt;&lt;span style="font-size: 10pt;"&gt;What is an Application Domain?&lt;/span&gt;&lt;/strong&gt;&lt;span style="font-size: 10pt;"&gt;&lt;br /&gt;
An AppDomain can be thought of as a lightweight process. Multiple AppDomains can exist inside a Win32 process. The primary purpose of the AppDomain is to isolate an application from other applications. Win32 processes provide isolation by having distinct memory address spaces. This is effective, but it is expensive and doesn't scale well. The .NET runtime enforces AppDomain isolation by keeping control over the use of memory - all memory in the AppDomain is managed by the .NET runtime, so the runtime can ensure that AppDomains do not access each other's memory.&lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/font&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="font-family: Arial;"&gt;&lt;font size="3"&gt; &lt;o:p&gt;&lt;/o:p&gt;&lt;/font&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="font-family: Arial;"&gt;&lt;font size="3"&gt;&lt;strong&gt;&lt;span style="font-size: 10pt;"&gt;What is garbage collection?&lt;/span&gt;&lt;/strong&gt;&lt;span style="font-size: 10pt;"&gt;&lt;br /&gt;
Garbage collection is a system whereby a run-time component takes responsibility for managing the lifetime of objects and the heap memory that they occupy. This concept is not new to .NET - Java and many other languages/runtimes have used garbage collection for some time.&lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/font&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="font-family: Arial;"&gt;&lt;font size="3"&gt; &lt;o:p&gt;&lt;/o:p&gt;&lt;/font&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="font-family: Arial;"&gt;&lt;font size="3"&gt;&lt;strong&gt;&lt;span style="font-size: 10pt;"&gt;Why doesn't the .NET runtime offer deterministic destruction?&lt;/span&gt;&lt;/strong&gt;&lt;strong&gt;&lt;span style="font-size: 10pt;"&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/strong&gt;&lt;span style="font-size: 10pt;"&gt;Because of the garbage collection algorithm. The .NET garbage collector works by periodically running through a list of all the objects that are currently being referenced by an application. All the objects that it doesn't find during this search are ready to be destroyed and the memory reclaimed. The implication of this algorithm is that the runtime doesn't get notified immediately when the final reference on an object goes away - it only finds out during the next sweep of the heap.&lt;br /&gt;
Futhermore, this type of algorithm works best by performing the garbage collection sweep as rarely as possible. Normally heap exhaustion is the trigger for a collection sweep.&lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/font&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="font-family: Arial;"&gt;&lt;font size="3"&gt; &lt;o:p&gt;&lt;/o:p&gt;&lt;/font&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="font-family: Arial;"&gt;&lt;font size="3"&gt;&lt;strong&gt;&lt;span style="font-size: 10pt;"&gt;Is the lack of deterministic destruction in .NET a problem?&lt;/span&gt;&lt;/strong&gt;&lt;strong&gt;&lt;span style="font-size: 10pt;"&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/strong&gt;&lt;span style="font-size: 10pt;"&gt;It's certainly an issue that affects component design. If you have objects that maintain expensive or scarce resources (e.g. database locks), you need to provide some way for the client to tell the object to release the resource when it is done. Microsoft recommend that you provide a method called Dispose() for this purpose. However, this causes problems for distributed objects - in a distributed system who calls the Dispose() method? Some form of reference-counting or ownership-management mechanism is needed to handle distributed objects - unfortunately the runtime offers no help with this. &lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/font&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="font-family: Arial;"&gt;&lt;font size="3"&gt; &lt;o:p&gt;&lt;/o:p&gt;&lt;/font&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="font-family: Arial;"&gt;&lt;font size="3"&gt;&lt;strong&gt;&lt;span style="font-size: 10pt;"&gt;What is serialization?&lt;/span&gt;&lt;/strong&gt;&lt;strong&gt;&lt;span style="font-size: 10pt;"&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/strong&gt;&lt;span style="font-size: 10pt;"&gt;Serialization is the process of converting an object into a stream of bytes. Deserialization is the opposite process of creating an object from a stream of bytes. Serialization / Deserialization is mostly used to transport objects (e.g. during remoting), or to persist &lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/font&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="font-family: Arial;"&gt;&lt;font size="3"&gt;&lt;span style="font-size: 10pt;"&gt;objects (e.g. to a file or database).&lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/font&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="font-family: Arial;"&gt;&lt;font size="3"&gt; &lt;o:p&gt;&lt;/o:p&gt;&lt;/font&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="font-family: Arial;"&gt;&lt;font size="3"&gt;&lt;strong&gt;&lt;span style="font-size: 10pt;"&gt;Does the .NET Framework have in-built support for serialization?&lt;/span&gt;&lt;/strong&gt;&lt;strong&gt;&lt;span style="font-size: 10pt;"&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/strong&gt;&lt;span style="font-size: 10pt;"&gt;There are two separate mechanisms provided by the .NET class library - XmlSerializer and SoapFormatter/BinaryFormatter. Microsoft uses XmlSerializer for Web Services, and uses SoapFormatter/BinaryFormatter for remoting. Both are available for use in your own code.&lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/font&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="font-family: Arial;"&gt;&lt;font size="3"&gt; &lt;o:p&gt;&lt;/o:p&gt;&lt;/font&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="font-family: Arial;"&gt;&lt;font size="3"&gt;&lt;strong&gt;&lt;span style="font-size: 10pt;"&gt;Can I customise the serialization process?&lt;/span&gt;&lt;/strong&gt;&lt;strong&gt;&lt;span style="font-size: 10pt;"&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/strong&gt;&lt;span style="font-size: 10pt;"&gt;Yes. XmlSerializer supports a range of attributes that can be used to configure serialization for a particular class. For example, a field or property can be marked with the [XmlIgnore] attribute to exclude it from serialization. Another example is the [XmlElement] &lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/font&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="font-family: Arial;"&gt;&lt;font size="3"&gt;&lt;span style="font-size: 10pt;"&gt;attribute, which can be used to specify the XML element name to be used for a particular property or field.&lt;br /&gt;
Serialization via SoapFormatter/BinaryFormatter can also be controlled to some extent by attributes. For example, the [NonSerialized] attribute is the equivalent of XmlSerializer's [XmlIgnore] attribute. Ultimate control of the serialization process can be acheived by implementing the the ISerializable interface on the class whose instances are to be serialized.&lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/font&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="font-family: Arial;"&gt;&lt;font size="3"&gt; &lt;o:p&gt;&lt;/o:p&gt;&lt;/font&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="font-family: Arial;"&gt;&lt;font size="3"&gt;&lt;strong&gt;&lt;span style="font-size: 10pt;"&gt;Why is XmlSerializer so slow?&lt;/span&gt;&lt;/strong&gt;&lt;strong&gt;&lt;span style="font-size: 10pt;"&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/strong&gt;&lt;span style="font-size: 10pt;"&gt;There is a once-per-process-per-type overhead with XmlSerializer. So the first time you serialize or deserialize an object of a given type in an application, there is a significant delay. This normally doesn't matter, but it may mean, for example, that XmlSerializer is a poor choice for loading configuration settings during startup of a GUI application.&lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/font&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="font-family: Arial;"&gt;&lt;font size="3"&gt; &lt;o:p&gt;&lt;/o:p&gt;&lt;/font&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="font-family: Arial;"&gt;&lt;font size="3"&gt;&lt;strong&gt;&lt;span style="font-size: 10pt;"&gt;Why do I get errors when I try to serialize a Hashtable?&lt;/span&gt;&lt;/strong&gt;&lt;strong&gt;&lt;span style="font-size: 10pt;"&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/strong&gt;&lt;span style="font-size: 10pt;"&gt;XmlSerializer will refuse to serialize instances of any class that implements IDictionary, e.g. Hashtable. SoapFormatter and BinaryFormatter do not have this restriction. &lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/font&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="font-family: Arial;"&gt;&lt;font size="3"&gt; &lt;o:p&gt;&lt;/o:p&gt;&lt;/font&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="font-family: Arial;"&gt;&lt;font size="3"&gt;&lt;strong&gt;&lt;span style="font-size: 10pt;"&gt;What are attributes?&lt;/span&gt;&lt;/strong&gt;&lt;strong&gt;&lt;span style="font-size: 10pt;"&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/strong&gt;&lt;span style="font-size: 10pt;"&gt;There are at least two types of .NET attribute. The first type I will refer to as a metadata attribute - it allows some data to be attached to a class or method. This data becomes part of the metadata for the class, and (like other class metadata) can be accessed via reflection. &lt;br /&gt;
The other type of attribute is a context attribute. Context attributes use a similar syntax to metadata attributes but they are fundamentally different. Context attributes provide an interception mechanism whereby instance activation and method calls can be &lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/font&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="font-family: Arial;"&gt;&lt;font size="3"&gt;&lt;span style="font-size: 10pt;"&gt;pre- and/or post-processed. &lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/font&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="font-family: Arial;"&gt;&lt;font size="3"&gt; &lt;o:p&gt;&lt;/o:p&gt;&lt;/font&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="font-family: Arial;"&gt;&lt;font size="3"&gt;&lt;strong&gt;&lt;span style="font-size: 10pt;"&gt;How does CAS work?&lt;/span&gt;&lt;/strong&gt;&lt;strong&gt;&lt;span style="font-size: 10pt;"&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/strong&gt;&lt;span style="font-size: 10pt;"&gt;The CAS security policy revolves around two key concepts - code groups and permissions. Each .NET assembly is a member of a particular code group, and each code group is granted the permissions specified in a named permission set.&lt;br /&gt;
For example, using the default security policy, a control downloaded from a web site belongs to the 'Zone - Internet' code group, which adheres to the permissions defined by the 'Internet' named permission set. (Naturally the 'Internet' named permission set represents a very restrictive range of permissions.) &lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/font&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="font-family: Arial;"&gt;&lt;font size="3"&gt; &lt;o:p&gt;&lt;/o:p&gt;&lt;/font&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="font-family: Arial;"&gt;&lt;font size="3"&gt;&lt;strong&gt;&lt;span style="font-size: 10pt;"&gt;Who defines the CAS code groups?&lt;/span&gt;&lt;/strong&gt;&lt;strong&gt;&lt;span style="font-size: 10pt;"&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/strong&gt;&lt;span style="font-size: 10pt;"&gt;Microsoft defines some default ones, but you can modify these and even create your own. To see the code groups defined on your system, run 'caspol -lg' from the command-line. On my system it looks like this:&lt;br /&gt;
Level = Machine&lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/font&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="font-family: Arial;"&gt;&lt;font size="3"&gt;&lt;span style="font-size: 10pt;"&gt;Code Groups:&lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/font&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="font-family: Arial;"&gt;&lt;font size="3"&gt;&lt;span style="font-size: 10pt;"&gt;1.  All code: Nothing&lt;br /&gt;
   1.1.  Zone - MyComputer: FullTrust&lt;br /&gt;
      1.1.1.  Honor SkipVerification requests: SkipVerification&lt;br /&gt;
   1.2.  Zone - Intranet: LocalIntranet&lt;br /&gt;
   1.3.  Zone - Internet: Internet&lt;br /&gt;
   1.4.  Zone - Untrusted: Nothing&lt;br /&gt;
   1.5.  Zone - Trusted: Internet&lt;br /&gt;
   1.6.  StrongName - 0024000004800000940000000602000000240000525341310004000003&lt;br /&gt;
000000CFCB3291AA715FE99D40D49040336F9056D7886FED46775BC7BB5430BA4444FEF8348EBD06&lt;br /&gt;
F962F39776AE4DC3B7B04A7FE6F49F25F740423EBF2C0B89698D8D08AC48D69CED0FC8F83B465E08&lt;br /&gt;
07AC11EC1DCC7D054E807A43336DDE408A5393A48556123272CEEEE72F1660B71927D38561AABF5C&lt;br /&gt;
AC1DF1734633C602F8F2D5: &lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/font&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="font-family: Arial;"&gt;&lt;font size="3"&gt;&lt;span style="font-size: 10pt;"&gt;Note the hierarchy of code groups - the top of the hierarchy is the most general ('All code'), which is then sub-divided into several &lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/font&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="font-family: Arial;"&gt;&lt;font size="3"&gt;&lt;span style="font-size: 10pt;"&gt;groups, each of which in turn can be sub-divided. Also note that (somewhat counter-intuitively) a sub-group can be associated with a more permissive permission set than its parent.&lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/font&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="font-family: Arial;"&gt;&lt;font size="3"&gt; &lt;o:p&gt;&lt;/o:p&gt;&lt;/font&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="font-family: Arial;"&gt;&lt;font size="3"&gt;&lt;strong&gt;&lt;span style="font-size: 10pt;"&gt;How do I define my own code group?&lt;/span&gt;&lt;/strong&gt;&lt;strong&gt;&lt;span style="font-size: 10pt;"&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/strong&gt;&lt;span style="font-size: 10pt;"&gt;Use caspol. For example, suppose you trust code from &lt;a href="http://www.mydomain.com/" target="_top"&gt;www.mydomain.com&lt;/a&gt; and you want it have full access to your system, but you want to keep the default restrictions for all other internet sites. To achieve this, you would add a new code group as a sub-group of the  &lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/font&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="font-family: Arial;"&gt;&lt;font size="3"&gt;&lt;span style="font-size: 10pt;"&gt;'Zone - Internet' group, like this: &lt;br /&gt;
caspol -ag 1.3 -site &lt;a href="http://www.mydomain.com/" target="_top"&gt;www.mydomain.com&lt;/a&gt; FullTrust &lt;br /&gt;
Now if you run caspol -lg you will see that the new group has been added as group 1.3.1:&lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/font&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="font-family: Arial;"&gt;&lt;font size="3"&gt; &lt;o:p&gt;&lt;/o:p&gt;&lt;/font&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="font-family: Arial;"&gt;&lt;font size="3"&gt;&lt;span style="font-size: 10pt;"&gt;   1.3.  Zone - Internet: Internet&lt;br /&gt;
      1.3.1.  Site - &lt;a href="http://www.mydomain.com/" target="_top"&gt;www.mydomain.com&lt;/a&gt;: FullTrust&lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/font&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="font-family: Arial;"&gt;&lt;font size="3"&gt; &lt;o:p&gt;&lt;/o:p&gt;&lt;/font&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="font-family: Arial;"&gt;&lt;font size="3"&gt;&lt;span style="font-size: 10pt;"&gt;Note that the numeric label (1.3.1) is just a caspol invention to make the code groups easy to manipulate from the command-line. The underlying runtime never sees it. &lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/font&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="font-family: Arial;"&gt;&lt;font size="3"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/font&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="font-family: Arial;"&gt;&lt;font size="3"&gt;&lt;strong&gt;&lt;span style="font-size: 10pt;"&gt;How do I change the permission set for a code group?&lt;/span&gt;&lt;/strong&gt;&lt;strong&gt;&lt;span style="font-size: 10pt;"&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/strong&gt;&lt;span style="font-size: 10pt;"&gt;Use caspol. If you are the machine administrator, you can operate at the 'machine' level - which means not only that the changes you make become the default for the machine, but also that users cannot change the permissions to be more permissive. If you are a normal (non-admin) user you can still modify the permissions, but only to make them more restrictive. For example, to allow intranet code to do what it likes you might do this: &lt;br /&gt;
caspol -cg 1.2 FullTrust&lt;br /&gt;
Note that because this is more permissive than the default policy (on a standard system), you should only do this at the machine level - doing it at the user level will have no effect.&lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/font&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="font-family: Arial;"&gt;&lt;font size="3"&gt; &lt;o:p&gt;&lt;/o:p&gt;&lt;/font&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="font-family: Arial;"&gt;&lt;font size="3"&gt;&lt;strong&gt;&lt;span style="font-size: 10pt;"&gt;I can't be bothered with all this CAS stuff. Can I turn it off?&lt;/span&gt;&lt;/strong&gt;&lt;strong&gt;&lt;span style="font-size: 10pt;"&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/strong&gt;&lt;span style="font-size: 10pt;"&gt;Yes, as long as you are an administrator. Just run: caspol -s off&lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/font&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="font-family: Arial;"&gt;&lt;font size="3"&gt; &lt;o:p&gt;&lt;/o:p&gt;&lt;/font&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="font-family: Arial;"&gt;&lt;font size="3"&gt;&lt;strong&gt;&lt;span style="font-size: 10pt;"&gt;Can I look at the IL for an assembly?&lt;/span&gt;&lt;/strong&gt;&lt;span style="font-size: 10pt;"&gt;&lt;br /&gt;
Yes. MS supply a tool called Ildasm which can be used to view the metadata and IL for an assembly.&lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/font&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="font-family: Arial;"&gt;&lt;font size="3"&gt; &lt;o:p&gt;&lt;/o:p&gt;&lt;/font&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="font-family: Arial;"&gt;&lt;font size="3"&gt;&lt;strong&gt;&lt;span style="font-size: 10pt;"&gt;Can source code be reverse-engineered from IL?&lt;/span&gt;&lt;/strong&gt;&lt;strong&gt;&lt;span style="font-size: 10pt;"&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/strong&gt;&lt;span style="font-size: 10pt;"&gt;Yes, it is often relatively straightforward to regenerate high-level source (e.g. C#) from IL.&lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/font&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="font-family: Arial;"&gt;&lt;font size="3"&gt; &lt;o:p&gt;&lt;/o:p&gt;&lt;/font&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="font-family: Arial;"&gt;&lt;font size="3"&gt;&lt;strong&gt;&lt;span style="font-size: 10pt;"&gt;How can I stop my code being reverse-engineered from IL?&lt;/span&gt;&lt;/strong&gt;&lt;span style="font-size: 10pt;"&gt;&lt;br /&gt;
There is currently no simple way to stop code being reverse-engineered from IL. In future it is likely that IL obfuscation tools will become available, either from MS or from third parties. These tools work by 'optimising' the IL in such a way that reverse-engineering becomes much more difficult.&lt;br /&gt;
Of course if you are writing web services then reverse-engineering is not a problem as clients do not have access to your IL.&lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/font&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="font-family: Arial;"&gt;&lt;font size="3"&gt; &lt;o:p&gt;&lt;/o:p&gt;&lt;/font&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="font-family: Arial;"&gt;&lt;font size="3"&gt;&lt;strong&gt;&lt;span style="font-size: 10pt;"&gt;Is there built-in support for tracing/logging?&lt;/span&gt;&lt;/strong&gt;&lt;span style="font-size: 10pt;"&gt;&lt;br /&gt;
Yes, in the System.Diagnostics namespace. There are two main classes that deal with tracing - Debug and Trace. They both work in a similar way - the difference is that tracing from the Debug class only works in builds that have the DEBUG symbol defined, whereas tracing from the Trace class only works in builds that have the TRACE symbol defined. Typically this means that you should use System.Diagnostics.Trace.WriteLine for tracing that you want to work in debug and release builds, and System.Diagnostics.Debug.WriteLine for tracing that you want to work only in debug builds.&lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/font&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="font-family: Arial;"&gt;&lt;font size="3"&gt; &lt;o:p&gt;&lt;/o:p&gt;&lt;/font&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="font-family: Arial;"&gt;&lt;font size="3"&gt;&lt;strong&gt;&lt;span style="font-size: 10pt;"&gt;Can I redirect tracing to a file?&lt;/span&gt;&lt;/strong&gt;&lt;strong&gt;&lt;span style="font-size: 10pt;"&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/strong&gt;&lt;span style="font-size: 10pt;"&gt;Yes. The Debug and Trace classes both have a Listeners property, which is a collection of sinks that receive the tracing that you send via Debug.WriteLine and Trace.WriteLine respectively. By default the Listeners collection contains a single sink, which is an &lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/font&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="font-family: Arial;"&gt;&lt;font size="3"&gt;&lt;span style="font-size: 10pt;"&gt;instance of the DefaultTraceListener class. This sends output to the Win32 OutputDebugString() function and also the System.Diagnostics.Debugger.Log() method. This is useful when debugging, but if you're trying to trace a problem at a customer site, redirecting the output to a file is more appropriate. Fortunately, the TextWriterTraceListener class is provided for this purpose.&lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/font&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="font-family: Arial;"&gt;&lt;font size="3"&gt; &lt;o:p&gt;&lt;/o:p&gt;&lt;/font&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="font-family: Arial;"&gt;&lt;font size="3"&gt;&lt;strong&gt;&lt;span style="font-size: 10pt;"&gt;What are the contents of assembly?&lt;/span&gt;&lt;/strong&gt;&lt;strong&gt;&lt;span style="font-size: 10pt;"&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/strong&gt;&lt;span style="font-size: 10pt;"&gt;In general, a static assembly can consist of four elements: &lt;br /&gt;
 &lt;em&gt;The assembly manifest, which contains assembly metadata. &lt;/em&gt;&lt;em&gt;&lt;br /&gt;
&lt;em&gt; Type metadata. &lt;/em&gt;&lt;br /&gt;
&lt;em&gt; Microsoft intermediate language (MSIL) code that implements the types. &lt;/em&gt;&lt;br /&gt;
&lt;em&gt; A set of resources. &lt;/em&gt;&lt;/em&gt;&lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/font&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="font-family: Arial;"&gt;&lt;font size="3"&gt; &lt;o:p&gt;&lt;/o:p&gt;&lt;/font&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="font-family: Arial;"&gt;&lt;font size="3"&gt;&lt;strong&gt;&lt;span style="font-size: 10pt;"&gt;What is GC (Garbage Collection) and how it works&lt;/span&gt;&lt;/strong&gt;&lt;strong&gt;&lt;span style="font-size: 10pt;"&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/strong&gt;&lt;span style="font-size: 10pt;"&gt;One of the good features of the CLR is Garbage Collection, which runs in the background collecting unused object references, freeing us from having to ensure we always destroy them. In reality the time difference between you releasing the object instance and it being garbage collected is likely to be very small, since the GC is always running.&lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/font&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="font-family: Arial;"&gt;&lt;font size="3"&gt;&lt;span style="font-size: 10pt;"&gt;[The process of transitively tracing through all pointers to actively used objects in order to locate all objects that can be referenced, and then arranging to reuse any heap memory that was not found during this trace. The common language runtime garbage collector also compacts the memory that is in use to reduce the working space needed for the heap.]&lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/font&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="font-family: Arial;"&gt;&lt;font size="3"&gt; &lt;o:p&gt;&lt;/o:p&gt;&lt;/font&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="font-family: Arial;"&gt;&lt;font size="3"&gt;&lt;em&gt;&lt;span style="font-size: 10pt;"&gt;Heap:&lt;/span&gt;&lt;/em&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/font&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="font-family: Arial;"&gt;&lt;font size="3"&gt;&lt;span style="font-size: 10pt;"&gt;A portion of memory reserved for a program to use for the temporary storage of data structures whose existence or size cannot be determined until the program is running. &lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/font&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="font-family: Arial;"&gt;&lt;font size="3"&gt; &lt;o:p&gt;&lt;/o:p&gt;&lt;/font&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="font-family: Arial;"&gt;&lt;font size="3"&gt;&lt;strong&gt;&lt;span style="font-size: 10pt;"&gt;Differnce between Managed code and unmanaged code ?&lt;/span&gt;&lt;/strong&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/font&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="font-family: Arial;"&gt;&lt;font size="3"&gt;&lt;span style="font-size: 10pt;"&gt;Managed Code:&lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/font&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="font-family: Arial;"&gt;&lt;font size="3"&gt;&lt;span style="font-size: 10pt;"&gt;Code that runs under a "contract of cooperation" with the common language runtime. Managed code must supply the metadata necessary for the runtime to provide services such as memory management, cross-language integration, code access security, and &lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/font&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="font-family: Arial;"&gt;&lt;font size="3"&gt;&lt;span style="font-size: 10pt;"&gt;automatic lifetime control of objects. All code based on Microsoft intermediate language (MSIL) executes as managed code. &lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/font&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="font-family: Arial;"&gt;&lt;font size="3"&gt; &lt;o:p&gt;&lt;/o:p&gt;&lt;/font&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="font-family: Arial;"&gt;&lt;font size="3"&gt;&lt;span style="font-size: 10pt;"&gt;Un-Managed Code:&lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/font&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="font-family: Arial;"&gt;&lt;font size="3"&gt;&lt;span style="font-size: 10pt;"&gt;Code that is created without regard for the conventions and requirements of the common language runtime. Unmanaged code executes in the common language runtime environment with minimal services (for example, no garbage collection, limited debugging, and so on).&lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/font&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="font-family: Arial;"&gt;&lt;font size="3"&gt; &lt;o:p&gt;&lt;/o:p&gt;&lt;/font&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="font-family: Arial;"&gt;&lt;font size="3"&gt;&lt;strong&gt;&lt;span style="font-size: 10pt;"&gt;What is &lt;st1:place w:st="on"&gt;&lt;st1:city w:st="on"&gt;MSIL&lt;/st1:city&gt;, &lt;st1:state w:st="on"&gt;IL&lt;/st1:state&gt;&lt;/st1:place&gt;, CTS and, CLR ?&lt;/span&gt;&lt;/strong&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/font&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="font-family: Arial;"&gt;&lt;font size="3"&gt; &lt;o:p&gt;&lt;/o:p&gt;&lt;/font&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="font-family: Arial;"&gt;&lt;font size="3"&gt;&lt;span style="font-size: 10pt;"&gt;MSIL: (Microsoft intermediate language)&lt;br /&gt;
When compiling to managed code, the compiler translates your source code into Microsoft intermediate language (MSIL), which is a CPU-independent set of instructions that can be efficiently converted to native code. MSIL includes instructions for loading, storing, initializing, and calling methods on objects, as well as instructions for arithmetic and logical operations, control flow, direct memory access, exception handling, and other operations. Before code can be executed, MSIL must be converted to CPU-specific code, usually by a just-in-time (JIT) compiler. Because the common language runtime supplies one or more JIT compilers for each computer architecture it supports, the same set of MSIL can be JIT-compiled and executed on any supported architecture.&lt;br /&gt;
When a compiler produces MSIL, it also produces metadata. Metadata describes the types in your code, including the definition of &lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/font&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="font-family: Arial;"&gt;&lt;font size="3"&gt;&lt;span style="font-size: 10pt;"&gt;each type, the signatures of each type's members, the members that your code references, and other data that the runtime uses at &lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/font&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="font-family: Arial;"&gt;&lt;font size="3"&gt;&lt;span style="font-size: 10pt;"&gt;execution time. The MSIL and metadata are contained in a portable executable (PE) file that is based on and extends the published &lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/font&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="font-family: Arial;"&gt;&lt;font size="3"&gt;&lt;st1:place w:st="on"&gt;&lt;st1:city w:st="on"&gt;&lt;span style="font-size: 10pt;"&gt;Microsoft&lt;/span&gt;&lt;/st1:city&gt;&lt;span style="font-size: 10pt;"&gt; &lt;st1:state w:st="on"&gt;PE&lt;/st1:state&gt;&lt;/span&gt;&lt;/st1:place&gt;&lt;span style="font-size: 10pt;"&gt; and Common Object File Format (COFF) used historically for executable content. This file format, which accommodates &lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/font&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="font-family: Arial;"&gt;&lt;font size="3"&gt; &lt;o:p&gt;&lt;/o:p&gt;&lt;/font&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="font-family: Arial;"&gt;&lt;font size="3"&gt;&lt;span style="font-size: 10pt;"&gt;MSIL or native code as well as metadata, enables the operating system to recognize common language runtime images. The &lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/font&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="font-family: Arial;"&gt;&lt;font size="3"&gt;&lt;span style="font-size: 10pt;"&gt;presence of metadata in the file along with the MSIL enables your code to describe itself, which means that there is no need for type libraries or Interface Definition Language (IDL). The runtime locates and extracts the metadata from the file as needed during &lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/font&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="font-family: Arial;"&gt;&lt;font size="3"&gt;&lt;span style="font-size: 10pt;"&gt;execution.&lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/font&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="font-family: Arial;"&gt;&lt;font size="3"&gt;&lt;span style="font-size: 10pt;"&gt;&lt;br /&gt;
IL: (Intermediate Language)&lt;br /&gt;
A language used as the output of a number of compilers and as the input to a just-in-time (JIT) compiler. The common language &lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/font&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="font-family: Arial;"&gt;&lt;font size="3"&gt;&lt;span style="font-size: 10pt;"&gt;runtime includes a JIT compiler for converting MSIL to native code.&lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/font&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="font-family: Arial;"&gt;&lt;font size="3"&gt; &lt;o:p&gt;&lt;/o:p&gt;&lt;/font&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="font-family: Arial;"&gt;&lt;font size="3"&gt;&lt;span style="font-size: 10pt;"&gt;CTS: (Common Type System)&lt;br /&gt;
The specification that determines how the common language runtime defines, uses, and manages types&lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/font&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="font-family: Arial;"&gt;&lt;font size="3"&gt; &lt;o:p&gt;&lt;/o:p&gt;&lt;/font&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="font-family: Arial;"&gt;&lt;font size="3"&gt;&lt;span style="font-size: 10pt;"&gt;CLR: (Common Language Runtime)&lt;br /&gt;
The engine at the core of managed code execution. The runtime supplies managed code with services such as cross-language &lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/font&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="font-family: Arial;"&gt;&lt;font size="3"&gt;&lt;span style="font-size: 10pt;"&gt;integration, code access security, object lifetime management, and debugging and profiling support. &lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/font&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="font-family: Arial;"&gt;&lt;font size="3"&gt; &lt;o:p&gt;&lt;/o:p&gt;&lt;/font&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="font-family: Arial;"&gt;&lt;font size="3"&gt;&lt;strong&gt;&lt;span style="font-size: 10pt;"&gt;What is Reference type and value type ?&lt;/span&gt;&lt;/strong&gt;&lt;strong&gt;&lt;span style="font-size: 10pt;"&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/strong&gt;&lt;span style="font-size: 10pt;"&gt;Reference Type:&lt;br /&gt;
Reference types are allocated on the managed CLR heap, just like object types.&lt;br /&gt;
A data type that is stored as a reference to the value's location. The value of a reference type is the location of the sequence of bits &lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/font&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="font-family: Arial;"&gt;&lt;font size="3"&gt;&lt;span style="font-size: 10pt;"&gt;that represent the type's data. Reference types can be self-describing types, pointer types, or interface types&lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/font&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="font-family: Arial;"&gt;&lt;font size="3"&gt; &lt;o:p&gt;&lt;/o:p&gt;&lt;/font&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="font-family: Arial;"&gt;&lt;font size="3"&gt;&lt;span style="font-size: 10pt;"&gt;Value Type:&lt;br /&gt;
Value types are allocated on the stack just like primitive types in VBScript, VB6 and C/C++. Value types are not instantiated using new go out of scope when the function they are defined within returns.&lt;br /&gt;
Value types in the CLR are defined as types that derive from system.valueType.&lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/font&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="font-family: Arial;"&gt;&lt;font size="3"&gt; &lt;o:p&gt;&lt;/o:p&gt;&lt;/font&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="font-family: Arial;"&gt;&lt;font size="3"&gt;&lt;span style="font-size: 10pt;"&gt;A data type that fully describes a value by specifying the sequence of bits that constitutes the value's representation. Type information for a value type instance is not stored with the instance at run time, but it is available in metadata. Value type instances can be treated as objects using boxing.&lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/font&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="font-family: Arial;"&gt;&lt;font size="3"&gt; &lt;o:p&gt;&lt;/o:p&gt;&lt;/font&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="font-family: Arial;"&gt;&lt;font size="3"&gt;&lt;strong&gt;&lt;span style="font-size: 10pt;"&gt;What is Boxing and unboxing ?&lt;/span&gt;&lt;/strong&gt;&lt;span style="font-size: 10pt;"&gt;&lt;br /&gt;
Boxing:&lt;br /&gt;
The conversion of a value type instance to an object, which implies that the instance will carry full type information at run time and will be allocated in the heap. The Microsoft intermediate language (MSIL) instruction set's box instruction converts a value type to an object by making a copy of the value type and embedding it in a newly allocated object.&lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/font&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="font-family: Arial;"&gt;&lt;font size="3"&gt; &lt;o:p&gt;&lt;/o:p&gt;&lt;/font&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="font-family: Arial;"&gt;&lt;font size="3"&gt;&lt;span style="font-size: 10pt;"&gt;Un-Boxing:&lt;br /&gt;
The conversion of an object instance to a value type.&lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/font&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="font-family: Arial;"&gt;&lt;font size="3"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/font&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="font-family: Arial;"&gt;&lt;font size="3"&gt;&lt;strong&gt;&lt;span style="font-size: 10pt;"&gt;What is JIT and how is works ?&lt;/span&gt;&lt;/strong&gt;&lt;strong&gt;&lt;span style="font-size: 10pt;"&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/strong&gt;&lt;span style="font-size: 10pt;"&gt;An acronym for "just-in-time," a phrase that describes an action that is taken only when it becomes necessary, such as just-in-time compilation or just-in-time object activation&lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/font&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="font-family: Arial;"&gt;&lt;font size="3"&gt; &lt;o:p&gt;&lt;/o:p&gt;&lt;/font&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="font-family: Arial;"&gt;&lt;font size="3"&gt;&lt;strong&gt;&lt;span style="font-size: 10pt;"&gt;What is portable executable (PE) ?&lt;/span&gt;&lt;/strong&gt;&lt;strong&gt;&lt;span style="font-size: 10pt;"&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/strong&gt;&lt;span style="font-size: 10pt;"&gt;The file format used for executable programs and for files to be linked together to form executable programs&lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/font&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="font-family: Arial;"&gt;&lt;font size="3"&gt; &lt;o:p&gt;&lt;/o:p&gt;&lt;/font&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="font-family: Arial;"&gt;&lt;font size="3"&gt;&lt;strong&gt;&lt;span style="font-size: 10pt;"&gt;What is strong name?&lt;/span&gt;&lt;/strong&gt;&lt;span style="font-size: 10pt;"&gt;&lt;br /&gt;
A name that consists of an assembly's identity—its simple text name, version number, and culture information (if provided)—strengthened by a public key and a digital signature generated over the assembly. Because the assembly manifest &lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/font&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="font-family: Arial;"&gt;&lt;font size="3"&gt;&lt;span style="font-size: 10pt;"&gt;contains file hashes for all the files that constitute the assembly implementation, it is sufficient to generate the digital signature over just the one file in the assembly that contains the assembly manifest. Assemblies with the same strong name are expected to be identical&lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/font&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="font-family: Arial;"&gt;&lt;font size="3"&gt; &lt;o:p&gt;&lt;/o:p&gt;&lt;/font&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="font-family: Arial;"&gt;&lt;font size="3"&gt;&lt;strong&gt;&lt;span style="font-size: 10pt;"&gt;What is global assembly cache?&lt;/span&gt;&lt;/strong&gt;&lt;span style="font-size: 10pt;"&gt;&lt;br /&gt;
A machine-wide code cache that stores assemblies specifically installed to be shared by many applications on the computer. Applications deployed in the global assembly cache must have a strong name.&lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/font&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="font-family: Arial;"&gt;&lt;font size="3"&gt; &lt;o:p&gt;&lt;/o:p&gt;&lt;/font&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="font-family: Arial;"&gt;&lt;font size="3"&gt;&lt;strong&gt;&lt;span style="font-size: 10pt;"&gt;What is difference between constants, readonly and, static ?&lt;/span&gt;&lt;/strong&gt;&lt;strong&gt;&lt;span style="font-size: 10pt;"&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/strong&gt;&lt;span style="font-size: 10pt;"&gt;Constants: The value can’t be changed &lt;br /&gt;
Read-only: The value will be initialized only once from the constructor of the class.&lt;br /&gt;
Static: Value can be initialized once.&lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/font&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="font-family: Arial;"&gt;&lt;font size="3"&gt; &lt;o:p&gt;&lt;/o:p&gt;&lt;/font&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="font-family: Arial;"&gt;&lt;font size="3"&gt;&lt;strong&gt;&lt;span style="font-size: 10pt;"&gt;What is difference between shared and public?&lt;/span&gt;&lt;/strong&gt;&lt;span style="font-size: 10pt;"&gt;&lt;br /&gt;
An assembly that can be referenced by more than one application. An assembly must be explicitly built to be shared by giving it a cryptographically strong name.&lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/font&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="font-family: Arial;"&gt;&lt;font size="3"&gt; &lt;o:p&gt;&lt;/o:p&gt;&lt;/font&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="font-family: Arial;"&gt;&lt;font size="3"&gt;&lt;strong&gt;&lt;span style="font-size: 10pt;"&gt;What is namespace used for loading assemblies at run time and name the methods?&lt;/span&gt;&lt;/strong&gt;&lt;strong&gt;&lt;span style="font-size: 10pt;"&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/strong&gt;&lt;span style="font-size: 10pt;"&gt;System.Reflection&lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/font&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="font-family: Arial;"&gt;&lt;font size="3"&gt; &lt;o:p&gt;&lt;/o:p&gt;&lt;/font&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="font-family: Arial;"&gt;&lt;font size="3"&gt;&lt;strong&gt;&lt;span style="font-size: 10pt;"&gt;What are the types of authentication in .net?&lt;/span&gt;&lt;/strong&gt;&lt;span style="font-size: 10pt;"&gt;&lt;br /&gt;
We have three types of  authentication: &lt;br /&gt;
1. Form authentication &lt;br /&gt;
2.  Windows authentication&lt;br /&gt;
3.  Passport&lt;br /&gt;
This has to be declared in web.config file.&lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/font&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="font-family: Arial;"&gt;&lt;font size="3"&gt; &lt;o:p&gt;&lt;/o:p&gt;&lt;/font&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="font-family: Arial;"&gt;&lt;font size="3"&gt;&lt;strong&gt;&lt;span style="font-size: 10pt;"&gt;What is the difference between a Struct and a Class in C# ?&lt;/span&gt;&lt;/strong&gt;&lt;strong&gt;&lt;span style="font-size: 10pt;"&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/strong&gt;&lt;span style="font-size: 10pt;"&gt;The struct type is suitable for representing lightweight objects such as Point, Rectangle, and Color. Although it is possible to represent a point as a class, a struct is more efficient in some scenarios. For example, if you declare an array of 1000 Point objects,&lt;br /&gt;
you will allocate additional memory for referencing each object. In this case, the struct is less expensive.&lt;br /&gt;
When you create a struct object using the new operator, it gets created and the appropriate constructor is called. Unlike classes, structs can be instantiated without using the new operator. If you do not use new, the fields will remain unassigned and the object cannot be used until all of the fields are initialized. It is an error to declare a default (parameterless) constructor for a struct. A default constructor is always provided to initialize the struct members to their default values.&lt;br /&gt;
It is an error to initialize an instance field in a struct.&lt;br /&gt;
There is no inheritance for structs as there is for classes. A struct cannot inherit from another struct or class, and it cannot be the base of a class. Structs, however, inherit from the base class Object. A struct can implement interfaces, and it does that exactly as classes do.&lt;br /&gt;
A struct is a value type, while a class is a reference type.&lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/font&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="font-family: Arial;"&gt;&lt;font size="3"&gt;&lt;strong&gt;&lt;span style="font-size: 10pt;"&gt;How big is the datatype int in .NET? &lt;/span&gt;&lt;/strong&gt;&lt;strong&gt;&lt;span style="font-size: 10pt;"&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/strong&gt;&lt;span style="font-size: 10pt;"&gt;32 bits. &lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/font&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="font-family: Arial;"&gt;&lt;font size="3"&gt; &lt;o:p&gt;&lt;/o:p&gt;&lt;/font&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="font-family: Arial;"&gt;&lt;font size="3"&gt;&lt;strong&gt;&lt;span style="font-size: 10pt;"&gt;How big is the char? &lt;/span&gt;&lt;/strong&gt;&lt;strong&gt;&lt;span style="font-size: 10pt;"&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/strong&gt;&lt;span style="font-size: 10pt;"&gt;16 bits (Unicode). &lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/font&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="font-family: Arial;"&gt;&lt;font size="3"&gt; &lt;o:p&gt;&lt;/o:p&gt;&lt;/font&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="font-family: Arial;"&gt;&lt;font size="3"&gt;&lt;strong&gt;&lt;span style="font-size: 10pt;"&gt;How do you initiate a string without escaping each backslash? &lt;/span&gt;&lt;/strong&gt;&lt;strong&gt;&lt;span style="font-size: 10pt;"&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/strong&gt;&lt;span style="font-size: 10pt;"&gt;Put an @ sign in front of the double-quoted string. &lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/font&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="font-family: Arial;"&gt;&lt;font size="3"&gt; &lt;o:p&gt;&lt;/o:p&gt;&lt;/font&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="font-family: Arial;"&gt;&lt;font size="3"&gt;&lt;strong&gt;&lt;span style="font-size: 10pt;"&gt;What's the access level of the visibility type internal? &lt;/span&gt;&lt;/strong&gt;&lt;strong&gt;&lt;span style="font-size: 10pt;"&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/strong&gt;&lt;span style="font-size: 10pt;"&gt;Current application. &lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/font&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="font-family: Arial;"&gt;&lt;font size="3"&gt; &lt;o:p&gt;&lt;/o:p&gt;&lt;/font&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="font-family: Arial;"&gt;&lt;font size="3"&gt;&lt;strong&gt;&lt;span style="font-size: 10pt;"&gt;Explain encapsulation ?&lt;/span&gt;&lt;/strong&gt;&lt;strong&gt;&lt;span style="font-size: 10pt;"&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/strong&gt;&lt;span style="font-size: 10pt;"&gt;The implementation is hidden, the interface is exposed. &lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/font&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="font-family: Arial;"&gt;&lt;font size="3"&gt; &lt;o:p&gt;&lt;/o:p&gt;&lt;/font&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="font-family: Arial;"&gt;&lt;font size="3"&gt;&lt;strong&gt;&lt;span style="font-size: 10pt;"&gt;What data type should you use if you want an 8-bit value that's signed? &lt;/span&gt;&lt;/strong&gt;&lt;strong&gt;&lt;span style="font-size: 10pt;"&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/strong&gt;&lt;span style="font-size: 10pt;"&gt;sbyte. &lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/font&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="font-family: Arial;"&gt;&lt;font size="3"&gt; &lt;o:p&gt;&lt;/o:p&gt;&lt;/font&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="font-family: Arial;"&gt;&lt;font size="3"&gt;&lt;strong&gt;&lt;span style="font-size: 10pt;"&gt;Speaking of Boolean data types, what's different between C# and C/C++? &lt;/span&gt;&lt;/strong&gt;&lt;strong&gt;&lt;span style="font-size: 10pt;"&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/strong&gt;&lt;span style="font-size: 10pt;"&gt;There's no conversion between 0 and false, as well as any other number and true, like in C/C++. &lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/font&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="font-family: Arial;"&gt;&lt;font size="3"&gt; &lt;o:p&gt;&lt;/o:p&gt;&lt;/font&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="font-family: Arial;"&gt;&lt;font size="3"&gt;&lt;strong&gt;&lt;span style="font-size: 10pt;"&gt;Where are the value-type variables allocated in the computer RAM? &lt;/span&gt;&lt;/strong&gt;&lt;strong&gt;&lt;span style="font-size: 10pt;"&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/strong&gt;&lt;span style="font-size: 10pt;"&gt;Stack. &lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/font&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="font-family: Arial;"&gt;&lt;font size="3"&gt; &lt;o:p&gt;&lt;/o:p&gt;&lt;/font&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="font-family: Arial;"&gt;&lt;font size="3"&gt;&lt;strong&gt;&lt;span style="font-size: 10pt;"&gt;Where do the reference-type variables go in the RAM? &lt;/span&gt;&lt;/strong&gt;&lt;strong&gt;&lt;span style="font-size: 10pt;"&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/strong&gt;&lt;span style="font-size: 10pt;"&gt;The references go on the stack, while the objects themselves go on the heap. &lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/font&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="font-family: Arial;"&gt;&lt;font size="3"&gt; &lt;o:p&gt;&lt;/o:p&gt;&lt;/font&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="font-family: Arial;"&gt;&lt;font size="3"&gt;&lt;strong&gt;&lt;span style="font-size: 10pt;"&gt;What is the difference between the value-type variables and reference-type variables in terms of garbage collection? &lt;/span&gt;&lt;/strong&gt;&lt;strong&gt;&lt;span style="font-size: 10pt;"&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/strong&gt;&lt;span style="font-size: 10pt;"&gt;The value-type variables are not garbage-collected, they just fall off the stack when they fall out of scope, the reference-type objects &lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/font&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="font-family: Arial;"&gt;&lt;font size="3"&gt;&lt;span style="font-size: 10pt;"&gt;are picked up by GC when their references go null. &lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/font&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="font-family: Arial;"&gt;&lt;font size="3"&gt; &lt;o:p&gt;&lt;/o:p&gt;&lt;/font&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="font-family: Arial;"&gt;&lt;font size="3"&gt;&lt;strong&gt;&lt;span style="font-size: 10pt;"&gt;How do you convert a string into an integer in .NET?&lt;/span&gt;&lt;/strong&gt;&lt;strong&gt;&lt;span style="font-size: 10pt;"&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/strong&gt;&lt;span style="font-size: 10pt;"&gt;Int32.Parse(string) &lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/font&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="font-family: Arial;"&gt;&lt;font size="3"&gt; &lt;o:p&gt;&lt;/o:p&gt;&lt;/font&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="font-family: Arial;"&gt;&lt;font size="3"&gt;&lt;strong&gt;&lt;span style="font-size: 10pt;"&gt;How do you box a primitive data type variable? &lt;/span&gt;&lt;/strong&gt;&lt;strong&gt;&lt;span style="font-size: 10pt;"&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/strong&gt;&lt;span style="font-size: 10pt;"&gt;Assign it to the object, pass an object. &lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/font&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="font-family: Arial;"&gt;&lt;font size="3"&gt; &lt;o:p&gt;&lt;/o:p&gt;&lt;/font&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="font-family: Arial;"&gt;&lt;font size="3"&gt;&lt;strong&gt;&lt;span style="font-size: 10pt;"&gt;Why do you need to box a primitive variable?&lt;/span&gt;&lt;/strong&gt;&lt;strong&gt;&lt;span style="font-size: 10pt;"&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/strong&gt;&lt;span style="font-size: 10pt;"&gt;To pass it by reference. &lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/font&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="font-family: Arial;"&gt;&lt;font size="3"&gt; &lt;o:p&gt;&lt;/o:p&gt;&lt;/font&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="font-family: Arial;"&gt;&lt;font size="3"&gt;&lt;strong&gt;&lt;span style="font-size: 10pt;"&gt;What's the difference between Java and .NET garbage collectors? &lt;/span&gt;&lt;/strong&gt;&lt;strong&gt;&lt;span style="font-size: 10pt;"&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/strong&gt;&lt;span style="font-size: 10pt;"&gt;Sun left the implementation of a specific garbage collector up to the JRE developer, so their performance varies widely, depending on whose JRE you're using. Microsoft standardized on their garbage collection. &lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/font&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="font-family: Arial;"&gt;&lt;font size="3"&gt; &lt;o:p&gt;&lt;/o:p&gt;&lt;/font&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="font-family: Arial;"&gt;&lt;font size="3"&gt;&lt;strong&gt;&lt;span style="font-size: 10pt;"&gt;How do you enforce garbage collection in .NET?&lt;/span&gt;&lt;/strong&gt;&lt;strong&gt;&lt;span style="font-size: 10pt;"&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/strong&gt;&lt;span style="font-size: 10pt;"&gt;System.GC.Collect(); &lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/font&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="font-family: Arial;"&gt;&lt;font size="3"&gt; &lt;o:p&gt;&lt;/o:p&gt;&lt;/font&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="font-family: Arial;"&gt;&lt;font size="3"&gt;&lt;strong&gt;&lt;span style="font-size: 10pt;"&gt;Can you declare a C++ type destructor in C# like ~MyClass()? &lt;/span&gt;&lt;/strong&gt;&lt;strong&gt;&lt;span style="font-size: 10pt;"&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/strong&gt;&lt;span style="font-size: 10pt;"&gt;Yes, but what's the point, since it will call Finalize(), and Finalize() has no guarantees when the memory will be cleaned up,  plus, it introduces additional load on the garbage collector. &lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/font&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="font-family: Arial;"&gt;&lt;font size="3"&gt; &lt;o:p&gt;&lt;/o:p&gt;&lt;/font&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="font-family: Arial;"&gt;&lt;font size="3"&gt;&lt;strong&gt;&lt;span style="font-size: 10pt;"&gt;What's different about namespace declaration when comparing that to package declaration in Java? &lt;/span&gt;&lt;/strong&gt;&lt;strong&gt;&lt;span style="font-size: 10pt;"&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/strong&gt;&lt;span style="font-size: 10pt;"&gt;No semicolon. &lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/font&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="font-family: Arial;"&gt;&lt;font size="3"&gt; &lt;o:p&gt;&lt;/o:p&gt;&lt;/font&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="font-family: Arial;"&gt;&lt;font size="3"&gt;&lt;strong&gt;&lt;span style="font-size: 10pt;"&gt;What's the difference between const and readonly? &lt;/span&gt;&lt;/strong&gt;&lt;strong&gt;&lt;span style="font-size: 10pt;"&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/strong&gt;&lt;span style="font-size: 10pt;"&gt;You can initialize readonly variables to some runtime values. Let's say your program uses current date and time as one of the values that won't change. This way you declare public readonly string DateT = new DateTime().ToString(). &lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/font&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="font-family: Arial;"&gt;&lt;font size="3"&gt; &lt;o:p&gt;&lt;/o:p&gt;&lt;/font&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="font-family: Arial;"&gt;&lt;font size="3"&gt;&lt;strong&gt;&lt;span style="font-size: 10pt;"&gt;What does \a character do? &lt;/span&gt;&lt;/strong&gt;&lt;strong&gt;&lt;span style="font-size: 10pt;"&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/strong&gt;&lt;span style="font-size: 10pt;"&gt;On most systems, produces a rather annoying beep. &lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/font&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="font-family: Arial;"&gt;&lt;font size="3"&gt; &lt;o:p&gt;&lt;/o:p&gt;&lt;/font&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="font-family: Arial;"&gt;&lt;font size="3"&gt;&lt;strong&gt;&lt;span style="font-size: 10pt;"&gt;Can you create enumerated data types in C#? &lt;/span&gt;&lt;/strong&gt;&lt;strong&gt;&lt;span style="font-size: 10pt;"&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/strong&gt;&lt;span style="font-size: 10pt;"&gt;Yes. &lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/font&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="font-family: Arial;"&gt;&lt;font size="3"&gt; &lt;o:p&gt;&lt;/o:p&gt;&lt;/font&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="font-family: Arial;"&gt;&lt;font size="3"&gt;&lt;strong&gt;&lt;span style="font-size: 10pt;"&gt;What's different about switch statements in C#? &lt;/span&gt;&lt;/strong&gt;&lt;strong&gt;&lt;span style="font-size: 10pt;"&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/strong&gt;&lt;span style="font-size: 10pt;"&gt;No fall-throughs allowed. &lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/font&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="font-family: Arial;"&gt;&lt;font size="3"&gt; &lt;o:p&gt;&lt;/o:p&gt;&lt;/font&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="font-family: Arial;"&gt;&lt;font size="3"&gt;&lt;strong&gt;&lt;span style="font-size: 10pt;"&gt;What happens when you encounter a continue statement inside the for loop? &lt;/span&gt;&lt;/strong&gt;&lt;strong&gt;&lt;span style="font-size: 10pt;"&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/strong&gt;&lt;span style="font-size: 10pt;"&gt;The code for the rest of the loop is ignored, the control is transferred back to the beginning of the loop. &lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/font&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="font-family: Arial;"&gt;&lt;font size="3"&gt; &lt;o:p&gt;&lt;/o:p&gt;&lt;/font&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="font-family: Arial;"&gt;&lt;font size="3"&gt;&lt;strong&gt;&lt;span style="font-size: 10pt;"&gt;What's the advantage of using System.Text.StringBuilder over System.String? &lt;/span&gt;&lt;/strong&gt;&lt;strong&gt;&lt;span style="font-size: 10pt;"&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/strong&gt;&lt;span style="font-size: 10pt;"&gt;StringBuilder is more efficient in the cases, where a lot of manipulation is done to the text. Strings are immutable, so each time it's being operated on, a new instance is created. &lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/font&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="font-family: Arial;"&gt;&lt;font size="3"&gt; &lt;o:p&gt;&lt;/o:p&gt;&lt;/font&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="font-family: Arial;"&gt;&lt;font size="3"&gt;&lt;strong&gt;&lt;span style="font-size: 10pt;"&gt;Can you store multiple data types in System.Array? &lt;/span&gt;&lt;/strong&gt;&lt;strong&gt;&lt;span style="font-size: 10pt;"&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/strong&gt;&lt;span style="font-size: 10pt;"&gt;No. &lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/font&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="font-family: Arial;"&gt;&lt;font size="3"&gt; &lt;o:p&gt;&lt;/o:p&gt;&lt;/font&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="font-family: Arial;"&gt;&lt;font size="3"&gt;&lt;strong&gt;&lt;span style="font-size: 10pt;"&gt;What's the difference between the System.Array.CopyTo() and System.Array.Clone()? &lt;/span&gt;&lt;/strong&gt;&lt;strong&gt;&lt;span style="font-size: 10pt;"&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/strong&gt;&lt;span style="font-size: 10pt;"&gt;The first one performs a deep copy of the array, the second one is shallow. &lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/font&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="font-family: Arial;"&gt;&lt;font size="3"&gt; &lt;o:p&gt;&lt;/o:p&gt;&lt;/font&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="font-family: Arial;"&gt;&lt;font size="3"&gt;&lt;strong&gt;&lt;span style="font-size: 10pt;"&gt;How can you sort the elements of the array in descending order? &lt;/span&gt;&lt;/strong&gt;&lt;strong&gt;&lt;span style="font-size: 10pt;"&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/strong&gt;&lt;span style="font-size: 10pt;"&gt;By calling Sort() and then Reverse() methods. &lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/font&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="font-family: Arial;"&gt;&lt;font size="3"&gt; &lt;o:p&gt;&lt;/o:p&gt;&lt;/font&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="font-family: Arial;"&gt;&lt;font size="3"&gt;&lt;strong&gt;&lt;span style="font-size: 10pt;"&gt;What's the .NET datatype that allows the retrieval of data by a unique key? &lt;/span&gt;&lt;/strong&gt;&lt;strong&gt;&lt;span style="font-size: 10pt;"&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/strong&gt;&lt;span style="font-size: 10pt;"&gt;HashTable. &lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/font&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="font-family: Arial;"&gt;&lt;font size="3"&gt; &lt;o:p&gt;&lt;/o:p&gt;&lt;/font&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="font-family: Arial;"&gt;&lt;font size="3"&gt;&lt;strong&gt;&lt;span style="font-size: 10pt;"&gt;What's class SortedList underneath? &lt;/span&gt;&lt;/strong&gt;&lt;strong&gt;&lt;span style="font-size: 10pt;"&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/strong&gt;&lt;span style="font-size: 10pt;"&gt;A sorted HashTable. &lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/font&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="font-family: Arial;"&gt;&lt;font size="3"&gt; &lt;o:p&gt;&lt;/o:p&gt;&lt;/font&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="font-family: Arial;"&gt;&lt;font size="3"&gt;&lt;strong&gt;&lt;span style="font-size: 10pt;"&gt;Will finally block get executed if the exception had not occurred? &lt;/span&gt;&lt;/strong&gt;&lt;strong&gt;&lt;span style="font-size: 10pt;"&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/strong&gt;&lt;span style="font-size: 10pt;"&gt;Yes. &lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/font&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="font-family: Arial;"&gt;&lt;font size="3"&gt; &lt;o:p&gt;&lt;/o:p&gt;&lt;/font&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="font-family: Arial;"&gt;&lt;font size="3"&gt;&lt;strong&gt;&lt;span style="font-size: 10pt;"&gt;What's the C# equivalent of C++ catch (…), which was a catch-all statement for any possible exception? &lt;/span&gt;&lt;/strong&gt;&lt;strong&gt;&lt;span style="font-size: 10pt;"&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/strong&gt;&lt;span style="font-size: 10pt;"&gt;A catch block that catches the exception of type System.Exception. You can also omit the parameter data type in this case and just write catch {}. &lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/font&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="font-family: Arial;"&gt;&lt;font size="3"&gt; &lt;o:p&gt;&lt;/o:p&gt;&lt;/font&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="font-family: Arial;"&gt;&lt;font size="3"&gt;&lt;strong&gt;&lt;span style="font-size: 10pt;"&gt;Can multiple catch blocks be executed?&lt;/span&gt;&lt;/strong&gt;&lt;strong&gt;&lt;span style="font-size: 10pt;"&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/strong&gt;&lt;span style="font-size: 10pt;"&gt;No, once the proper catch code fires off, the control is transferred to the finally block (if there are any), and then whatever follows the finally block. &lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/font&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="font-family: Arial;"&gt;&lt;font size="3"&gt; &lt;o:p&gt;&lt;/o:p&gt;&lt;/font&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="font-family: Arial;"&gt;&lt;font size="3"&gt;&lt;strong&gt;&lt;span style="font-size: 10pt;"&gt;Why is it a bad idea to throw your own exceptions? &lt;/span&gt;&lt;/strong&gt;&lt;strong&gt;&lt;span style="font-size: 10pt;"&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/strong&gt;&lt;span style="font-size: 10pt;"&gt;Well, if at that point you know that an error has occurred, then why not write the proper code to handle that error instead of passing a new Exception object to the catch block? Throwing your own exceptions signifies some design flaws in the project. &lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/font&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="font-family: Arial;"&gt;&lt;font size="3"&gt; &lt;o:p&gt;&lt;/o:p&gt;&lt;/font&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="font-family: Arial;"&gt;&lt;font size="3"&gt;&lt;strong&gt;&lt;span style="font-size: 10pt;"&gt;What's a delegate? &lt;/span&gt;&lt;/strong&gt;&lt;strong&gt;&lt;span style="font-size: 10pt;"&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/strong&gt;&lt;span style="font-size: 10pt;"&gt;A delegate object encapsulates a reference to a method. In C++ they were referred to as function pointers. &lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/font&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="font-family: Arial;"&gt;&lt;font size="3"&gt; &lt;o:p&gt;&lt;/o:p&gt;&lt;/font&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="font-family: Arial;"&gt;&lt;font size="3"&gt;&lt;strong&gt;&lt;span style="font-size: 10pt;"&gt;What's a multicast delegate? &lt;/span&gt;&lt;/strong&gt;&lt;strong&gt;&lt;span style="font-size: 10pt;"&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/strong&gt;&lt;span style="font-size: 10pt;"&gt;It's a delegate that points to and eventually fires off several methods. &lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/font&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="font-family: Arial;"&gt;&lt;font size="3"&gt; &lt;o:p&gt;&lt;/o:p&gt;&lt;/font&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="font-family: Arial;"&gt;&lt;font size="3"&gt;&lt;strong&gt;&lt;span style="font-size: 10pt;"&gt;How's the DLL Hell problem solved in .NET? &lt;/span&gt;&lt;/strong&gt;&lt;strong&gt;&lt;span style="font-size: 10pt;"&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/strong&gt;&lt;span style="font-size: 10pt;"&gt;Assembly versioning allows the application to specify not only the library it needs to run (which was available under Win32),  but also the version of the assembly. &lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/font&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="font-family: Arial;"&gt;&lt;font size="3"&gt; &lt;o:p&gt;&lt;/o:p&gt;&lt;/font&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="font-family: Arial;"&gt;&lt;font size="3"&gt;&lt;strong&gt;&lt;span style="font-size: 10pt;"&gt;What are the ways to deploy an assembly?&lt;/span&gt;&lt;/strong&gt;&lt;strong&gt;&lt;span style="font-size: 10pt;"&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/strong&gt;&lt;span style="font-size: 10pt;"&gt; An MSI installer, a CAB archive, and XCOPY command. &lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/font&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="font-family: Arial;"&gt;&lt;font size="3"&gt; &lt;o:p&gt;&lt;/o:p&gt;&lt;/font&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="font-family: Arial;"&gt;&lt;font size="3"&gt;&lt;strong&gt;&lt;span style="font-size: 10pt;"&gt;What's a satellite assembly? &lt;/span&gt;&lt;/strong&gt;&lt;strong&gt;&lt;span style="font-size: 10pt;"&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/strong&gt;&lt;span style="font-size: 10pt;"&gt;When you write a multilingual or multi-cultural application in .NET, and want to distribute the core application separately from the localized modules, the localized assemblies that modify the core application are called satellite assemblies. &lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/font&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="font-family: Arial;"&gt;&lt;font size="3"&gt; &lt;o:p&gt;&lt;/o:p&gt;&lt;/font&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="font-family: Arial;"&gt;&lt;font size="3"&gt;&lt;strong&gt;&lt;span style="font-size: 10pt;"&gt;What namespaces are necessary to create a localized application? &lt;/span&gt;&lt;/strong&gt;&lt;strong&gt;&lt;span style="font-size: 10pt;"&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/strong&gt;&lt;span style="font-size: 10pt;"&gt;System.Globalization, System.Resources. &lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/font&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="font-family: Arial;"&gt;&lt;font size="3"&gt; &lt;o:p&gt;&lt;/o:p&gt;&lt;/font&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="font-family: Arial;"&gt;&lt;font size="3"&gt;&lt;strong&gt;&lt;span style="font-size: 10pt;"&gt;What's the difference between // comments, /* */ comments and /// comments? &lt;/span&gt;&lt;/strong&gt;&lt;strong&gt;&lt;span style="font-size: 10pt;"&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/strong&gt;&lt;span style="font-size: 10pt;"&gt;Single-line, multi-line and XML documentation comments. &lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/font&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="font-family: Arial;"&gt;&lt;font size="3"&gt; &lt;o:p&gt;&lt;/o:p&gt;&lt;/font&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="font-family: Arial;"&gt;&lt;font size="3"&gt;&lt;strong&gt;&lt;span style="font-size: 10pt;"&gt;How do you generate documentation from the C# file commented properly with a command-line compiler? &lt;/span&gt;&lt;/strong&gt;&lt;strong&gt;&lt;span style="font-size: 10pt;"&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/strong&gt;&lt;span style="font-size: 10pt;"&gt;Compile it with a /doc switch. &lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/font&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="font-family: Arial;"&gt;&lt;font size="3"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/font&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="font-family: Arial;"&gt;&lt;font size="3"&gt;&lt;strong&gt;&lt;span style="font-size: 10pt;"&gt;What does assert() do? &lt;/span&gt;&lt;/strong&gt;&lt;strong&gt;&lt;span style="font-size: 10pt;"&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/strong&gt;&lt;span style="font-size: 10pt;"&gt;In debug compilation, assert takes in a Boolean condition as a parameter, and shows the error dialog if the condition is  false. The program proceeds without any interruption if the condition is true. &lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/font&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="font-family: Arial;"&gt;&lt;font size="3"&gt; &lt;o:p&gt;&lt;/o:p&gt;&lt;/font&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="font-family: Arial;"&gt;&lt;font size="3"&gt;&lt;strong&gt;&lt;span style="font-size: 10pt;"&gt;What's the difference between the Debug class and Trace class? &lt;/span&gt;&lt;/strong&gt;&lt;strong&gt;&lt;span style="font-size: 10pt;"&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/strong&gt;&lt;span style="font-size: 10pt;"&gt;Documentation looks the same. Use Debug class for debug builds, use Trace class for both debug and release builds. &lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/font&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="font-family: Arial;"&gt;&lt;font size="3"&gt; &lt;o:p&gt;&lt;/o:p&gt;&lt;/font&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="font-family: Arial;"&gt;&lt;font size="3"&gt;&lt;strong&gt;&lt;span style="font-size: 10pt;"&gt;Why are there five tracing levels in System.Diagnostics.TraceSwitcher? &lt;/span&gt;&lt;/strong&gt;&lt;strong&gt;&lt;span style="font-size: 10pt;"&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/strong&gt;&lt;span style="font-size: 10pt;"&gt;The tracing dumps can be quite verbose and for some applications that are constantly running you run the risk of overloading the machine and the hard drive there. Five levels range from None to Verbose, allowing to fine-tune the tracing activities. &lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/font&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="font-family: Arial;"&gt;&lt;font size="3"&gt; &lt;o:p&gt;&lt;/o:p&gt;&lt;/font&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="font-family: Arial;"&gt;&lt;font size="3"&gt;&lt;strong&gt;&lt;span style="font-size: 10pt;"&gt;Where is the output of TextWriterTraceListener redirected? &lt;/span&gt;&lt;/strong&gt;&lt;strong&gt;&lt;span style="font-size: 10pt;"&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/strong&gt;&lt;span style="font-size: 10pt;"&gt;To the Console or a text file depending on the parameter passed to the constructor. &lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/font&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="font-family: Arial;"&gt;&lt;font size="3"&gt; &lt;o:p&gt;&lt;/o:p&gt;&lt;/font&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="font-family: Arial;"&gt;&lt;font size="3"&gt;&lt;strong&gt;&lt;span style="font-size: 10pt;"&gt;How do you debug an ASP.NET Web application? &lt;/span&gt;&lt;/strong&gt;&lt;strong&gt;&lt;span style="font-size: 10pt;"&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/strong&gt;&lt;span style="font-size: 10pt;"&gt;Attach the aspnet_wp.exe process to the DbgClr debugger. &lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/font&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="font-family: Arial;"&gt;&lt;font size="3"&gt; &lt;o:p&gt;&lt;/o:p&gt;&lt;/font&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="font-family: Arial;"&gt;&lt;font size="3"&gt;&lt;strong&gt;&lt;span style="font-size: 10pt;"&gt;What are three test cases you should go through in unit testing? &lt;/span&gt;&lt;/strong&gt;&lt;strong&gt;&lt;span style="font-size: 10pt;"&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/strong&gt;&lt;span style="font-size: 10pt;"&gt;Positive test cases (correct data, correct output), negative test cases (broken or missing data, proper handling), exception  test &lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/font&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="font-family: Arial;"&gt;&lt;font size="3"&gt;&lt;span style="font-size: 10pt;"&gt;cases (exceptions are thrown and caught properly). &lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/font&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="font-family: Arial;"&gt;&lt;font size="3"&gt; &lt;o:p&gt;&lt;/o:p&gt;&lt;/font&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="font-family: Arial;"&gt;&lt;font size="3"&gt;&lt;strong&gt;&lt;span style="font-size: 10pt;"&gt;Can you change the value of a variable while debugging a C# application? &lt;/span&gt;&lt;/strong&gt;&lt;strong&gt;&lt;span style="font-size: 10pt;"&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/strong&gt;&lt;span style="font-size: 10pt;"&gt;Yes, if you are debugging via Visual Studio.NET, just go to Immediate window. &lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/font&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="font-family: Arial;"&gt;&lt;font size="3"&gt; &lt;o:p&gt;&lt;/o:p&gt;&lt;/font&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="font-family: Arial;"&gt;&lt;font size="3"&gt;&lt;strong&gt;&lt;span style="font-size: 10pt;"&gt;What's the implicit name of the parameter that gets passed into the class' set method? &lt;/span&gt;&lt;/strong&gt;&lt;strong&gt;&lt;span style="font-size: 10pt;"&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/strong&gt;&lt;span style="font-size: 10pt;"&gt;Value, and it's datatype depends on whatever variable we're changing. &lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/font&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="font-family: Arial;"&gt;&lt;font size="3"&gt; &lt;o:p&gt;&lt;/o:p&gt;&lt;/font&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="font-family: Arial;"&gt;&lt;font size="3"&gt;&lt;strong&gt;&lt;span style="font-size: 10pt;"&gt;How do you inherit from a class in C#? &lt;/span&gt;&lt;/strong&gt;&lt;strong&gt;&lt;span style="font-size: 10pt;"&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/strong&gt;&lt;span style="font-size: 10pt;"&gt;Place a colon and then the name of the base class. Notice that it's double colon in C++. &lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/font&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="font-family: Arial;"&gt;&lt;font size="3"&gt; &lt;o:p&gt;&lt;/o:p&gt;&lt;/font&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="font-family: Arial;"&gt;&lt;font size="3"&gt;&lt;strong&gt;&lt;span style="font-size: 10pt;"&gt;Does C# support multiple inheritance? &lt;/span&gt;&lt;/strong&gt;&lt;span style="font-size: 10pt;"&gt;&lt;br /&gt;
No, use interfaces instead. &lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/font&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="font-family: Arial;"&gt;&lt;font size="3"&gt; &lt;o:p&gt;&lt;/o:p&gt;&lt;/font&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="font-family: Arial;"&gt;&lt;font size="3"&gt;&lt;strong&gt;&lt;span style="font-size: 10pt;"&gt;When you inherit a protected class-level variable, who is it available to?&lt;/span&gt;&lt;/strong&gt;&lt;strong&gt;&lt;span style="font-size: 10pt;"&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/strong&gt;&lt;span style="font-size: 10pt;"&gt;Classes in the same namespace. &lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/font&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="font-family: Arial;"&gt;&lt;font size="3"&gt; &lt;o:p&gt;&lt;/o:p&gt;&lt;/font&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="font-family: Arial;"&gt;&lt;font size="3"&gt;&lt;strong&gt;&lt;span style="font-size: 10pt;"&gt;What's the top .NET class that everything is derived from? &lt;/span&gt;&lt;/strong&gt;&lt;span style="font-size: 10pt;"&gt;&lt;br /&gt;
System.Object. &lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/font&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="font-family: Arial;"&gt;&lt;font size="3"&gt; &lt;o:p&gt;&lt;/o:p&gt;&lt;/font&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="font-family: Arial;"&gt;&lt;font size="3"&gt;&lt;strong&gt;&lt;span style="font-size: 10pt;"&gt;How's method overriding different from overloading? &lt;/span&gt;&lt;/strong&gt;&lt;strong&gt;&lt;span style="font-size: 10pt;"&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/strong&gt;&lt;span style="font-size: 10pt;"&gt;When overriding, you change the method behavior for a derived class. Overloading simply involves having a method with the  same name within the class. &lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/font&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="font-family: Arial;"&gt;&lt;font size="3"&gt; &lt;o:p&gt;&lt;/o:p&gt;&lt;/font&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="font-family: Arial;"&gt;&lt;font size="3"&gt;&lt;strong&gt;&lt;span style="font-size: 10pt;"&gt;What does the keyword virtual mean in the method definition?&lt;/span&gt;&lt;/strong&gt;&lt;span style="font-size: 10pt;"&gt;&lt;br /&gt;
The method can be over-ridden. &lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/font&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="font-family: Arial;"&gt;&lt;font size="3"&gt; &lt;o:p&gt;&lt;/o:p&gt;&lt;/font&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="font-family: Arial;"&gt;&lt;font size="3"&gt;&lt;strong&gt;&lt;span style="font-size: 10pt;"&gt;Can you declare the override method static while the original method is non-static?&lt;/span&gt;&lt;/strong&gt;&lt;strong&gt;&lt;span style="font-size: 10pt;"&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/strong&gt;&lt;span style="font-size: 10pt;"&gt;No, you can't, the signature of the virtual method must remain the same, only the keyword virtual is changed to keyword  override. &lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/font&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="font-family: Arial;"&gt;&lt;font size="3"&gt; &lt;o:p&gt;&lt;/o:p&gt;&lt;/font&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="font-family: Arial;"&gt;&lt;font size="3"&gt;&lt;strong&gt;&lt;span style="font-size: 10pt;"&gt;Can you override private virtual methods? &lt;/span&gt;&lt;/strong&gt;&lt;strong&gt;&lt;span style="font-size: 10pt;"&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/strong&gt;&lt;span style="font-size: 10pt;"&gt;No, moreover, you cannot access private methods in inherited classes, have to be protected in the base class to allow any sort of access. &lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/font&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="font-family: Arial;"&gt;&lt;font size="3"&gt; &lt;o:p&gt;&lt;/o:p&gt;&lt;/font&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="font-family: Arial;"&gt;&lt;font size="3"&gt;&lt;strong&gt;&lt;span style="font-size: 10pt;"&gt;Can you prevent your class from being inherited and becoming a base class for some other classes? &lt;/span&gt;&lt;/strong&gt;&lt;strong&gt;&lt;span style="font-size: 10pt;"&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/strong&gt;&lt;span style="font-size: 10pt;"&gt;Yes, that's what keyword sealed in the class definition is for. The developer trying to derive from your class will get a  message: cannot inherit from Sealed class WhateverBaseClassName. It's the same concept as final class in Java. &lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/font&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="font-family: Arial;"&gt;&lt;font size="3"&gt; &lt;o:p&gt;&lt;/o:p&gt;&lt;/font&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="font-family: Arial;"&gt;&lt;font size="3"&gt;&lt;strong&gt;&lt;span style="font-size: 10pt;"&gt;Can you allow class to be inherited, but prevent the method from being over-ridden? &lt;/span&gt;&lt;/strong&gt;&lt;span style="font-size: 10pt;"&gt;&lt;br /&gt;
Yes, just leave the class public and make the method sealed. &lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/font&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="font-family: Arial;"&gt;&lt;font size="3"&gt; &lt;o:p&gt;&lt;/o:p&gt;&lt;/font&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="font-family: Arial;"&gt;&lt;font size="3"&gt;&lt;strong&gt;&lt;span style="font-size: 10pt;"&gt;Why can't you specify the accessibility modifier for methods inside the interface? &lt;/span&gt;&lt;/strong&gt;&lt;strong&gt;&lt;span style="font-size: 10pt;"&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/strong&gt;&lt;span style="font-size: 10pt;"&gt;They all must be public. Therefore, to prevent you from getting the false impression that you have any freedom of choice, you are not allowed to specify any accessibility, it's public by default. &lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/font&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="font-family: Arial;"&gt;&lt;font size="3"&gt; &lt;o:p&gt;&lt;/o:p&gt;&lt;/font&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="font-family: Arial;"&gt;&lt;font size="3"&gt;&lt;strong&gt;&lt;span style="font-size: 10pt;"&gt;Can you inherit multiple interfaces? &lt;/span&gt;&lt;/strong&gt;&lt;span style="font-size: 10pt;"&gt;&lt;br /&gt;
Yes, why not. &lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/font&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="font-family: Arial;"&gt;&lt;font size="3"&gt; &lt;o:p&gt;&lt;/o:p&gt;&lt;/font&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="font-family: Arial;"&gt;&lt;font size="3"&gt;&lt;strong&gt;&lt;span style="font-size: 10pt;"&gt;And if they have conflicting method names? &lt;/span&gt;&lt;/strong&gt;&lt;strong&gt;&lt;span style="font-size: 10pt;"&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/strong&gt;&lt;span style="font-size: 10pt;"&gt;It's up to you to implement the method inside your own class, so implementation is left entirely up to you. This might cause a problem on a higher-level scale if similarly named methods from different interfaces expect different data, but as far as compiler cares you're &lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/font&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="font-family: Arial;"&gt;&lt;font size="3"&gt;&lt;span style="font-size: 10pt;"&gt;okay. &lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/font&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="font-family: Arial;"&gt;&lt;font size="3"&gt; &lt;o:p&gt;&lt;/o:p&gt;&lt;/font&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="font-family: Arial;"&gt;&lt;font size="3"&gt;&lt;strong&gt;&lt;span style="font-size: 10pt;"&gt;What's the difference between an interface and abstract class?&lt;/span&gt;&lt;/strong&gt;&lt;strong&gt;&lt;span style="font-size: 10pt;"&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/strong&gt;&lt;span style="font-size: 10pt;"&gt;In the interface all methods must be abstract, in the abstract class some methods can be concrete. In the interface no accessibility modifiers are allowed, which is ok in abstract classes. &lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/font&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="font-family: Arial;"&gt;&lt;font size="3"&gt; &lt;o:p&gt;&lt;/o:p&gt;&lt;/font&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="font-family: Arial;"&gt;&lt;font size="3"&gt;&lt;strong&gt;&lt;span style="font-size: 10pt;"&gt;How can you overload a method?&lt;/span&gt;&lt;/strong&gt;&lt;strong&gt;&lt;span style="font-size: 10pt;"&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/strong&gt;&lt;span style="font-size: 10pt;"&gt;Different parameter data types, different number of parameters, different order of parameters. &lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/font&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="font-family: Arial;"&gt;&lt;font size="3"&gt; &lt;o:p&gt;&lt;/o:p&gt;&lt;/font&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="font-family: Arial;"&gt;&lt;font size="3"&gt;&lt;strong&gt;&lt;span style="font-size: 10pt;"&gt;If a base class has a bunch of overloaded constructors, and an inherited class has another bunch of overloaded constructors, can you enforce a call from an inherited constructor to an arbitrary base constructor?&lt;/span&gt;&lt;/strong&gt;&lt;strong&gt;&lt;span style="font-size: 10pt;"&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/strong&gt;&lt;span style="font-size: 10pt;"&gt;Yes, just place a colon, and then keyword base (parameter list to invoke the appropriate constructor) in the overloaded constructor definition inside the inherited class. &lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/font&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="font-family: Arial;"&gt;&lt;font size="3"&gt; &lt;o:p&gt;&lt;/o:p&gt;&lt;/font&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="font-family: Arial;"&gt;&lt;font size="3"&gt;&lt;strong&gt;&lt;span style="font-size: 10pt;"&gt;What's the difference between System.String and System.StringBuilder classes? &lt;/span&gt;&lt;/strong&gt;&lt;strong&gt;&lt;span style="font-size: 10pt;"&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/strong&gt;&lt;span style="font-size: 10pt;"&gt;System.String is immutable, System.StringBuilder was designed with the purpose of having a mutable string where a variety of operations can be performed. &lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/font&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="font-family: Arial;"&gt;&lt;font size="3"&gt; &lt;o:p&gt;&lt;/o:p&gt;&lt;/font&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="font-family: Arial;"&gt;&lt;font size="3"&gt;&lt;strong&gt;&lt;span style="font-size: 10pt;"&gt;Does C# support multiple-inheritance?&lt;/span&gt;&lt;/strong&gt;&lt;span style="font-size: 10pt;"&gt;&lt;br /&gt;
No, use interfaces instead.&lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/font&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="font-family: Arial;"&gt;&lt;font size="3"&gt; &lt;o:p&gt;&lt;/o:p&gt;&lt;/font&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="font-family: Arial;"&gt;&lt;font size="3"&gt;&lt;strong&gt;&lt;span style="font-size: 10pt;"&gt;When you inherit a protected class-level variable, who is it available to?&lt;/span&gt;&lt;/strong&gt;&lt;strong&gt;&lt;span style="font-size: 10pt;"&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/strong&gt;&lt;span style="font-size: 10pt;"&gt;Classes in the same namespace.&lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/font&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="font-family: Arial;"&gt;&lt;font size="3"&gt; &lt;o:p&gt;&lt;/o:p&gt;&lt;/font&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="font-family: Arial;"&gt;&lt;font size="3"&gt;&lt;strong&gt;&lt;span style="font-size: 10pt;"&gt;Are private class-level variables inherited?&lt;/span&gt;&lt;/strong&gt;&lt;span style="font-size: 10pt;"&gt;&lt;br /&gt;
Yes, but they are not accessible.  Although they are not visible or accessible via the class interface, they are inherited.&lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/font&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="font-family: Arial;"&gt;&lt;font size="3"&gt; &lt;o:p&gt;&lt;/o:p&gt;&lt;/font&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="font-family: Arial;"&gt;&lt;font size="3"&gt;&lt;strong&gt;&lt;span style="font-size: 10pt;"&gt;Describe the accessibility modifier "protected internal".&lt;/span&gt;&lt;/strong&gt;&lt;strong&gt;&lt;span style="font-size: 10pt;"&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/strong&gt;&lt;span style="font-size: 10pt;"&gt;It is available to derived classes and classes within the same Assembly (and naturally from the base class it's declared in).&lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/font&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="font-family: Arial;"&gt;&lt;font size="3"&gt; &lt;o:p&gt;&lt;/o:p&gt;&lt;/font&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="font-family: Arial;"&gt;&lt;font size="3"&gt;&lt;strong&gt;&lt;span style="font-size: 10pt;"&gt;What's the top .NET class that everything is derived from?&lt;/span&gt;&lt;/strong&gt;&lt;span style="font-size: 10pt;"&gt;&lt;br /&gt;
System.Object.&lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/font&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="font-family: Arial;"&gt;&lt;font size="3"&gt; &lt;o:p&gt;&lt;/o:p&gt;&lt;/font&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="font-family: Arial;"&gt;&lt;font size="3"&gt;&lt;strong&gt;&lt;span style="font-size: 10pt;"&gt;What's the advantage of using System.Text.StringBuilder over System.String?&lt;/span&gt;&lt;/strong&gt;&lt;strong&gt;&lt;span style="font-size: 10pt;"&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/strong&gt;&lt;span style="font-size: 10pt;"&gt;StringBuilder is more efficient in cases where there is a large amount of string manipulation.  Strings are immutable, so each time it's being operated on, a new instance is created.&lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/font&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="font-family: Arial;"&gt;&lt;font size="3"&gt; &lt;o:p&gt;&lt;/o:p&gt;&lt;/font&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="font-family: Arial;"&gt;&lt;font size="3"&gt;&lt;strong&gt;&lt;span style="font-size: 10pt;"&gt;Can you store multiple data types in System.Array?&lt;/span&gt;&lt;/strong&gt;&lt;span style="font-size: 10pt;"&gt;&lt;br /&gt;
No.&lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/font&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="font-family: Arial;"&gt;&lt;font size="3"&gt; &lt;o:p&gt;&lt;/o:p&gt;&lt;/font&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="font-family: Arial;"&gt;&lt;font size="3"&gt;&lt;strong&gt;&lt;span style="font-size: 10pt;"&gt;What's the .NET class that allows the retrieval of a data element using a unique key?&lt;/span&gt;&lt;/strong&gt;&lt;strong&gt;&lt;span style="font-size: 10pt;"&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/strong&gt;&lt;span style="font-size: 10pt;"&gt;HashTable.&lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/font&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="font-family: Arial;"&gt;&lt;font size="3"&gt; &lt;o:p&gt;&lt;/o:p&gt;&lt;/font&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="font-family: Arial;"&gt;&lt;font size="3"&gt;&lt;strong&gt;&lt;span style="font-size: 10pt;"&gt;Will the finally block get executed if an exception has not occurred?&lt;/span&gt;&lt;/strong&gt;&lt;strong&gt;&lt;span style="font-size: 10pt;"&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/strong&gt;&lt;span style="font-size: 10pt;"&gt;Yes.&lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/font&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="font-family: Arial;"&gt;&lt;font size="3"&gt; &lt;o:p&gt;&lt;/o:p&gt;&lt;/font&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="font-family: Arial;"&gt;&lt;font size="3"&gt;&lt;strong&gt;&lt;span style="font-size: 10pt;"&gt;What's an abstract class?&lt;/span&gt;&lt;/strong&gt;&lt;strong&gt;&lt;span style="font-size: 10pt;"&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/strong&gt;&lt;span style="font-size: 10pt;"&gt;A class that cannot be instantiated.  An abstract class is a class that must be inherited and have the methods overridden. An abstract class is essentially a blueprint for a class without any implementation.&lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/font&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="font-family: Arial;"&gt;&lt;font size="3"&gt;&lt;br /&gt;
&lt;strong&gt;&lt;span style="font-size: 10pt;"&gt;When do you absolutely have to declare a class as abstract?&lt;/span&gt;&lt;/strong&gt;&lt;strong&gt;&lt;span style="font-size: 10pt;"&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/strong&gt;&lt;span style="font-size: 10pt;"&gt; 1.       When at least one of the methods in the class is abstract.&lt;br /&gt;
 2.       When the class itself is inherited from an abstract class, but not all base abstract methods have been overridden.&lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/font&gt; &lt;/p&gt;
&lt;p class="MsoNormal" style="font-family: Arial;"&gt;&lt;font size="3"&gt; &lt;o:p&gt;&lt;/o:p&gt;&lt;/font&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="font-family: Arial;"&gt;&lt;font size="3"&gt;&lt;strong&gt;&lt;span style="font-size: 10pt;"&gt;What's an interface?&lt;/span&gt;&lt;/strong&gt;&lt;span style="font-size: 10pt;"&gt;&lt;br /&gt;
It's an abstract class with public abstract methods all of which must be implemented in the inherited classes. &lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/font&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="font-family: Arial;"&gt;&lt;font size="3"&gt; &lt;o:p&gt;&lt;/o:p&gt;&lt;/font&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="font-family: Arial;"&gt;&lt;font size="3"&gt;&lt;strong&gt;&lt;span style="font-size: 10pt;"&gt;Why can't you specify the accessibility modifier for methods inside the interface?&lt;/span&gt;&lt;/strong&gt;&lt;strong&gt;&lt;span style="font-size: 10pt;"&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/strong&gt;&lt;span style="font-size: 10pt;"&gt;They all must be public.  Therefore, to prevent you from getting the false impression that you have any freedom of choice,   &lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/font&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="font-family: Arial;"&gt;&lt;font size="3"&gt;&lt;span style="font-size: 10pt;"&gt;you are not allowed to specify any accessibility, it's public by default.&lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/font&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="font-family: Arial;"&gt;&lt;font size="3"&gt; &lt;o:p&gt;&lt;/o:p&gt;&lt;/font&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="font-family: Arial;"&gt;&lt;font size="3"&gt;&lt;strong&gt;&lt;span style="font-size: 10pt;"&gt;What's the difference between an interface and abstract class?&lt;/span&gt;&lt;/strong&gt;&lt;strong&gt;&lt;span style="font-size: 10pt;"&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/strong&gt;&lt;span style="font-size: 10pt;"&gt;In an interface class, all methods must be abstract.  In an abstract class some methods can be concrete.  In an interface class, no accessibility modifiers are allowed, which is ok in an abstract class.&lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/font&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="font-family: Arial;"&gt;&lt;font size="3"&gt; &lt;o:p&gt;&lt;/o:p&gt;&lt;/font&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="font-family: Arial;"&gt;&lt;font size="3"&gt;&lt;strong&gt;&lt;span style="font-size: 10pt;"&gt;How is method overriding different from method overloading?&lt;/span&gt;&lt;/strong&gt;&lt;strong&gt;&lt;span style="font-size: 10pt;"&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/strong&gt;&lt;span style="font-size: 10pt;"&gt;When overriding a method, you change the behavior of the method for the derived class.  Overloading a method simply  involves &lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/font&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="font-family: Arial;"&gt;&lt;font size="3"&gt;&lt;span style="font-size: 10pt;"&gt;having another method with the same name within the class.&lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/font&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="font-family: Arial;"&gt;&lt;font size="3"&gt; &lt;o:p&gt;&lt;/o:p&gt;&lt;/font&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="font-family: Arial;"&gt;&lt;font size="3"&gt;&lt;strong&gt;&lt;span style="font-size: 10pt;"&gt;Can you declare an override method to be static if the original method is non-static?&lt;/span&gt;&lt;/strong&gt;&lt;strong&gt;&lt;span style="font-size: 10pt;"&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/strong&gt;&lt;span style="font-size: 10pt;"&gt;No. The signature of the virtual method must remain the same, only the keyword virtual is changed to keyword override.&lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/font&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="font-family: Arial;"&gt;&lt;font size="3"&gt; &lt;o:p&gt;&lt;/o:p&gt;&lt;/font&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="font-family: Arial;"&gt;&lt;font size="3"&gt;&lt;strong&gt;&lt;span style="font-size: 10pt;"&gt;Can you override private virtual methods?&lt;/span&gt;&lt;/strong&gt;&lt;strong&gt;&lt;span style="font-size: 10pt;"&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/strong&gt;&lt;span style="font-size: 10pt;"&gt;No.  Private methods are not accessible outside the class.&lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/font&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="font-family: Arial;"&gt;&lt;font size="3"&gt; &lt;o:p&gt;&lt;/o:p&gt;&lt;/font&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="font-family: Arial;"&gt;&lt;font size="3"&gt;&lt;strong&gt;&lt;span style="font-size: 10pt;"&gt;What's a delegate?&lt;/span&gt;&lt;/strong&gt;&lt;strong&gt;&lt;span style="font-size: 10pt;"&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/strong&gt;&lt;span style="font-size: 10pt;"&gt;A delegate object encapsulates a reference to a method.&lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/font&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="font-family: Arial;"&gt;&lt;font size="3"&gt; &lt;o:p&gt;&lt;/o:p&gt;&lt;/font&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="font-family: Arial;"&gt;&lt;font size="3"&gt;&lt;strong&gt;&lt;span style="font-size: 10pt;"&gt;What's a multicast delegate?&lt;/span&gt;&lt;/strong&gt;&lt;span style="font-size: 10pt;"&gt;&lt;br /&gt;
It's a delegate that points to and eventually fires off several methods&lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/font&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="font-family: Arial;"&gt;&lt;font size="3"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/font&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="font-family: Arial;"&gt;&lt;font size="3"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/font&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="font-family: Arial;"&gt;&lt;font size="3"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/font&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="font-family: Arial;"&gt;&lt;font size="3"&gt;&lt;strong&gt;&lt;u&gt;&lt;span style="font-size: 14pt;"&gt;Forms:&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/u&gt;&lt;/strong&gt;&lt;/font&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="font-family: Arial;"&gt;&lt;font size="3"&gt;&lt;strong&gt;&lt;u&gt;&lt;span style="font-size: 14pt;"&gt;&lt;o:p&gt;&lt;span style="text-decoration: none;"&gt; &lt;/span&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/u&gt;&lt;/strong&gt;&lt;/font&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="font-family: Arial;"&gt;&lt;font size="3"&gt;&lt;strong&gt;&lt;span style="font-size: 10pt; color: maroon;"&gt;Can you write a class without specifying namespace? Which namespace does it belong to by default??&lt;/span&gt;&lt;/strong&gt;&lt;strong&gt;&lt;span style="font-size: 10pt; color: maroon;"&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/strong&gt;&lt;span style="font-size: 10pt;"&gt;Yes, you can, then the class belongs to global namespace which has no name. For commercial products, naturally, you  wouldn't want global namespace. &lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/font&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="font-family: Arial;"&gt;&lt;font size="3"&gt; &lt;o:p&gt;&lt;/o:p&gt;&lt;/font&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="font-family: Arial;"&gt;&lt;font size="3"&gt;&lt;strong&gt;&lt;span style="font-size: 10pt; color: maroon;"&gt;You are designing a GUI application with a windows and several widgets on it. The user then resizes the app window and sees a lot of grey space, while the widgets stay in place. What's the problem? &lt;/span&gt;&lt;/strong&gt;&lt;strong&gt;&lt;span style="font-size: 10pt; color: maroon;"&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/strong&gt;&lt;span style="font-size: 10pt;"&gt;One should use anchoring for correct resizing. Otherwise the default property of a widget on a form is top-left, so it stays at  the same location when resized. &lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/font&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="font-family: Arial;"&gt;&lt;font size="3"&gt; &lt;o:p&gt;&lt;/o:p&gt;&lt;/font&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="font-family: Arial;"&gt;&lt;font size="3"&gt;&lt;strong&gt;&lt;span style="font-size: 10pt; color: maroon;"&gt;How can you save the desired properties of Windows Forms application? &lt;/span&gt;&lt;/strong&gt;&lt;strong&gt;&lt;span style="font-size: 10pt; color: maroon;"&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/strong&gt;&lt;span style="font-size: 10pt;"&gt;.config files in .NET are supported through the API to allow storing and retrieving information. They are nothing more than simple XML files, sort of like what .ini files were before for Win32 apps. &lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/font&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="font-family: Arial;"&gt;&lt;font size="3"&gt; &lt;o:p&gt;&lt;/o:p&gt;&lt;/font&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="font-family: Arial;"&gt;&lt;font size="3"&gt;&lt;strong&gt;&lt;span style="font-size: 10pt; color: maroon;"&gt;So how do you retrieve the customized properties of a .NET application from XML .config file? &lt;/span&gt;&lt;/strong&gt;&lt;strong&gt;&lt;span style="font-size: 10pt; color: maroon;"&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/strong&gt;&lt;span style="font-size: 10pt;"&gt;Initialize an instance of AppSettingsReader class. Call the GetValue method of AppSettingsReader class, passing in the name of the property and the type expected. Assign the result to the appropriate variable. &lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/font&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="font-family: Arial;"&gt;&lt;font size="3"&gt; &lt;o:p&gt;&lt;/o:p&gt;&lt;/font&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="font-family: Arial;"&gt;&lt;font size="3"&gt;&lt;strong&gt;&lt;span style="font-size: 10pt; color: maroon;"&gt;Can you automate this process? &lt;/span&gt;&lt;/strong&gt;&lt;span style="font-size: 10pt;"&gt;&lt;br /&gt;
In Visual Studio yes, use Dynamic Properties for automatic .config creation, storage and retrieval. &lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/font&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="font-family: Arial;"&gt;&lt;font size="3"&gt; &lt;o:p&gt;&lt;/o:p&gt;&lt;/font&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="font-family: Arial;"&gt;&lt;font size="3"&gt;&lt;strong&gt;&lt;span style="font-size: 10pt; color: maroon;"&gt;My progress bar freezes up and dialog window shows blank, when an intensive background process takes over. &lt;/span&gt;&lt;/strong&gt;&lt;strong&gt;&lt;span style="font-size: 10pt; color: maroon;"&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/strong&gt;&lt;span style="font-size: 10pt;"&gt;Yes, you should've multi-threaded your GUI, with taskbar and main form being one thread, and the background process being the other. &lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/font&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="font-family: Arial;"&gt;&lt;font size="3"&gt; &lt;o:p&gt;&lt;/o:p&gt;&lt;/font&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="font-family: Arial;"&gt;&lt;font size="3"&gt;&lt;strong&gt;&lt;span style="font-size: 10pt; color: maroon;"&gt;What's the safest way to deploy a Windows Forms app?&lt;/span&gt;&lt;/strong&gt;&lt;span style="font-size: 10pt; color: maroon;"&gt;&lt;br /&gt;
&lt;/span&gt;&lt;span style="font-size: 10pt;"&gt;Web deployment: the user always downloads the latest version of the code, the program runs within security sandbox, properly written app will not require additional security privileges. &lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/font&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="font-family: Arial;"&gt;&lt;font size="3"&gt; &lt;o:p&gt;&lt;/o:p&gt;&lt;/font&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="font-family: Arial;"&gt;&lt;font size="3"&gt;&lt;strong&gt;&lt;span style="font-size: 10pt; color: maroon;"&gt;Why is it not a good idea to insert code into InitializeComponent method when working with Visual Studio? &lt;/span&gt;&lt;/strong&gt;&lt;strong&gt;&lt;span style="font-size: 10pt; color: maroon;"&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/strong&gt;&lt;span style="font-size: 10pt;"&gt;The designer will likely through it away, most of the code inside InitializeComponent is auto-generated. &lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/font&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="font-family: Arial;"&gt;&lt;font size="3"&gt; &lt;o:p&gt;&lt;/o:p&gt;&lt;/font&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="font-family: Arial;"&gt;&lt;font size="3"&gt;&lt;strong&gt;&lt;span style="font-size: 10pt; color: maroon;"&gt;What's the difference between WindowsDefaultLocation and WindowsDefaultBounds?&lt;/span&gt;&lt;/strong&gt;&lt;span style="font-size: 10pt;"&gt;&lt;br /&gt;
WindowsDefaultLocation tells the form to start up at a location selected by OS, but with internally specified size. WindowsDefaultBounds delegates both size and starting position choices to the OS. &lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/font&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="font-family: Arial;"&gt;&lt;font size="3"&gt; &lt;o:p&gt;&lt;/o:p&gt;&lt;/font&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="font-family: Arial;"&gt;&lt;font size="3"&gt;&lt;strong&gt;&lt;span style="font-size: 10pt; color: maroon;"&gt;What's the difference between Move and LocationChanged? Resize and SizeChanged? &lt;/span&gt;&lt;/strong&gt;&lt;strong&gt;&lt;span style="font-size: 10pt; color: maroon;"&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/strong&gt;&lt;span style="font-size: 10pt;"&gt;Both methods do the same, Move and Resize are the names adopted from VB to ease migration to C#. &lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/font&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="font-family: Arial;"&gt;&lt;font size="3"&gt; &lt;o:p&gt;&lt;/o:p&gt;&lt;/font&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="font-family: Arial;"&gt;&lt;font size="3"&gt;&lt;strong&gt;&lt;span style="font-size: 10pt; color: maroon;"&gt;How would you create a non-rectangular window, let's say an ellipse? &lt;/span&gt;&lt;/strong&gt;&lt;span style="font-size: 10pt;"&gt;&lt;br /&gt;
Create a rectangular form, set the TransparencyKey property to the same value as BackColor, which will effectively make the background of the form transparent. Then set the FormBorderStyle to FormBorderStyle.None, which will remove the contour and contents of the form. &lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/font&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="font-family: Arial;"&gt;&lt;font size="3"&gt; &lt;o:p&gt;&lt;/o:p&gt;&lt;/font&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="font-family: Arial;"&gt;&lt;font size="3"&gt;&lt;strong&gt;&lt;span style="font-size: 10pt; color: maroon;"&gt;How do you create a separator in the Menu Designer? &lt;/span&gt;&lt;/strong&gt;&lt;strong&gt;&lt;span style="font-size: 10pt; color: maroon;"&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/strong&gt;&lt;span style="font-size: 10pt;"&gt;A hyphen '-' would do it. Also, an ampersand '&amp;amp;\' would underline the next letter. &lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/font&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="font-family: Arial;"&gt;&lt;font size="3"&gt; &lt;o:p&gt;&lt;/o:p&gt;&lt;/font&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="font-family: Arial;"&gt;&lt;font size="3"&gt;&lt;strong&gt;&lt;span style="font-size: 10pt; color: maroon;"&gt;How's anchoring different from docking? &lt;/span&gt;&lt;/strong&gt;&lt;strong&gt;&lt;span style="font-size: 10pt;"&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/strong&gt;&lt;span style="font-size: 10pt;"&gt;Anchoring treats the component as having the absolute size and adjusts its location relative to the parent form. Docking  treats the component location as absolute and disregards the component size. So if a status bar must always be at the bottom no matter what, use docking. If a button should be on the top right, but change its position with the form being resized, use anchoring. &lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/font&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="font-family: Arial;"&gt;&lt;font size="3"&gt; &lt;o:p&gt;&lt;/o:p&gt;&lt;/font&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="font-family: Arial;"&gt;&lt;font size="3"&gt;&lt;strong&gt;&lt;span style="font-size: 10pt; color: maroon;"&gt;How do you trigger the Paint event in System.Drawing?&lt;/span&gt;&lt;/strong&gt;&lt;strong&gt;&lt;span style="font-size: 10pt; color: maroon;"&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/strong&gt;&lt;span style="font-size: 10pt;"&gt;Invalidate the current form, the OS will take care of repainting. The Update method forces the repaint. &lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/font&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="font-family: Arial;"&gt;&lt;font size="3"&gt; &lt;o:p&gt;&lt;/o:p&gt;&lt;/font&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="font-family: Arial;"&gt;&lt;font size="3"&gt;&lt;strong&gt;&lt;span style="font-size: 10pt; color: maroon;"&gt;With these events, why wouldn't Microsoft combine Invalidate and Paint, so that you wouldn't have to tell it to repaint, and then to force it to repaint?&lt;/span&gt;&lt;/strong&gt;&lt;strong&gt;&lt;span style="font-size: 10pt; color: maroon;"&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/strong&gt;&lt;span style="font-size: 10pt;"&gt;Painting is the slowest thing the OS does, so usually telling it to repaint, but not forcing it allows for the process to take place in the background. &lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/font&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="font-family: Arial;"&gt;&lt;font size="3"&gt; &lt;o:p&gt;&lt;/o:p&gt;&lt;/font&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="font-family: Arial;"&gt;&lt;font size="3"&gt;&lt;strong&gt;&lt;span style="font-size: 10pt; color: maroon;"&gt;How can you assign an RGB color to a System.Drawing.Color object?&lt;/span&gt;&lt;/strong&gt;&lt;strong&gt;&lt;span style="font-size: 10pt; color: maroon;"&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/strong&gt;&lt;span style="font-size: 10pt;"&gt;Call the static method FromArgb of this class and pass it the RGB values. &lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/font&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="font-family: Arial;"&gt;&lt;font size="3"&gt; &lt;o:p&gt;&lt;/o:p&gt;&lt;/font&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="font-family: Arial;"&gt;&lt;font size="3"&gt;&lt;strong&gt;&lt;span style="font-size: 10pt; color: maroon;"&gt;What class does Icon derive from? &lt;/span&gt;&lt;/strong&gt;&lt;span style="font-size: 10pt;"&gt;&lt;br /&gt;
Isn't it just a Bitmap with a wrapper name around it? No, Icon lives in System.Drawing namespace. It's not a Bitmap by default, and is treated separately by .NET. However, you can use ToBitmap method to get a valid Bitmap object from a valid Icon object. &lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/font&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="font-family: Arial;"&gt;&lt;font size="3"&gt; &lt;o:p&gt;&lt;/o:p&gt;&lt;/font&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="font-family: Arial;"&gt;&lt;font size="3"&gt;&lt;strong&gt;&lt;span style="font-size: 10pt; color: maroon;"&gt;Before in my VB app I would just load the icons from DLL. How can I load the icons provided by .NET dynamically? &lt;/span&gt;&lt;/strong&gt;&lt;strong&gt;&lt;span style="font-size: 10pt; color: maroon;"&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/strong&gt;&lt;span style="font-size: 10pt;"&gt;By using System.Drawing.SystemIcons class, for example System.Drawing.SystemIcons.Warning produces an Icon with a  warning sign in it. &lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/font&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="font-family: Arial;"&gt;&lt;font size="3"&gt; &lt;o:p&gt;&lt;/o:p&gt;&lt;/font&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="font-family: Arial;"&gt;&lt;font size="3"&gt;&lt;strong&gt;&lt;span style="font-size: 10pt; color: maroon;"&gt;When displaying fonts, what's the difference between pixels, points and ems? &lt;/span&gt;&lt;/strong&gt;&lt;span style="font-size: 10pt;"&gt;&lt;br /&gt;
A pixel is the lowest-resolution dot the computer monitor supports. Its size depends on user's settings and monitor size. A point is always 1/72 of an inch. An em is the number of pixels that it takes to display the letter M. &lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/font&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="font-family: Arial;"&gt;&lt;font size="3"&gt;&lt;strong&gt;&lt;u&gt;&lt;o:p&gt;&lt;span style="text-decoration: none;"&gt; &lt;/span&gt;&lt;/o:p&gt;&lt;/u&gt;&lt;/strong&gt;&lt;/font&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="font-family: Arial;"&gt;&lt;font size="3"&gt;&lt;strong&gt;&lt;u&gt;&lt;o:p&gt;&lt;span style="text-decoration: none;"&gt; &lt;/span&gt;&lt;/o:p&gt;&lt;/u&gt;&lt;/strong&gt;&lt;/font&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="font-family: Arial;"&gt;&lt;font size="3"&gt;&lt;strong&gt;&lt;u&gt;&lt;o:p&gt;&lt;span style="text-decoration: none;"&gt; &lt;/span&gt;&lt;/o:p&gt;&lt;/u&gt;&lt;/strong&gt;&lt;/font&gt;&lt;/p&gt;
&lt;h1 style="font-family: Arial;"&gt;&lt;font size="3"&gt;ASP.net&lt;/font&gt;&lt;/h1&gt;
&lt;p class="MsoNormal" style="font-family: Arial;"&gt;&lt;font size="3"&gt;&lt;strong&gt;&lt;u&gt;&lt;o:p&gt;&lt;span style="text-decoration: none;"&gt; &lt;/span&gt;&lt;/o:p&gt;&lt;/u&gt;&lt;/strong&gt;&lt;/font&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="font-family: Arial;"&gt;&lt;font size="3"&gt;&lt;strong&gt;&lt;u&gt;&lt;o:p&gt;&lt;span style="text-decoration: none;"&gt; &lt;/span&gt;&lt;/o:p&gt;&lt;/u&gt;&lt;/strong&gt;&lt;/font&gt;&lt;/p&gt;
&lt;p style="font-family: Arial;"&gt;&lt;font size="3"&gt;&lt;strong&gt;&lt;span style="font-size: 10pt; color: maroon;"&gt;What is view state and use of it?&lt;/span&gt;&lt;/strong&gt;&lt;strong&gt;&lt;span style="font-size: 10pt; color: maroon;"&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/strong&gt;&lt;span style="font-size: 10pt;"&gt;The current property settings of an ASP.NET page and those of any ASP.NET server controls contained within the page. ASP.NET can detect when a form is requested for the first time versus when the form is posted (sent to the server), which  allows you to program accordingly.&lt;br /&gt;
&lt;br /&gt;
&lt;strong&gt;&lt;span style="color: maroon;"&gt;What are user controls and custom controls?&lt;/span&gt;&lt;/strong&gt;&lt;strong&gt;&lt;span style="color: maroon;"&gt;&lt;br /&gt;
&lt;/span&gt;&lt;strong&gt;Custom controls:&lt;/strong&gt;&lt;/strong&gt;&lt;br /&gt;
 A control authored by a user or a third-party software vendor that does not belong to   the .NET Framework class library. This is a generic term that includes user controls. A  custom server control is used in Web Forms (ASP.NET pages). A custom client control is used  in Windows Forms applications.&lt;br /&gt;
&lt;br /&gt;
&lt;strong&gt;User Controls:&lt;/strong&gt;&lt;strong&gt;&lt;br /&gt;
&lt;/strong&gt;In ASP.NET: A user-authored server control that enables an ASP.NET page to be re-used   as a server control. An ASP.NET user control is authored declaratively  and persisted as a  text file with an .ascx extension. The ASP.NET page framework compiles a user control on  the fly to a class that derives from the        System.Web.UI.UserControl class.&lt;br /&gt;
&lt;br /&gt;
&lt;strong&gt;&lt;span style="color: maroon;"&gt;What are the validation controls?&lt;/span&gt;&lt;/strong&gt;&lt;span style="color: maroon;"&gt;&lt;br /&gt;
&lt;/span&gt;A set of server controls included with ASP.NET that test user input in HTML and Web server  controls for programmer-defined requirements. Validation controls perform input checking in server code. If the user is working with a browser that supports DHTML, the validation  controls can also perform validation using client script.&lt;br /&gt;
&lt;br /&gt;
&lt;strong&gt;&lt;span style="color: maroon;"&gt;What's the difference between Response.Write() andResponse.Output.Write()?&lt;/span&gt;&lt;/strong&gt;&lt;strong&gt;&lt;span style="color: maroon;"&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/strong&gt;The latter one allows you to write formattedoutput.&lt;br /&gt;
&lt;br /&gt;
&lt;strong&gt;&lt;span style="color: maroon;"&gt;What methods are fired during the page load? Init()&lt;/span&gt;&lt;/strong&gt;&lt;strong&gt;&lt;span style="color: maroon;"&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/strong&gt; 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.&lt;br /&gt;
&lt;br /&gt;
&lt;strong&gt;&lt;span style="color: maroon;"&gt;Where does the Web page belong in the .NET Framework class hierarchy?&lt;/span&gt;&lt;/strong&gt;&lt;strong&gt;&lt;span style="color: maroon;"&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/strong&gt;System.Web.UI.Page&lt;br /&gt;
&lt;br /&gt;
&lt;strong&gt;&lt;span style="color: maroon;"&gt;Where do you store the information about the user's locale?&lt;/span&gt;&lt;/strong&gt;&lt;strong&gt;&lt;span style="color: maroon;"&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/strong&gt;System.Web.UI.Page.Culture&lt;br /&gt;
&lt;br /&gt;
&lt;strong&gt;&lt;span style="color: maroon;"&gt;What's the difference between Codebehind="MyCode.aspx.cs" and Src="MyCode.aspx.cs"?&lt;/span&gt;&lt;/strong&gt;&lt;strong&gt;&lt;span style="color: maroon;"&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/strong&gt;CodeBehind is relevant to Visual Studio.NET only.&lt;br /&gt;
&lt;br /&gt;
&lt;strong&gt;&lt;span style="color: maroon;"&gt;What's a bubbled event?&lt;/span&gt;&lt;/strong&gt;&lt;strong&gt;&lt;br /&gt;
&lt;/strong&gt;When you have a complex control, likeDataGrid, writing an event processing routine for each object (cell, button,row, etc.) is quite tedious. The controls can bubble up their eventhandlers, allowing the main DataGrid event handler to take care of its constituents.&lt;br /&gt;
Suppose you want a certain ASP.NET function executed on MouseOver over a certain button.&lt;br /&gt;
&lt;br /&gt;
&lt;strong&gt;&lt;span style="color: maroon;"&gt;Where do you add an event handler?&lt;/span&gt;&lt;/strong&gt;&lt;strong&gt;&lt;span style="color: maroon;"&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/strong&gt;It's the Attributesproperty, the Add function inside that property.            &lt;br /&gt;
e.g. btnSubmit.Attributes.Add("onMouseOver","someClientCode();")&lt;br /&gt;
&lt;br /&gt;
&lt;strong&gt;&lt;span style="color: maroon;"&gt;What data type does the RangeValidator control support?&lt;/span&gt;&lt;/strong&gt;&lt;strong&gt;&lt;span style="color: maroon;"&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/strong&gt;Integer,String and Date.&lt;br /&gt;
&lt;br /&gt;
&lt;strong&gt;&lt;span style="color: maroon;"&gt;What are the different types of caching?&lt;/span&gt;&lt;/strong&gt;&lt;strong&gt;&lt;br /&gt;
&lt;/strong&gt;Caching is a technique widely used in computing to increase performance by keeping frequently accessed or expensive data in memory. In context of web application, caching is used to retain the pages or data across HTTP requests and reuse them without the expense of recreating them.ASP.NET has 3 kinds of caching strategiesOutput CachingFragment CachingData     &lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/font&gt;&lt;/p&gt;
&lt;p style="font-family: Arial;"&gt;&lt;font size="3"&gt;&lt;strong&gt;&lt;span style="font-size: 10pt;"&gt;CachingOutput Caching: &lt;/span&gt;&lt;/strong&gt;&lt;span style="font-size: 10pt;"&gt;Caches the dynamic output generated by a request. Some times it is useful to cache  the output of a website even for a minute, which will result in a better  performance. For caching the whole page the page should have OutputCache directive.&amp;lt;%@ OutputCache Duration="60" VaryByParam="state" %&amp;gt;&lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/font&gt;&lt;/p&gt;
&lt;p style="font-family: Arial;"&gt;&lt;font size="3"&gt;&lt;strong&gt;&lt;span style="font-size: 10pt;"&gt;Fragment Caching:&lt;/span&gt;&lt;/strong&gt;&lt;span style="font-size: 10pt;"&gt; Caches the portion of the  page generated by the request. Some times it is not practical to cache the entire page, in such cases we can cache a portion of page&amp;lt;%@ OutputCache Duration="120" VaryByParam="CategoryID;SelectedID"%&amp;gt;&lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/font&gt;&lt;/p&gt;
&lt;p style="font-family: Arial;"&gt;&lt;font size="3"&gt;&lt;strong&gt;&lt;span style="font-size: 10pt;"&gt;Data Caching:&lt;/span&gt;&lt;/strong&gt;&lt;span style="font-size: 10pt;"&gt; Caches the objects programmatically. For     data caching asp.net provides a cache object for eg: cache["States"] = dsStates;&lt;br /&gt;
&lt;br /&gt;
&lt;strong&gt;&lt;span style="color: maroon;"&gt;What do you mean by authentication and authorization?&lt;/span&gt;&lt;/strong&gt;&lt;strong&gt;&lt;span style="color: maroon;"&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/strong&gt;Authentication is the process of validating a user on the credentials (username and     password) and authorization performs after authentication. After Authentication a user will     be verified for performing the various tasks, It access is limited it is known as       authorization.&lt;br /&gt;
&lt;br /&gt;
&lt;strong&gt;&lt;span style="color: maroon;"&gt;What are different types of directives in .NET?&lt;/span&gt;&lt;/strong&gt;&lt;strong&gt;&lt;br /&gt;
&lt;strong&gt;@Page&lt;/strong&gt;&lt;/strong&gt;: Defines page-specific attributes used by the ASP.NET page parser and compiler. Can       be included only in .aspx files &amp;lt;%@ Page AspCompat="TRUE" language="C#" %&amp;gt;  &lt;br /&gt;
&lt;strong&gt;@Control&lt;/strong&gt;:Defines control-specific attributes used by the ASP.NET page parser and        compiler. Can be included only in .ascx files. &amp;lt;%@ Control Language="VB" EnableViewState="false" %&amp;gt;&lt;br /&gt;
&lt;strong&gt;@Import&lt;/strong&gt;: Explicitly imports a namespace into a page or user control. The Import         directive cannot have more than one namespace attribute. To import multiple     namespaces,     use multiple @Import directives. &amp;lt;% @ Import Namespace="System.web" %&amp;gt;&lt;br /&gt;
&lt;strong&gt;@Implements&lt;/strong&gt;: Indicates that the current page or user control implements the specified .NET      framework interface.&amp;lt;%@ Implements Interface="System.Web.UI.IPostBackEventHandler" %&amp;gt;&lt;br /&gt;
&lt;strong&gt;@Register&lt;/strong&gt;: Associates aliases with namespaces and class names for concise notation in   custom server control syntax.&amp;lt;%@ Register Tagprefix="Acme" Tagname="AdRotator" Src="AdRotator.ascx" %&amp;gt;&lt;br /&gt;
&lt;strong&gt;@Assembly&lt;/strong&gt;: Links an assembly to the current page during compilation, making all         the     assembly's classes and interfaces available for use on the      page. &amp;lt;%@ Assembly Name="MyAssembly" %&amp;gt;&amp;lt;%@ Assembly Src="MySource.vb" %&amp;gt;&lt;br /&gt;
&lt;strong&gt;@OutputCache&lt;/strong&gt;: Declaratively controls the output caching policies of an ASP.NET page or a        user control contained in a page&amp;lt;%@ OutputCache Duration="#ofseconds" Location="Any | Client | Downstream | Server | None" Shared="True | False" VaryByControl="controlname" VaryByCustom="browser | customstring" VaryByHeader="headers" VaryByParam="parametername" %&amp;gt;&lt;br /&gt;
&lt;strong&gt;@Reference&lt;/strong&gt;: Declaratively indicates that another user control or page source file               should be dynamically compiled and linked against the page in which this directive is   declared.&lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/font&gt;&lt;/p&gt;
&lt;p style="margin-bottom: 12pt; font-family: Arial;"&gt;&lt;font size="3"&gt;&lt;strong&gt;&lt;span style="font-size: 10pt; color: maroon;"&gt;How do I debug an ASP.NET application that wasn't written with Visual Studio.NET and that doesn't use code-behind?&lt;/span&gt;&lt;/strong&gt;&lt;strong&gt;&lt;span style="font-size: 10pt; color: maroon;"&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/strong&gt;&lt;span style="font-size: 10pt;"&gt;Start the DbgClr debugger that comes with the .NET Framework SDK, open the file containing      the code you want to debug, and set your breakpoints. Start the ASP.NET application. Go back to DbgClr, choose Debug Processes from the Tools menu, and select  aspnet_wp.exe from  the list of processes. (If aspnet_wp.exe doesn't appear in the list,check the "Show system      processes" box.) Click the Attach button to attach to aspnet_wp.exe and begin debugging.&lt;br /&gt;
Be sure to enable debugging in the ASPX file before debugging it with DbgClr. You can   enable tell ASP.NET to build debug executables by placing a&lt;br /&gt;
&amp;lt;%@ Page Debug="true" %&amp;gt;   statement at the top of an ASPX file or a   &amp;lt;COMPILATION debug="true" /&amp;gt;statement in a Web.config file.&lt;br /&gt;
 &lt;br /&gt;
&lt;strong&gt;&lt;span style="color: maroon;"&gt;Can a user browsing my Web site read my Web.config or Global.asax files?&lt;/span&gt;&lt;/strong&gt;&lt;strong&gt;&lt;br /&gt;
&lt;/strong&gt;No. The &amp;lt;HTTPHANDLERS&amp;gt;section of Machine.config, which holds the master configuration  settings for ASP.NET, contains entries that map ASAX files, CONFIG files, and selected  other file types to an HTTP handler named HttpForbiddenHandler, which fails attempts to retrieve the associated file. You can modify it by editing  Machine.config or including an section in a local Web.config file.&lt;br /&gt;
&lt;br /&gt;
&lt;strong&gt;&lt;span style="color: maroon;"&gt;What's the difference between Page.RegisterClientScriptBlock and Page.RegisterStartupScript?&lt;/span&gt;&lt;/strong&gt;&lt;strong&gt;&lt;span style="color: maroon;"&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/strong&gt;RegisterClientScriptBlock is for returning blocks of client-side script containing functions. RegisterStartupScript is for returning blocks of client-script not   packaged in functions-in other words, code that's to execute when the page is loaded. The latter positions script blocks near the end of the document so elements on the page that the script interacts are loaded before the script runs.&amp;lt;%@ Reference Control="MyControl.ascx" %&amp;gt;&lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/font&gt;&lt;/p&gt;
&lt;p style="font-family: Arial;"&gt;&lt;font size="3"&gt;&lt;strong&gt;&lt;span style="font-size: 10pt; color: maroon;"&gt;Is it necessary to lock application state before accessing it?&lt;/span&gt;&lt;/strong&gt;&lt;strong&gt;&lt;span style="font-size: 10pt;"&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/strong&gt;&lt;span style="font-size: 10pt;"&gt;Only if you're performing a multistep update and want the update to be treated as an atomic     operation. Here's an example:&lt;br /&gt;
                Application.Lock ();&lt;br /&gt;
                Application["ItemsSold"] = (int) Application["ItemsSold"] + 1;&lt;br /&gt;
                Application["ItemsLeft"] = (int) Application["ItemsLeft"] - 1;&lt;br /&gt;
                Application.UnLock ();  &lt;br /&gt;
By locking application state before updating it and unlocking it afterwards, you ensure  that another request being processed on another thread doesn't read application state   at exactly the wrong time and see an inconsistent view of it. If I update session state, should I lock it, too? Are concurrent accesses by multiple requests executing on multiple threads a concern with session state?&lt;br /&gt;
Concurrent accesses aren't an issue with session state, for two reasons. One, it's unlikely that two requests from the same user will overlap. Two, if they do overlap, ASP.NET locks down session state during request processing so that two threads can't touch it at once. Session state is locked down when the HttpApplication instance that's processing the request fires an AcquireRequestState event and unlocked when it fires a ReleaseRequestState event.&lt;br /&gt;
&lt;br /&gt;
&lt;strong&gt;&lt;span style="color: maroon;"&gt;Do ASP.NET forms authentication cookies provide any protection against replay attacks? Do they, for example, include the client's IP  address or anything else that would distinguish the real client from an attacker?&lt;/span&gt;&lt;/strong&gt;&lt;span style="color: maroon;"&gt;&lt;br /&gt;
&lt;/span&gt;No. If an authentication cookie is stolen, it can be used by an attacker. It's up to you to     prevent this from happening by using an encrypted communications channel (HTTPS). Authentication cookies issued as session cookies, do, however,include a time-out valid that     limits their lifetime. So a stolen session cookie can only be used in replay attacks as long as the ticket inside the cookie is valid. The default time-out interval is 30 minutes.You can change that by modifying the timeout attribute accompanying the &amp;lt;forms&amp;gt; element in Machine.config or a local Web.config file. Persistent authentication cookies do not  time-out and therefore are a more serious security threat if stolen.&lt;br /&gt;
&lt;br /&gt;
&lt;strong&gt;&lt;span style="color: maroon;"&gt;How do I send e-mail from an ASP.NET application?&lt;/span&gt;&lt;/strong&gt;&lt;span style="color: maroon;"&gt;&lt;br /&gt;
&lt;/span&gt;  &lt;br /&gt;
        MailMessage message = new MailMessage ();&lt;br /&gt;
        message.From = &amp;lt;email&amp;gt;;&lt;br /&gt;
        message.To = &amp;lt;email&amp;gt;;&lt;br /&gt;
        message.Subject = "Scheduled Power Outage";&lt;br /&gt;
        message.Body = "Our servers will be down tonight.";&lt;br /&gt;
        SmtpMail.SmtpServer = "localhost";&lt;br /&gt;
        SmtpMail.Send (message);&lt;br /&gt;
&lt;br /&gt;
 MailMessage and SmtpMail are classes defined in the .NET Framework Class Library's  System.Web.Mail namespace. Due to a security change made to ASP.NET just before it shipped,  you need to set SmtpMail's SmtpServer property to "localhost" even though "localhost" is  the default. In addition, you must use the IIS configuration applet to enable localhost  (127.0.0.1) to relay messages through the local SMTP service.&lt;br /&gt;
&lt;br /&gt;
&lt;strong&gt;&lt;span style="color: maroon;"&gt;What are VSDISCO files?&lt;/span&gt;&lt;/strong&gt;&lt;br /&gt;
&lt;br /&gt;
VSDISCO files are DISCO files that support dynamic discovery of Web services. If you place the following VSDISCO file in a directory on your Web server, for example, it returns   references to all ASMX and DISCO files in the host directory and any subdirectories not         noted in &amp;lt;exclude&amp;gt; elements:&lt;br /&gt;
             &amp;lt;?xml version="1.0" ?&amp;gt;&lt;br /&gt;
                &amp;lt;dynamicDiscovery&lt;br /&gt;
                  xmlns="urn:schemas-dynamicdiscovery:disco.2000-03-17"&amp;gt;&lt;br /&gt;
                  &amp;lt;exclude path="_vti_cnf" /&amp;gt;&lt;br /&gt;
                  &amp;lt;exclude path="_vti_pvt" /&amp;gt;&lt;br /&gt;
                  &amp;lt;exclude path="_vti_log" /&amp;gt;&lt;br /&gt;
                  &amp;lt;exclude path="_vti_script" /&amp;gt;&lt;br /&gt;
                  &amp;lt;exclude path="_vti_txt" /&amp;gt;&lt;br /&gt;
                &amp;lt;/dynamicDiscovery&amp;gt;   &lt;br /&gt;
&lt;br /&gt;
&lt;strong&gt;&lt;span style="color: maroon;"&gt;How does dynamic discovery work?&lt;/span&gt;&lt;/strong&gt;&lt;span style="color: maroon;"&gt;&lt;br /&gt;
&lt;/span&gt;ASP.NET maps the file name extension VSDISCO to an HTTP handler that scans the host  directory and subdirectories for ASMX and DISCO files and returns a dynamically generated DISCO document. A client who requests a VSDISCO file gets back what appears to be a static DISCO document.&lt;br /&gt;
Note that VSDISCO files are disabled in the release version of ASP.NET. You can reenable them by uncommenting the line   in the &amp;lt;httpHandlers&amp;gt; section of Machine.config that maps *.vsdisco to System.Web.Services.Discovery.DiscoveryRequestHandler and granting the ASPNET  user account permission to read the IIS metabase. However, Microsoft is actively discouraging the use of VSDISCO files because they could represent a threat to Web server security.&lt;br /&gt;
 &lt;br /&gt;
&lt;strong&gt;&lt;span style="color: maroon;"&gt;Is it possible to prevent a browser from caching an ASPX page?&lt;/span&gt;&lt;/strong&gt;&lt;span style="color: maroon;"&gt;&lt;br /&gt;
&lt;/span&gt;Just call SetNoStore on the HttpCachePolicy object exposed through the Response object's Cache property, as demonstrated here:&lt;br /&gt;
 &lt;br /&gt;
        &amp;lt;%@ Page Language="C#" %&amp;gt;&lt;br /&gt;
        &amp;lt;html&amp;gt;&lt;br /&gt;
          &amp;lt;body&amp;gt;&lt;br /&gt;
            &amp;lt;%&lt;br /&gt;
              Response.Cache.SetNoStore ();&lt;br /&gt;
              Response.Write (DateTime.Now.ToLongTimeString ());&lt;br /&gt;
            %&amp;gt;&lt;br /&gt;
          &amp;lt;/body&amp;gt;&lt;br /&gt;
        &amp;lt;/html&amp;gt;  &lt;br /&gt;
&lt;br /&gt;
SetNoStore works by returning a Cache-Control: private, no-store header in the HTTP response. In this example, it prevents caching of a Web page that shows the current time.&lt;br /&gt;
&lt;br /&gt;
&lt;strong&gt;&lt;span style="color: maroon;"&gt;What does AspCompat="true" mean and when should I use it?&lt;/span&gt;&lt;/strong&gt;&lt;strong&gt;&lt;br /&gt;
&lt;/strong&gt;AspCompat is an aid in migrating ASP pages to ASPX pages. It defaults to false but should be set to true in any ASPX file that creates apartment-threaded COM objects--that is, COM objects registered ThreadingModel=Apartment. That includes all COM objects written with  Visual Basic 6.0. AspCompat should also be set to true (regardless of threading  model)  if the page creates COM objects that access intrinsic ASP objects such as Request and Response. The following directive sets AspCompat to true:&lt;br /&gt;
&lt;br /&gt;
         &amp;lt;%@ Page AspCompat="true" %&amp;gt;  &lt;br /&gt;
&lt;br /&gt;
Setting AspCompat to true does two things. First, it makes intrinsic ASP objects available      to the COM components by placing unmanaged wrappers around the equivalent ASP.NET objects. Second, it improves the performance of calls that the page places to apartment- threaded COM objects by ensuring that the page (actually, the thread that processes the  request for the page) and the COM objects it creates share an apartment. AspCompat="true" forces ASP.NET request threads into single-threaded apartments (STAs). If those threads create COM objects marked ThreadingModel=Apartment, then the objects are created in the same STAs as the threads that created them. Without AspCompat="true," request threads run in a multithreaded apartment (MTA) and each call to an STA-based COM object incurs a performance hit when it's  marshaled across apartment boundaries.&lt;br /&gt;
&lt;br /&gt;
Do not set AspCompat to true if your page uses no COM objects or if it uses COM objects that don't access ASP intrinsic objects and that are registered ThreadingModel=Free or  ThreadingModel=Both.&lt;br /&gt;
&lt;br /&gt;
&lt;strong&gt;&lt;span style="color: maroon;"&gt;Explain the differences between Server-side and Client-side code?&lt;/span&gt;&lt;/strong&gt;&lt;strong&gt;&lt;span style="color: maroon;"&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/strong&gt; Server side scripting means that all the script will be executed by the server and  interpreted as needed. ASP doesn't have some of the functionality like sockets, uploading,  etc. For these you have to make a custom components usually in VB or VC++. Client side  scripting means that the script will be executed immediately in the browser such as form field validation, clock, email validation, etc. Client side scripting is usually done in  VBScript or JavaScript. Download time, browser compatibility, and visible code - since  JavaScript and VBScript code is included in the HTML page, then anyone can see the code by viewing the page source. Also a possible security hazards for the client computer.&lt;br /&gt;
&lt;br /&gt;
&lt;strong&gt;&lt;span style="color: maroon;"&gt;What type of code (server or client) is found in a Code-Behind class?&lt;/span&gt;&lt;/strong&gt;&lt;br /&gt;
C#&lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/font&gt;&lt;/p&gt;
&lt;p style="font-family: Arial;"&gt;&lt;font size="3"&gt;&lt;strong&gt;&lt;span style="font-size: 10pt; color: maroon;"&gt;Should validation (did the user enter a real date) occur server-side or client-side? Why?&lt;/span&gt;&lt;/strong&gt;&lt;strong&gt;&lt;span style="font-size: 10pt; color: maroon;"&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/strong&gt;&lt;span style="font-size: 10pt;"&gt;Client-side validation because there is no need to request a server side date when you  could obtain a date from the client machine.&lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/font&gt;&lt;/p&gt;
&lt;p style="font-family: Arial;"&gt;&lt;font size="3"&gt;&lt;strong&gt;&lt;span style="font-size: 10pt; color: maroon;"&gt;What are ASP.NET Web Forms? How is this technology different than what is available though ASP?&lt;/span&gt;&lt;/strong&gt;&lt;strong&gt;&lt;span style="font-size: 10pt; color: maroon;"&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/strong&gt;&lt;span style="font-size: 10pt;"&gt;Web Forms are the heart and soul of ASP.NET. Web Forms are the User Interface (UI) elements that give your Web applications their look and feel. Web Forms are similar to Windows Forms in that they provide properties, methods, and events for the controls that are placed onto  them. However, these UI elements render themselves in the appropriate markup language   required by the request, e.g. HTML. If you use Microsoft Visual Studio .NET, you will also get the familiar drag-and-drop interface used to create your UI for your Web application.&lt;br /&gt;
&lt;br /&gt;
&lt;strong&gt;&lt;span style="color: maroon;"&gt;What is the difference between Server.Transfer and Response.Redirect? Why would I choose one over the other?&lt;/span&gt;&lt;/strong&gt;&lt;strong&gt;&lt;span style="color: maroon;"&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/strong&gt;In earlier versions of IIS, if we wanted to send a user to a new Web page, the only option we had was Response.Redirect. While this method does accomplish our goal, it has several important drawbacks. The biggest problem is that this method causes each page to be treated as a separate transaction. Besides making it difficult to maintain your transactional   integrity, Response.Redirect introduces some additional headaches. First, it prevents good encapsulation of code. Second, you lose access to all of the properties in the Request  object. Sure, there are workarounds, but they're difficult. Finally, Response.Redirect  necessitates a round trip to the client, which, on high-volume sites, causes scalability problems.&lt;br /&gt;
As you might suspect, Server.Transfer fixes all of these problems. It does this by performing the transfer on the server without requiring a roundtrip to the client.&lt;br /&gt;
&lt;br /&gt;
&lt;strong&gt;&lt;span style="color: maroon;"&gt;How can you provide an alternating color scheme in a Repeater control?&lt;/span&gt;&lt;/strong&gt;&lt;br /&gt;
AlternatingItemTemplate Like the ItemTemplate element, but rendered for every other row (alternating items) in the Repeater control. You can specify a different appearance for the AlternatingItemTemplate element by setting its style properties.&lt;br /&gt;
&lt;br /&gt;
&lt;strong&gt;&lt;span style="color: maroon;"&gt;Which template must you provide, in order to display data in a Repeater control?&lt;/span&gt;&lt;/strong&gt;&lt;strong&gt;&lt;span style="color: maroon;"&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/strong&gt;ItemTemplate&lt;br /&gt;
&lt;br /&gt;
&lt;strong&gt;&lt;span style="color: maroon;"&gt;What event handlers can I include in Global.asax?&lt;/span&gt;&lt;/strong&gt;&lt;br /&gt;
Application_Start,Application_End, Application_AcquireRequestState, Application_AuthenticateRequest, Application_AuthorizeRequest, Application_BeginRequest, Application_Disposed,  Application_EndRequest, Application_Error, Application_PostRequestHandlerExecute, Application_PreRequestHandlerExecute, &lt;br /&gt;
Application_PreSendRequestContent, Application_PreSendRequestHeaders, Application_ReleaseRequestState, Application_ResolveRequestCache, Application_UpdateRequestCache, Session_Start,Session_End&lt;br /&gt;
You can optionally include "On" in any of method names. For example, you can name a BeginRequest event handler.Application_BeginRequest or Application_OnBeginRequest.You can also include event handlers in Global.asax for events fired by custom HTTP modules.Note that not all of the event handlers make sense for Web Services (they're designed for ASP.NET applications in general, whereas .NET XML Web Services are specialized instances of an ASP.NET app). For example, the Application_AuthenticateRequest and Application_AuthorizeRequest events are designed to be used with ASP.NET Forms authentication.  &lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/font&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="font-family: Arial;"&gt;&lt;font size="3"&gt;&lt;strong&gt;&lt;u&gt;&lt;o:p&gt;&lt;span style="text-decoration: none;"&gt; &lt;/span&gt;&lt;/o:p&gt;&lt;/u&gt;&lt;/strong&gt;&lt;/font&gt;&lt;/p&gt;
&lt;h2 style="font-family: Arial;"&gt;&lt;font size="3"&gt;WebServices&lt;/font&gt;&lt;/h2&gt;
&lt;p class="MsoNormal" style="font-family: Arial;"&gt;&lt;font size="3"&gt;&lt;strong&gt;&lt;u&gt;&lt;span style="font-size: 15pt;"&gt;&lt;o:p&gt;&lt;span style="text-decoration: none;"&gt; &lt;/span&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/u&gt;&lt;/strong&gt;&lt;/font&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="font-family: Arial;"&gt;&lt;font size="3"&gt;&lt;strong&gt;&lt;span style="font-size: 10pt; color: maroon;"&gt;What platforms do .NET XML Web Services run on? &lt;/span&gt;&lt;/strong&gt;&lt;strong&gt;&lt;span style="font-size: 10pt; color: maroon;"&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/strong&gt;&lt;span style="font-size: 10pt;"&gt;Currently, they're supported on Windows 2000 and Windows XP. ASP.NET integrates with Internet Information Server (IIS) and thus requires that IIS be installed. It runs on server and non-server editions of Windows 2000 and XP as long as IIS is  &lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/font&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="font-family: Arial;"&gt;&lt;font size="3"&gt;&lt;span style="font-size: 10pt;"&gt;installed.  &lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/font&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="font-family: Arial;"&gt;&lt;font size="3"&gt;&lt;br /&gt;
&lt;strong&gt;&lt;span style="font-size: 10pt; color: maroon;"&gt;Can two different programming languages be mixed in a single ASMX file? &lt;/span&gt;&lt;/strong&gt;&lt;strong&gt;&lt;span style="font-size: 10pt; color: maroon;"&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/strong&gt;&lt;span style="font-size: 10pt;"&gt;No.  &lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/font&gt; &lt;/p&gt;
&lt;p class="MsoNormal" style="font-family: Arial;"&gt;&lt;font size="3"&gt;&lt;br /&gt;
&lt;strong&gt;&lt;span style="font-size: 10pt; color: maroon;"&gt;What is code-behind? &lt;/span&gt;&lt;/strong&gt;&lt;strong&gt;&lt;span style="font-size: 10pt; color: maroon;"&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/strong&gt;&lt;span style="font-size: 10pt;"&gt;Code-behind allows you to associate Web Service source code written in a CLR compliant language (such as C# or VB.NET) as compiled in a separate file (typically *.asmx.cs or *.asmx.vb). You would otherwise typically find the executable  code directly inserted into the .asmx file.  &lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/font&gt; &lt;/p&gt;
&lt;p class="MsoNormal" style="font-family: Arial;"&gt;&lt;font size="3"&gt;&lt;span style="font-size: 10pt;"&gt;&lt;br /&gt;
&lt;strong&gt;&lt;span style="color: maroon;"&gt;What namespaces are imported by default in ASMX files? &lt;/span&gt;&lt;/strong&gt;&lt;strong&gt;&lt;br /&gt;
&lt;/strong&gt;The following namespaces are imported by default. Other namespaces must be imported manually.· System, System.Collections,System.ComponentModel,System.Data, System.Diagnostics,System.Web,System.Web.Services  &lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/font&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="font-family: Arial;"&gt;&lt;font size="3"&gt;&lt;span style="font-size: 10pt;"&gt;&lt;br /&gt;
&lt;strong&gt;&lt;span style="color: maroon;"&gt;How do I provide information to the Web Service when the information is required as a SOAP Header? &lt;/span&gt;&lt;/strong&gt;&lt;strong&gt;&lt;br /&gt;
&lt;/strong&gt;The key here is the Web Service proxy you created using wsdl.exe or through Visual Studio .NET's Add Web Reference menu option. If you happen to download a WSDL file for a Web Service that requires a SOAP header, .NET will create a SoapHeader class in the proxy source file. Using the previous example:     &lt;br /&gt;
      public class Service1 : System.Web.Services.Protocols.SoapHttpClientProtocol &lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/font&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="font-family: Arial;"&gt;&lt;font size="3"&gt;&lt;span style="font-size: 10pt;"&gt;        {    &lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/font&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="font-family: Arial;"&gt;&lt;font size="3"&gt;&lt;span style="font-size: 10pt;"&gt;            public AuthToken AuthTokenValue;        &lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/font&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="font-family: Arial;"&gt;&lt;font size="3"&gt;&lt;span style="font-size: 10pt;"&gt;        &lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/font&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="font-family: Arial;"&gt;&lt;font size="3"&gt;&lt;span style="font-size: 10pt;"&gt;        [System.Xml.Serialization.XmlRootAttribute(Namespace="&lt;a href="http://tempuri.org/" target="_top"&gt;http://tempuri.org/&lt;/a&gt;", IsNullable=false)]        &lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/font&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="font-family: Arial;"&gt;&lt;font size="3"&gt;&lt;span style="font-size: 10pt;"&gt;            public class AuthToken : SoapHeader {        public string Token;    }}   &lt;br /&gt;
     &lt;br /&gt;
In this case, when you create an instance of the proxy in your main application file, you'll also create an instance of the AuthToken class and assign the string:     &lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/font&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="font-family: Arial;"&gt;&lt;font size="3"&gt;&lt;span style="font-size: 10pt;"&gt;     Service1 objSvc = new Service1();&lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/font&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="font-family: Arial;"&gt;&lt;font size="3"&gt;&lt;span style="font-size: 10pt;"&gt;     processingobjSvc.AuthTokenValue = new AuthToken();&lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/font&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="font-family: Arial;"&gt;&lt;font size="3"&gt;&lt;span style="font-size: 10pt;"&gt;     objSvc.AuthTokenValue.Token = &amp;lt;actual token value&amp;gt;;&lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/font&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="font-family: Arial;"&gt;&lt;font size="3"&gt;&lt;span style="font-size: 10pt;"&gt;     Web Servicestring strResult = objSvc.MyBillableWebMethod();   &lt;br /&gt;
     &lt;br /&gt;
&lt;strong&gt;&lt;span style="color: maroon;"&gt;What is WSDL?&lt;/span&gt;&lt;/strong&gt;&lt;strong&gt;&lt;span style="color: maroon;"&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/strong&gt;WSDL is the Web Service Description Language, and it is implemented as a specific XML vocabulary. While it's very much more complex than what can be described here, there are two important aspects to WSDL with which you should be aware. First, WSDL provides instructions to consumers of Web Services to describe the layout and contents of the SOAP packets  the Web Service intends to issue. It's an interface description document, of sorts. And second, it isn't intended that you  read and interpret the WSDL. Rather, WSDL should be processed by machine, typically to generate proxy source code (.NET) or create dynamic proxies on the fly (the SOAP Toolkit or Web Service Behavior).  &lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/font&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="font-family: Arial;"&gt;&lt;font size="3"&gt;&lt;strong&gt;&lt;u&gt;&lt;span style="font-size: 15pt;"&gt;&lt;o:p&gt;&lt;span style="text-decoration: none;"&gt; &lt;/span&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/u&gt;&lt;/strong&gt;&lt;/font&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="font-family: Arial;"&gt;&lt;font size="3"&gt;&lt;strong&gt;&lt;u&gt;&lt;span style="font-size: 15pt;"&gt;&lt;o:p&gt;&lt;span style="text-decoration: none;"&gt; &lt;/span&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/u&gt;&lt;/strong&gt;&lt;/font&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="font-family: Arial;"&gt;&lt;font size="3"&gt;&lt;strong&gt;&lt;span style="font-size: 10pt; color: maroon;"&gt;Remoting FAQ's&lt;/span&gt;&lt;/strong&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/font&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="font-family: Arial;"&gt;&lt;font size="3"&gt; &lt;o:p&gt;&lt;/o:p&gt;&lt;/font&gt;&lt;/p&gt;
&lt;div align="center" class="MsoNormal" style="text-align: center; font-family: Arial;"&gt;  &lt;hr width="100%" size="2" align="center" style="height: 3px;" /&gt;
&lt;/div&gt;
&lt;p class="MsoNormal" style="font-family: Arial;"&gt;&lt;font size="3"&gt; &lt;o:p&gt;&lt;/o:p&gt;&lt;/font&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="font-family: Arial;"&gt;&lt;font size="3"&gt;&lt;strong&gt;&lt;span style="font-size: 10pt; color: maroon;"&gt;What distributed process frameworks outside .NET do you know? &lt;/span&gt;&lt;/strong&gt;&lt;strong&gt;&lt;span style="font-size: 10pt; color: maroon;"&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/strong&gt;&lt;span style="font-size: 10pt;"&gt;Distributed Computing Environment/Remote Procedure Calls (DEC/RPC), Microsoft Distributed Component Object Model  (DCOM), Common Object Request Broker Architecture (CORBA), and Java Remote Method Invocation (RMI). &lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/font&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="font-family: Arial;"&gt;&lt;font size="3"&gt;&lt;br /&gt;
&lt;strong&gt;&lt;span style="font-size: 10pt; color: maroon;"&gt;What are possible implementations of distributed applications in .NET? &lt;/span&gt;&lt;/strong&gt;&lt;span style="font-size: 10pt; color: maroon;"&gt;&lt;br /&gt;
&lt;/span&gt;&lt;span style="font-size: 10pt;"&gt; .NET Remoting and ASP.NET Web Services. If we talk about the Framework Class Library, noteworthy classes are in  System.Runtime.Remoting and System.Web.Services. &lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/font&gt; &lt;/p&gt;
&lt;p class="MsoNormal" style="font-family: Arial;"&gt;&lt;font size="3"&gt;&lt;br /&gt;
&lt;strong&gt;&lt;span style="font-size: 10pt; color: maroon;"&gt;When would you use .NET Remoting and when Web services?&lt;/span&gt;&lt;/strong&gt;&lt;strong&gt;&lt;span style="font-size: 10pt;"&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/strong&gt;&lt;span style="font-size: 10pt;"&gt;Use remoting for more efficient exchange of information when you control both ends of the application. Use Web services for     open-protocol-based information exchange when you are just a client or a server with the other end belonging to someone else. &lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/font&gt; &lt;/p&gt;
&lt;p class="MsoNormal" style="font-family: Arial;"&gt;&lt;font size="3"&gt;&lt;br /&gt;
&lt;strong&gt;&lt;span style="font-size: 10pt; color: maroon;"&gt;What's a proxy of the server object in .NET Remoting? &lt;/span&gt;&lt;/strong&gt;&lt;span style="font-size: 10pt; color: maroon;"&gt;&lt;br /&gt;
&lt;/span&gt;&lt;span style="font-size: 10pt;"&gt; It's a fake copy of the server object that resides on the client side and behaves as if it was the server. It handles the  communication between real server object and the client object. This process is also known as marshaling. &lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/font&gt; &lt;/p&gt;
&lt;p class="MsoNormal" style="font-family: Arial;"&gt;&lt;font size="3"&gt;&lt;br /&gt;
&lt;strong&gt;&lt;span style="font-size: 10pt; color: maroon;"&gt;What are remotable objects in .NET Remoting? &lt;/span&gt;&lt;/strong&gt;&lt;span style="font-size: 10pt; color: gray;"&gt;&lt;br /&gt;
&lt;/span&gt;&lt;span style="font-size: 10pt;"&gt;Remotable objects are the objects that can be marshaled across the application domains. You can marshal by value, where  a deep copy of the object is created and then passed to the receiver. You can also marshal by reference, where just a  reference to an existing object is passed. &lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/font&gt; &lt;/p&gt;
&lt;p class="MsoNormal" style="font-family: Arial;"&gt;&lt;font size="3"&gt;&lt;br /&gt;
&lt;strong&gt;&lt;span style="font-size: 10pt; color: maroon;"&gt;What are channels in .NET Remoting? &lt;/span&gt;&lt;/strong&gt;&lt;strong&gt;&lt;span style="font-size: 10pt; color: maroon;"&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/strong&gt;&lt;span style="font-size: 10pt;"&gt;Channels represent the objects that transfer the other serialized objects from one application domain to another and from  one computer to another, as well as one process to another on the same box. A channel must exist before an object can be transferred. &lt;br /&gt;
&lt;strong&gt;&lt;span style="color: maroon;"&gt;What security measures exist for .NET Remoting in System.Runtime.Remoting? &lt;/span&gt;&lt;/strong&gt;&lt;strong&gt;&lt;span style="color: maroon;"&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/strong&gt; None. Security should be taken care of at the application level. Cryptography and other security techniques can be applied  at application or server level. &lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/font&gt; &lt;/p&gt;
&lt;p class="MsoNormal" style="font-family: Arial;"&gt;&lt;font size="3"&gt;&lt;br /&gt;
&lt;strong&gt;&lt;span style="font-size: 10pt; color: maroon;"&gt;What is a formatter?&lt;/span&gt;&lt;/strong&gt;&lt;strong&gt;&lt;span style="font-size: 10pt;"&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/strong&gt;&lt;span style="font-size: 10pt;"&gt; A formatter is an object that is responsible for encoding and serializing data into messages on one end, and deserializing  and decoding messages into data on the other end. &lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/font&gt; &lt;/p&gt;
&lt;p class="MsoNormal" style="font-family: Arial;"&gt;&lt;font size="3"&gt;&lt;br /&gt;
&lt;strong&gt;&lt;span style="font-size: 10pt; color: maroon;"&gt;Choosing between HTTP and TCP for protocols and Binary and SOAP for formatters, what are the trade-offs? &lt;/span&gt;&lt;/strong&gt;&lt;strong&gt;&lt;span style="font-size: 10pt; color: maroon;"&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/strong&gt;&lt;span style="font-size: 10pt;"&gt;Binary over TCP is the most effiecient, SOAP over HTTP is the most interoperable. &lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/font&gt; &lt;/p&gt;
&lt;p class="MsoNormal" style="font-family: Arial;"&gt;&lt;font size="3"&gt;&lt;br /&gt;
&lt;strong&gt;&lt;span style="font-size: 10pt; color: maroon;"&gt;What's SingleCall activation mode used for? &lt;/span&gt;&lt;/strong&gt;&lt;strong&gt;&lt;span style="font-size: 10pt;"&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/strong&gt;&lt;span style="font-size: 10pt;"&gt;If the server object is instantiated for responding to just one single request, the request should be made in SingleCall mode. &lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/font&gt; &lt;/p&gt;
&lt;p class="MsoNormal" style="font-family: Arial;"&gt;&lt;font size="3"&gt;&lt;br /&gt;
&lt;strong&gt;&lt;span style="font-size: 10pt; color: maroon;"&gt;What's Singleton activation mode? &lt;/span&gt;&lt;/strong&gt;&lt;strong&gt;&lt;span style="font-size: 10pt; color: maroon;"&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/strong&gt;&lt;span style="font-size: 10pt;"&gt;A single object is instantiated regardless of the number of clients accessing it. Lifetime of this object is determined by  lifetime lease. &lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/font&gt; &lt;/p&gt;
&lt;p class="MsoNormal" style="font-family: Arial;"&gt;&lt;font size="3"&gt;&lt;br /&gt;
&lt;strong&gt;&lt;span style="font-size: 10pt; color: maroon;"&gt;How do you define the lease of the object?&lt;/span&gt;&lt;/strong&gt;&lt;strong&gt;&lt;span style="font-size: 10pt; color: maroon;"&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/strong&gt;&lt;span style="font-size: 10pt;"&gt;By implementing ILease interface when writing the class code. &lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/font&gt; &lt;/p&gt;
&lt;p class="MsoNormal" style="font-family: Arial;"&gt;&lt;font size="3"&gt;&lt;br /&gt;
&lt;strong&gt;&lt;span style="font-size: 10pt; color: maroon;"&gt;Can you configure a .NET Remoting object via XML file? &lt;/span&gt;&lt;/strong&gt;&lt;strong&gt;&lt;span style="font-size: 10pt;"&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/strong&gt;&lt;span style="font-size: 10pt;"&gt;Yes, via machine.config and application level .config file (or web.config in ASP.NET). Application-level XML settings take precedence over machine.config. &lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/font&gt; &lt;/p&gt;
&lt;p class="MsoNormal" style="font-family: Arial;"&gt;&lt;font size="3"&gt;&lt;br /&gt;
&lt;strong&gt;&lt;span style="font-size: 10pt; color: maroon;"&gt;How can you automatically generate interface for the remotable object in .NET with Microsoft tools? &lt;/span&gt;&lt;/strong&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/font&gt; &lt;/p&gt;
&lt;p class="MsoNormal" style="font-family: Arial;"&gt;&lt;font size="3"&gt;&lt;span style="font-size: 10pt;"&gt;Use the Soapsuds tool.   &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/font&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="font-family: Arial;"&gt;&lt;font size="3"&gt;&lt;span style="font-size: 10pt;"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/span&gt;&lt;/font&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="font-family: Arial;"&gt;&lt;font size="3"&gt;&lt;span style="font-size: 10pt;"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/span&gt;&lt;/font&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="font-family: Arial;"&gt;&lt;font size="3"&gt;&lt;span style="font-size: 10pt;"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/span&gt;&lt;/font&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="font-family: Arial;"&gt;&lt;font size="3"&gt;&lt;span style="font-size: 10pt;"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/span&gt;&lt;/font&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="font-family: Arial;"&gt;&lt;font size="3"&gt;&lt;span style="font-size: 10pt;"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/span&gt;&lt;/font&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="font-family: Arial;"&gt;&lt;font size="3"&gt;&lt;span style="font-size: 10pt;"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/span&gt;&lt;/font&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="font-family: Arial;"&gt;&lt;font size="3"&gt;&lt;span style="font-size: 10pt;"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/span&gt;&lt;/font&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="font-family: Arial;"&gt;&lt;font size="3"&gt;&lt;span style="font-size: 10pt;"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/span&gt;&lt;/font&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="font-family: Arial;"&gt;&lt;font size="3"&gt;&lt;span style="font-size: 10pt;"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/span&gt;&lt;/font&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="font-family: Arial;"&gt;&lt;font size="3"&gt;&lt;span style="font-size: 10pt;"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/span&gt;&lt;/font&gt;&lt;/p&gt;
&lt;p align="center" class="MsoNormal" style="text-align: center; font-family: Arial;"&gt;&lt;font size="3"&gt;&lt;strong&gt;&lt;u&gt;&lt;span style="font-size: 15pt;"&gt;ADO.Net:&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/u&gt;&lt;/strong&gt;&lt;/font&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="font-family: Arial;"&gt;&lt;font size="3"&gt;&lt;strong&gt;&lt;u&gt;&lt;span style="font-size: 15pt;"&gt;&lt;o:p&gt;&lt;span style="text-decoration: none;"&gt; &lt;/span&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/u&gt;&lt;/strong&gt;&lt;/font&gt;&lt;/p&gt;
&lt;p style="font-family: Arial;"&gt;&lt;font size="3"&gt;&lt;strong&gt;&lt;span style="font-size: 10pt;"&gt;Explain what a diffgram is and its usage ?&lt;/span&gt;&lt;/strong&gt;&lt;span style="font-size: 10pt;"&gt;&lt;br /&gt;
A DiffGram is an XML format that is used to identify current and original versions of data elements. The DataSet uses the DiffGram format to load and persist its contents, and to serialize its contents for transport across a network connection. When a DataSet is written as a DiffGram, it populates the DiffGram with all the necessary information to accurately recreate the contents, though not the schema, of the DataSet, including column values from both the Original and Current row versions, row error information, and row order.&lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/font&gt;&lt;/p&gt;
&lt;p style="font-family: Arial;"&gt;&lt;font size="3"&gt;&lt;span style="font-size: 10pt;"&gt;When sending and retrieving a DataSet from an XML Web service, the DiffGram format is implicitly used. Additionally, when loading the contents of a DataSet from XML using the ReadXml method, or when writing the contents of a DataSet in XML using the WriteXml method, you can select that the contents be read or written as a DiffGram. &lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/font&gt;&lt;/p&gt;
&lt;p style="font-family: Arial;"&gt;&lt;font size="3"&gt;&lt;span style="font-size: 10pt;"&gt;The DiffGram format is divided into three sections: the current data, the original (or "before") data, and an errors section, as shown in the following example.&lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/font&gt;&lt;/p&gt;
&lt;p style="font-family: Arial;"&gt;&lt;font size="3"&gt;&lt;span style="font-size: 10pt;"&gt;&amp;lt;?xml version="1.0"?&amp;gt;&lt;br /&gt;
&amp;lt;diffgr:diffgram &lt;br /&gt;
         xmlns:msdata="urn:schemas-microsoft-com:xml-msdata"&lt;br /&gt;
         xmlns:diffgr="urn:schemas-microsoft-com:xml-diffgram-v1"&lt;br /&gt;
         xmlns:xsd="&lt;/span&gt;&lt;a href="http://www.w3.org/2001/XMLSchema" target="_top"&gt;&lt;span style="font-size: 10pt;"&gt;http://www.w3.org/2001/XMLSchema&lt;/span&gt;&lt;/a&gt;&lt;span style="font-size: 10pt;"&gt;"&amp;gt;&lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/font&gt;&lt;/p&gt;
&lt;p style="font-family: Arial;"&gt;&lt;font size="3"&gt;&lt;span style="font-size: 10pt;"&gt;   &amp;lt;DataInstance&amp;gt;&lt;br /&gt;
   &amp;lt;/DataInstance&amp;gt;&lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/font&gt;&lt;/p&gt;
&lt;p style="font-family: Arial;"&gt;&lt;font size="3"&gt;&lt;span style="font-size: 10pt;"&gt;  &amp;lt;diffgr:before&amp;gt;&lt;br /&gt;
  &amp;lt;/diffgr:before&amp;gt;&lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/font&gt;&lt;/p&gt;
&lt;p style="font-family: Arial;"&gt;&lt;font size="3"&gt;&lt;span style="font-size: 10pt;"&gt;  &amp;lt;diffgr:errors&amp;gt;&lt;br /&gt;
  &amp;lt;/diffgr:errors&amp;gt;&lt;br /&gt;
&amp;lt;/diffgr:diffgram&amp;gt;&lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/font&gt;&lt;/p&gt;
&lt;p style="font-family: Arial;"&gt;&lt;font size="3"&gt;&lt;span style="font-size: 10pt;"&gt;The DiffGram format consists of the following blocks of data: &lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/font&gt;&lt;/p&gt;
&lt;p style="font-family: Arial;"&gt;&lt;font size="3"&gt;&lt;span style="font-size: 10pt;"&gt;&amp;lt;DataInstance&amp;gt; &lt;br /&gt;
The name of this element, DataInstance, is used for explanation purposes in this documentation. A DataInstance element represents a DataSet or a row of a DataTable. Instead of DataInstance, the element would contain the name of the DataSet or DataTable. This block of the DiffGram format contains the current data, whether it has been modified or not. An element, or row, that has been modified is identified with the diffgr:hasChanges annotation. &lt;br /&gt;
&amp;lt;diffgr:before&amp;gt; &lt;br /&gt;
This block of the DiffGram format contains the original version of a row. Elements in this block are matched to elements in the DataInstance block using the diffgr:id annotation. &lt;br /&gt;
&amp;lt;diffgr:errors&amp;gt; &lt;br /&gt;
This block of the DiffGram format contains error information for a particular row in the DataInstance block. Elements in this block are matched to elements in the DataInstance block using the diffgr:id annotation.&lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/font&gt;&lt;/p&gt;
&lt;p style="font-family: Arial;"&gt;&lt;font size="3"&gt;&lt;span style="font-size: 10pt;"&gt;Which method do you invoke on the DataAdapter control to load your generated dataset with data? &lt;br /&gt;
You have to use the Fill method of the DataAdapter control and pass the dataset object as an argument to load the generated data.&lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/font&gt;&lt;/p&gt;
&lt;p style="font-family: Arial;"&gt;&lt;font size="3"&gt;&lt;strong&gt;&lt;span style="font-size: 10pt;"&gt;Can you edit data in the Repeater control? &lt;/span&gt;&lt;/strong&gt;&lt;strong&gt;&lt;span style="font-size: 10pt;"&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/strong&gt;&lt;span style="font-size: 10pt;"&gt;NO.&lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/font&gt;&lt;/p&gt;
&lt;p style="font-family: Arial;"&gt;&lt;font size="3"&gt;&lt;strong&gt;&lt;span style="font-size: 10pt;"&gt;Which are the different IsolationLevels ?&lt;/span&gt;&lt;/strong&gt;&lt;span style="font-size: 10pt;"&gt;&lt;br /&gt;
Following are the various IsolationLevels:&lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/font&gt;&lt;/p&gt;
&lt;ul type="disc" style="font-family: Arial;"&gt;
    &lt;li class="MsoNormal" style=""&gt;&lt;font size="3"&gt;&lt;span style="font-size: 10pt;"&gt;Serialized        Data read by a current transaction cannot be changed by another      transaction until the current transaction finishes. No new data can be      inserted that would affect the current transaction. This is the safest      isolation level and is the default. &lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/font&gt; &lt;/li&gt;
    &lt;li class="MsoNormal" style=""&gt;&lt;font size="3"&gt;&lt;span style="font-size: 10pt;"&gt;Repeatable      Read   Data read by a current transaction cannot be changed by      another transaction until the current transaction finishes. Any type of      new data can be inserted during a transaction. &lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/font&gt; &lt;/li&gt;
    &lt;li class="MsoNormal" style=""&gt;&lt;font size="3"&gt;&lt;span style="font-size: 10pt;"&gt;Read Committed        A transaction cannot read data that is being modified by another      transaction that has not committed. This is the default isolation level in      Microsoft® SQL Server. &lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/font&gt; &lt;/li&gt;
    &lt;li class="MsoNormal" style=""&gt;&lt;font size="3"&gt;&lt;span style="font-size: 10pt;"&gt;Read      Uncommitted   A transaction can read any data, even if it is      being modified by another transaction. This is the least safe isolation      level but allows the highest concurrency. &lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/font&gt; &lt;/li&gt;
    &lt;li class="MsoNormal" style=""&gt;&lt;font size="3"&gt;&lt;span style="font-size: 10pt;"&gt;Any   Any      isolation level is supported. This setting is most commonly used by      downstream components to avoid conflicts. This setting is useful because      any downstream component must be configured with an isolation level that      is equal to or less than the isolation level of its immediate upstream      component. Therefore, a downstream component that has its isolation level      configured as Any always uses the same isolation level that its immediate      upstream component uses. If the root object in a transaction has its      isolation level configured to Any, its isolation level becomes Serialized.      &lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/font&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p style="margin: 0in 0in 0.0001pt; font-family: Arial;"&gt;&lt;font size="3"&gt;&lt;strong&gt;&lt;span style="font-size: 10pt;"&gt;How xml files and be read and write using dataset?.&lt;/span&gt;&lt;/strong&gt;&lt;strong&gt;&lt;span style="font-size: 10pt;"&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/strong&gt;&lt;span style="font-size: 10pt;"&gt;DataSet exposes method like ReadXml and WriteXml to read and write xml&lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/font&gt;&lt;/p&gt;
&lt;p style="margin: 0in 0in 0.0001pt; font-family: Arial;"&gt;&lt;font size="3"&gt;&lt;strong&gt;&lt;span style="font-size: 10pt;"&gt;What are the different rowversions available?&lt;/span&gt;&lt;/strong&gt;&lt;span style="font-size: 10pt;"&gt;&lt;br /&gt;
There are four types of Rowversions.&lt;br /&gt;
Current:&lt;br /&gt;
The current values for the row. This row version does not exist for rows with a RowState of Deleted.&lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/font&gt;&lt;/p&gt;
&lt;p style="margin: 0in 0in 0.0001pt; font-family: Arial;"&gt;&lt;font size="3"&gt;&lt;span style="font-size: 10pt;"&gt;Default :&lt;br /&gt;
The row the default version for the current DataRowState. For a DataRowState value of Added, Modified or Current, the default version is Current. For a DataRowState of Deleted, the version is Original. For a DataRowState value of Detached, the version is Proposed.&lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/font&gt;&lt;/p&gt;
&lt;p style="margin: 0in 0in 0.0001pt; font-family: Arial;"&gt;&lt;font size="3"&gt;&lt;span style="font-size: 10pt;"&gt;Original:&lt;br /&gt;
The row contains its original values.&lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/font&gt;&lt;/p&gt;
&lt;p style="margin: 0in 0in 0.0001pt; font-family: Arial;"&gt;&lt;font size="3"&gt;&lt;span style="font-size: 10pt;"&gt;Proposed:&lt;br /&gt;
The proposed values for the row. This row version exists during an edit operation on a row, or for a row that is not part of a DataRowCollection&lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/font&gt;&lt;/p&gt;
&lt;p style="margin: 0in 0in 0.0001pt; font-family: Arial;"&gt;&lt;font size="3"&gt;&lt;strong&gt;&lt;span style="font-size: 10pt;"&gt;Explain acid properties?.&lt;/span&gt;&lt;/strong&gt;&lt;strong&gt;&lt;span style="font-size: 10pt;"&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/strong&gt;&lt;span style="font-size: 10pt;"&gt;The term ACID conveys the role transactions play in mission-critical applications. Coined by transaction processing pioneers, ACID stands for atomicity, consistency, isolation, and durability.&lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/font&gt;&lt;/p&gt;
&lt;p style="margin: 0in 0in 0.0001pt; font-family: Arial;"&gt;&lt;font size="3"&gt;&lt;span style="font-size: 10pt;"&gt;These properties ensure predictable behavior, reinforcing the role of transactions as all-or-none propositions designed to reduce the management load when there are many variables.&lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/font&gt;&lt;/p&gt;
&lt;p style="margin: 0in 0in 0.0001pt; font-family: Arial;"&gt;&lt;font size="3"&gt;&lt;strong&gt;&lt;span style="font-size: 10pt;"&gt;Atomicity&lt;/span&gt;&lt;/strong&gt;&lt;span style="font-size: 10pt;"&gt;&lt;br /&gt;
A transaction is a unit of work in which a series of operations occur between the BEGIN TRANSACTION and END TRANSACTION statements of an application. A transaction executes exactly once and is atomic — all the work is done or none of it is.&lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/font&gt;&lt;/p&gt;
&lt;p style="margin: 0in 0in 0.0001pt; font-family: Arial;"&gt;&lt;font size="3"&gt;&lt;span style="font-size: 10pt;"&gt;Operations associated with a transaction usually share a common intent and are interdependent. By performing only a subset of these operations, the system could compromise the overall intent of the transaction. Atomicity eliminates the chance of processing a subset of operations.&lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/font&gt;&lt;/p&gt;
&lt;p style="margin: 0in 0in 0.0001pt; font-family: Arial;"&gt;&lt;font size="3"&gt;&lt;strong&gt;&lt;span style="font-size: 10pt;"&gt;Consistency&lt;/span&gt;&lt;/strong&gt;&lt;span style="font-size: 10pt;"&gt;&lt;br /&gt;
A transaction is a unit of integrity because it preserves the consistency of data, transforming one consistent state of data into another consistent state of data.&lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/font&gt;&lt;/p&gt;
&lt;p style="margin: 0in 0in 0.0001pt; font-family: Arial;"&gt;&lt;font size="3"&gt;&lt;span style="font-size: 10pt;"&gt;Consistency requires that data bound by a transaction be semantically preserved. Some of the responsibility for maintaining consistency falls to the application developer who must make sure that all known integrity constraints are enforced by the application. For example, in developing an application that transfers money, you should avoid arbitrarily moving decimal points during the transfer.&lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/font&gt;&lt;/p&gt;
&lt;p style="margin: 0in 0in 0.0001pt; font-family: Arial;"&gt;&lt;font size="3"&gt;&lt;strong&gt;&lt;span style="font-size: 10pt;"&gt;Isolation&lt;/span&gt;&lt;/strong&gt;&lt;span style="font-size: 10pt;"&gt;&lt;br /&gt;
A transaction is a unit of isolation — allowing concurrent transactions to behave as though each were the only transaction running in the system.&lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/font&gt;&lt;/p&gt;
&lt;p style="margin: 0in 0in 0.0001pt; font-family: Arial;"&gt;&lt;font size="3"&gt;&lt;span style="font-size: 10pt;"&gt;Isolation requires that each transaction appear to be the only transaction manipulating the data store, even though other transactions may be running at the same time. A transaction should never see the intermediate stages of another transaction.&lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/font&gt;&lt;/p&gt;
&lt;p style="margin: 0in 0in 0.0001pt; font-family: Arial;"&gt;&lt;font size="3"&gt;&lt;span style="font-size: 10pt;"&gt;Transactions attain the highest level of isolation when they are serializable. At this level, the results obtained from a set of concurrent transactions are identical to the results obtained by running each transaction serially. Because a high degree of isolation can limit the number of concurrent transactions, some applications reduce the isolation level in exchange for better throughput.&lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/font&gt;&lt;/p&gt;
&lt;p style="margin: 0in 0in 0.0001pt; font-family: Arial;"&gt;&lt;font size="3"&gt;&lt;strong&gt;&lt;span style="font-size: 10pt;"&gt;Durability&lt;/span&gt;&lt;/strong&gt;&lt;span style="font-size: 10pt;"&gt;&lt;br /&gt;
A transaction is also a unit of recovery. If a transaction succeeds, the system guarantees that its updates will persist, even if the computer crashes immediately after the commit. Specialized logging allows the system's restart procedure to complete unfinished operations, making the transaction durable.&lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/font&gt;&lt;/p&gt;
&lt;p style="margin: 0in 0in 0.0001pt; font-family: Arial;"&gt;&lt;font size="3"&gt;&lt;br /&gt;
&lt;strong&gt;&lt;span style="font-size: 10pt;"&gt;Whate are different types of Commands available with DataAdapter ?&lt;/span&gt;&lt;/strong&gt;&lt;strong&gt;&lt;span style="font-size: 10pt;"&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/strong&gt;&lt;span style="font-size: 10pt;"&gt;The SqlDataAdapter has SelectCommand, InsertCommand, DeleteCommand and UpdateCommand&lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/font&gt; &lt;/p&gt;
&lt;p style="margin: 0in 0in 0.0001pt; font-family: Arial;"&gt;&lt;font size="3"&gt;&lt;strong&gt;&lt;span style="font-size: 10pt;"&gt;What is a Dataset?&lt;/span&gt;&lt;/strong&gt;&lt;span style="font-size: 10pt;"&gt;&lt;br /&gt;
Datasets are the result of bringing together &lt;st1:city w:st="on"&gt;&lt;st1:place w:st="on"&gt;ADO&lt;/st1:place&gt;&lt;/st1:city&gt; and XML. A dataset contains one or more data of tabular XML, known as DataTables, these data can be treated separately, or can have relationships defined between them. Indeed these relationships give you &lt;st1:city w:st="on"&gt;&lt;st1:place w:st="on"&gt;ADO&lt;/st1:place&gt;&lt;/st1:city&gt; data SHAPING without needing to master the SHAPE language, which many people are not comfortable with.&lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/font&gt;&lt;/p&gt;
&lt;p style="margin: 0in 0in 0.0001pt; font-family: Arial;"&gt;&lt;font size="3"&gt;&lt;span style="font-size: 10pt;"&gt;The dataset is a disconnected in-memory cache database. The dataset object model looks like this:&lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/font&gt;&lt;/p&gt;
&lt;p style="margin: 0in 0in 0.0001pt; font-family: Arial;"&gt;&lt;font size="3"&gt;&lt;span style="font-size: 10pt;"&gt;Dataset&lt;br /&gt;
  DataTableCollection&lt;br /&gt;
  DataTable&lt;br /&gt;
   DataView&lt;br /&gt;
   DataRowCollection&lt;br /&gt;
    DataRow&lt;br /&gt;
   DataColumnCollection&lt;br /&gt;
    DataColumn&lt;br /&gt;
   ChildRelations&lt;br /&gt;
   ParentRelations&lt;br /&gt;
   Constraints&lt;br /&gt;
   PrimaryKey&lt;br /&gt;
DataRelationCollection&lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/font&gt;&lt;/p&gt;
&lt;p style="margin: 0in 0in 0.0001pt; font-family: Arial;"&gt;&lt;font size="3"&gt;&lt;span style="font-size: 10pt;"&gt;Let’s take a look at each of these:&lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/font&gt;&lt;/p&gt;
&lt;p style="margin: 0in 0in 0.0001pt; font-family: Arial;"&gt;&lt;font size="3"&gt;&lt;span style="font-size: 10pt;"&gt;DataTableCollection: As we say that a DataSet is an in-memory database. So it has this collection, which holds data from multiple tables in a single DataSet object.&lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/font&gt;&lt;/p&gt;
&lt;p style="margin: 0in 0in 0.0001pt; font-family: Arial;"&gt;&lt;font size="3"&gt;&lt;span style="font-size: 10pt;"&gt;DataTable: In the DataTableCollection, we have DataTable objects, which represents the individual tables of the dataset. &lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/font&gt;&lt;/p&gt;
&lt;p style="margin: 0in 0in 0.0001pt; font-family: Arial;"&gt;&lt;font size="3"&gt;&lt;span style="font-size: 10pt;"&gt;DataView: The way we have views in database, same way we can have DataViews. We can use these DataViews to do Sort, filter data.&lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/font&gt;&lt;/p&gt;
&lt;p style="margin: 0in 0in 0.0001pt; font-family: Arial;"&gt;&lt;font size="3"&gt;&lt;span style="font-size: 10pt;"&gt;DataRowCollection: Similar to DataTableCollection, to represent each row in each Table we have DataRowCollection.&lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/font&gt;&lt;/p&gt;
&lt;p style="margin: 0in 0in 0.0001pt; font-family: Arial;"&gt;&lt;font size="3"&gt;&lt;span style="font-size: 10pt;"&gt;DataRow:  To represent each and every row of the DataRowCollection, we have DataRows.&lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/font&gt;&lt;/p&gt;
&lt;p style="margin: 0in 0in 0.0001pt; font-family: Arial;"&gt;&lt;font size="3"&gt;&lt;span style="font-size: 10pt;"&gt;DataColumnCollection: Similar to DataTableCollection, to represent each column in each Table we have DataColumnCollection.&lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/font&gt;&lt;/p&gt;
&lt;p style="margin: 0in 0in 0.0001pt; font-family: Arial;"&gt;&lt;font size="3"&gt;&lt;span style="font-size: 10pt;"&gt;DataColumn: To represent each and every Column of the DataColumnCollection, we have DataColumn.&lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/font&gt;&lt;/p&gt;
&lt;p style="margin: 0in 0in 0.0001pt; font-family: Arial;"&gt;&lt;font size="3"&gt;&lt;span style="font-size: 10pt;"&gt;PrimaryKey: Dataset defines Primary key for the table and the primary key validation will take place without going to the database.&lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/font&gt;&lt;/p&gt;
&lt;p style="margin: 0in 0in 0.0001pt; font-family: Arial;"&gt;&lt;font size="3"&gt;&lt;span style="font-size: 10pt;"&gt;Constraints: We can define various constraints on the Tables, and can use Dataset.Tables(0).enforceConstraints. This will execute all the constraints, whenever we enter data in DataTable.&lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/font&gt;&lt;/p&gt;
&lt;p style="margin: 0in 0in 0.0001pt; font-family: Arial;"&gt;&lt;font size="3"&gt;&lt;span style="font-size: 10pt;"&gt;DataRelationCollection: as we know that we can have more than 1 table in the dataset, we can also define relationship between these tables using this collection and maintain a parent-child relationship.&lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/font&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="text-align: justify; font-family: Arial;"&gt;&lt;font size="3"&gt;&lt;strong&gt;&lt;span style="font-size: 10pt;"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/span&gt;&lt;/strong&gt;&lt;/font&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="font-family: Arial;"&gt;&lt;font size="3"&gt;&lt;span style="font-size: 10pt;"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/span&gt;&lt;/font&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="font-family: Arial;"&gt;&lt;font size="3"&gt;&lt;span style="font-size: 10pt;"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/span&gt;&lt;/font&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="font-family: Arial;"&gt;&lt;font size="3"&gt;&lt;span style="font-size: 10pt;"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/span&gt;&lt;/font&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="font-family: Arial;"&gt;&lt;font size="3"&gt;&lt;span style="font-size: 10pt;"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/span&gt;&lt;/font&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="font-family: Arial;"&gt;&lt;font size="3"&gt;&lt;span style="font-size: 10pt;"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/span&gt;&lt;/font&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="font-family: Arial;"&gt;&lt;font size="3"&gt;&lt;span style="font-size: 10pt;"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/span&gt;&lt;/font&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="font-family: Arial;"&gt;&lt;font size="3"&gt;&lt;span style="font-size: 10pt;"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/span&gt;&lt;/font&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="font-family: Arial;"&gt;&lt;font size="3"&gt;&lt;span style="font-size: 10pt;"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/span&gt;&lt;/font&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="font-family: Arial;"&gt;&lt;font size="3"&gt;&lt;span style="font-size: 10pt;"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/span&gt;&lt;/font&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="font-family: Arial;"&gt;&lt;font size="3"&gt;&lt;span style="font-size: 10pt;"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/span&gt;&lt;/font&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="font-family: Arial;"&gt;&lt;font size="3"&gt;&lt;span style="font-size: 10pt;"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/span&gt;&lt;/font&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="font-family: Arial;"&gt;&lt;font size="3"&gt;&lt;span style="font-size: 10pt;"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/span&gt;&lt;/font&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="font-family: Arial;"&gt;&lt;font size="3"&gt;&lt;span style="font-size: 10pt;"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/span&gt;&lt;/font&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="font-family: Arial;"&gt;&lt;font size="3"&gt;&lt;span style="font-size: 10pt;"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/span&gt;&lt;/font&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="font-family: Arial;"&gt;&lt;font size="3"&gt;&lt;span style="font-size: 10pt;"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/span&gt;&lt;/font&gt;&lt;/p&gt;
&lt;p style="font-family: Arial;"&gt;&lt;font size="3"&gt;&lt;strong&gt;&lt;span style="font-size: 10pt;"&gt;Explain the &lt;st1:place w:st="on"&gt;&lt;st1:city w:st="on"&gt;ADO&lt;/st1:city&gt;&lt;/st1:place&gt; . Net Architecture ( .Net Data Provider)&lt;/span&gt;&lt;/strong&gt;&lt;strong&gt;&lt;span style="font-size: 10pt;"&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/strong&gt;&lt;span style="font-size: 10pt;"&gt;ADO.Net is the data access model for .Net –based applications. It can be used to access relational database systems such as SQL SERVER 2000, Oracle, and many other data sources for which there is an OLD DB or ODBC provider. To a certain extent, ADO.NET represents the latest evolution of &lt;st1:city w:st="on"&gt;&lt;st1:place w:st="on"&gt;ADO&lt;/st1:place&gt;&lt;/st1:city&gt; technology. However, ADO.NET introduces some major changes and innovations that are aimed at the loosely coupled and inherently disconnected – nature of web applications.&lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/font&gt;&lt;/p&gt;
&lt;p style="font-family: Arial;"&gt;&lt;font size="3"&gt;&lt;span style="font-size: 10pt;"&gt;A .Net Framework data provider is used to connecting to a database, executing commands, and retrieving results. Those results are either processed directly, or placed in an ADO.NET DataSet in order to be exposed to the user in an ad-hoc manner, combined with data from multiple sources, or remoted between tiers. The .NET Framework data provider is designed to be lightweight, creating a minimal layer between the data source and your code, increasing performance without sacrificing functionality.&lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/font&gt;&lt;/p&gt;
&lt;p style="font-family: Arial;"&gt;&lt;font size="3"&gt;&lt;span style="font-size: 10pt;"&gt;Following are the 4 core objects of .Net Framework Data provider:&lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/font&gt;&lt;/p&gt;
&lt;ul type="disc" style="font-family: Arial;"&gt;
    &lt;li class="MsoNormal" style=""&gt;&lt;font size="3"&gt;&lt;span style="font-size: 10pt;"&gt;Connection: Establishes a      connection to a specific data source&lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/font&gt;      &lt;/li&gt;
    &lt;li class="MsoNormal" style=""&gt;&lt;font size="3"&gt;&lt;span style="font-size: 10pt;"&gt;Command: Executes a      command against a data source. Exposes Parameters and can execute within      the scope of a Transaction from a Connection.&lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/font&gt; &lt;/li&gt;
    &lt;li class="MsoNormal" style=""&gt;&lt;font size="3"&gt;&lt;span style="font-size: 10pt;"&gt;DataReader: Reads a      forward-only, read-only stream of data from a data source.&lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/font&gt; &lt;/li&gt;
    &lt;li class="MsoNormal" style=""&gt;&lt;font size="3"&gt;&lt;span style="font-size: 10pt;"&gt;DataAdapter: Populates a      DataSet and resolves updates with the data source.&lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/font&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p style="margin: 0in 0in 0.0001pt; font-family: Arial;"&gt;&lt;font size="3"&gt;&lt;span style="font-size: 10pt;"&gt;The .NET Framework includes the .NET Framework Data Provider for SQL Server (for Microsoft SQL Server version 7.0 or later), the .NET Framework Data Provider for OLE DB, and the .NET Framework Data Provider for ODBC.&lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/font&gt;&lt;/p&gt;
&lt;p style="margin: 0in 0in 0.0001pt; font-family: Arial;"&gt;&lt;font size="3"&gt;&lt;span style="font-size: 10pt;"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/span&gt;&lt;/font&gt;&lt;/p&gt;
&lt;p style="margin: 0in 0in 0.0001pt; font-family: Arial;"&gt;&lt;font size="3"&gt;&lt;span style="font-size: 10pt;"&gt;The .NET Framework Data Provider for SQL Server:  The .NET Framework Data Provider for SQL Server uses its own protocol to communicate with SQL Server. It is lightweight and performs well because it is optimized to access a SQL Server directly without adding an OLE DB or Open Database Connectivity (ODBC) layer. The following illustration contrasts the .NET Framework Data Provider for SQL Server with the .NET Framework Data Provider for OLE DB. The .NET Framework Data Provider for OLE DB communicates to an OLE DB data source through both the OLE DB Service component, which provides connection pooling and transaction services, and the OLE DB Provider for the data source &lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/font&gt;&lt;/p&gt;
&lt;p style="margin: 0in 0in 0.0001pt; font-family: Arial;"&gt;&lt;font size="3"&gt;&lt;span style="font-size: 10pt;"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/span&gt;&lt;/font&gt;&lt;/p&gt;
&lt;p style="margin: 0in 0in 0.0001pt; font-family: Arial;"&gt;&lt;font size="3"&gt;&lt;span style="font-size: 10pt;"&gt;The .NET Framework Data Provider for OLE DB: The .NET Framework Data Provider for OLE DB uses native OLE DB through COM interoperability to enable data access. The .NET Framework Data Provider for OLE DB supports both local and distributed transactions. For distributed transactions, the .NET Framework Data Provider for OLE DB, by default, automatically enlists in a transaction and obtains transaction details from Windows 2000 Component Services.&lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/font&gt;&lt;/p&gt;
&lt;p style="margin: 0in 0in 0.0001pt; font-family: Arial;"&gt;&lt;font size="3"&gt;&lt;span style="font-size: 10pt;"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/span&gt;&lt;/font&gt;&lt;/p&gt;
&lt;p style="margin: 0in 0in 0.0001pt; font-family: Arial;"&gt;&lt;font size="3"&gt;&lt;span style="font-size: 10pt;"&gt;The .NET Framework Data Provider for ODBC: The .NET Framework Data Provider for ODBC uses native ODBC Driver Manager (DM) through COM interoperability to enable data access. The ODBC data provider supports both local and distributed transactions. For distributed transactions, the ODBC data provider, by default, automatically enlists in a transaction and obtains transaction details from Windows 2000 Component Services.&lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/font&gt;&lt;/p&gt;
&lt;p style="margin: 0in 0in 0.0001pt; font-family: Arial;"&gt;&lt;font size="3"&gt;&lt;span style="font-size: 10pt;"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/span&gt;&lt;/font&gt;&lt;/p&gt;
&lt;p style="margin: 0in 0in 0.0001pt; font-family: Arial;"&gt;&lt;font size="3"&gt;&lt;span style="font-size: 10pt;"&gt;The .NET Framework Data Provider for Oracle: The .NET Framework Data Provider for Oracle enables data access to Oracle data sources through Oracle client connectivity software. The data provider supports Oracle client software version 8.1.7 and later. The data provider supports both local and distributed transactions (the data provider automatically enlists in existing distributed transactions, but does not currently support the EnlistDistributedTransaction method).&lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/font&gt;&lt;/p&gt;
&lt;p style="margin: 0in 0in 0.0001pt; font-family: Arial;"&gt;&lt;font size="3"&gt;&lt;span style="font-size: 10pt;"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/span&gt;&lt;/font&gt;&lt;/p&gt;
&lt;p style="margin: 0in 0in 0.0001pt; font-family: Arial;"&gt;&lt;font size="3"&gt;&lt;span style="font-size: 10pt;"&gt;The .NET Framework Data Provider for Oracle requires that Oracle client software (version 8.1.7 or later) be installed on the system before you can use it to connect to an Oracle data source.&lt;br /&gt;
.NET Framework Data Provider for Oracle classes are located in the System.Data.OracleClient namespace and are contained in the System.Data.OracleClient.dll assembly. You will need to reference both the System.Data.dll and the System.Data.OracleClient.dll when compiling an application that uses the data provider.&lt;br /&gt;
Choosing a .NET Framework Data Provider&lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/font&gt;&lt;/p&gt;
&lt;p style="margin: 0in 0in 0.0001pt; font-family: Arial;"&gt;&lt;font size="3"&gt;&lt;span style="font-size: 10pt;"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/span&gt;&lt;/font&gt;&lt;/p&gt;
&lt;p style="margin: 0in 0in 0.0001pt; font-family: Arial;"&gt;&lt;font size="3"&gt;&lt;span style="font-size: 10pt;"&gt;.NET Framework Data Provider for SQL Server: Recommended for middle-tier applications using Microsoft SQL Server 7.0 or later. Recommended for single-tier applications using Microsoft Data Engine (MSDE) or Microsoft SQL Server 7.0 or later.&lt;br /&gt;
Recommended over use of the OLE DB Provider for SQL Server (SQLOLEDB) with the .NET Framework Data Provider for OLE DB. For Microsoft SQL Server version 6.5 and earlier, you must use the OLE DB Provider for SQL Server with the .NET Framework Data Provider for OLE DB.&lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/font&gt;&lt;/p&gt;
&lt;p style="margin: 0in 0in 0.0001pt; font-family: Arial;"&gt;&lt;font size="3"&gt;&lt;span style="font-size: 10pt;"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/span&gt;&lt;/font&gt;&lt;/p&gt;
&lt;p style="margin: 0in 0in 0.0001pt; font-family: Arial;"&gt;&lt;font size="3"&gt;&lt;span style="font-size: 10pt;"&gt;.NET Framework Data Provider for OLE DB: Recommended for middle-tier applications using Microsoft SQL Server 6.5 or earlier, or any OLE DB provider. For Microsoft SQL Server 7.0 or later, the .NET Framework Data Provider for SQL Server is recommended. Recommended for single-tier applications using Microsoft Access databases. Use of a Microsoft Access database for a middle-tier application is not recommended.&lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/font&gt;&lt;/p&gt;
&lt;p style="margin: 0in 0in 0.0001pt; font-family: Arial;"&gt;&lt;font size="3"&gt;&lt;span style="font-size: 10pt;"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/span&gt;&lt;/font&gt;&lt;/p&gt;
&lt;p style="margin: 0in 0in 0.0001pt; font-family: Arial;"&gt;&lt;font size="3"&gt;&lt;span style="font-size: 10pt;"&gt;.NET Framework Data Provider for ODBC: Recommended for middle-tier applications using ODBC data sources. Recommended for single-tier applications using ODBC data sources.&lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/font&gt;&lt;/p&gt;
&lt;p style="margin: 0in 0in 0.0001pt; font-family: Arial;"&gt;&lt;font size="3"&gt;&lt;span style="font-size: 10pt;"&gt;.NET Framework Data Provider for Oracle: Recommended for middle-tier applications using Oracle data sources. Recommended for single-tier applications using Oracle data sources. Supports Oracle client software version 8.1.7 and later. The .NET Framework Data Provider for Oracle classes are located in the System.Data.OracleClient namespace and are contained in the System.Data.OracleClient.dll assembly. You need to reference both the System.Data.dll and the System.Data.OracleClient.dll when compiling an application that uses the data provider.&lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/font&gt;&lt;/p&gt;
&lt;p style="margin: 0in 0in 0.0001pt; font-family: Arial;"&gt;&lt;font size="3"&gt;&lt;span style="font-size: 10pt;"&gt;Can you explain the difference between an ADO.NET Dataset and an ADO Recordset?&lt;br /&gt;
Let’s take a look at the differences between ADO Recordset and ADO.Net DataSet:&lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/font&gt;&lt;/p&gt;
&lt;p style="margin: 0in 0in 0.0001pt; font-family: Arial;"&gt;&lt;font size="3"&gt;&lt;span style="font-size: 10pt;"&gt;1. Table Collection: &lt;st1:city w:st="on"&gt;&lt;st1:place w:st="on"&gt;ADO&lt;/st1:place&gt;&lt;/st1:city&gt; Recordset provides the ability to navigate through a single table of information. That table would have been formed with a join of multiple tables and returning columns from multiple tables. ADO.NET DataSet is capable of holding instances of multiple tables. It has got a Table Collection, which holds multiple tables in it. If the tables are having a relation, then it can be manipulated on a Parent-Child relationship. It has the ability to support multiple tables with keys, constraints and interconnected relationships. With this ability the DataSet can be considered as a small, in-memory relational database cache.&lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/font&gt;&lt;/p&gt;
&lt;p style="margin: 0in 0in 0.0001pt; font-family: Arial;"&gt;&lt;font size="3"&gt;&lt;span style="font-size: 10pt;"&gt;2. Navigation: Navigation in ADO Recordset is based on the cursor mode. Even though it is specified to be a client-side Recordset, still the navigation pointer will move from one location to another on cursor model only. ADO.NET DataSet is an entirely offline, in-memory, and cache of data. All of its data is available all the time. At any time, we can retrieve any row or column, constraints or relation simply by accessing it either ordinarily or by retrieving it from a name-based collection.&lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/font&gt;&lt;/p&gt;
&lt;p style="margin: 0in 0in 0.0001pt; font-family: Arial;"&gt;&lt;font size="3"&gt;&lt;span style="font-size: 10pt;"&gt;3. Connectivity Model: The ADO Recordset was originally designed without the ability to operate in a disconnected environment. ADO.NET DataSet is specifically designed to be a disconnected in-memory database. ADO.NET DataSet follows a pure disconnected connectivity model and this gives it much more scalability and versatility in the amount of things it can do and how easily it can do that.&lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/font&gt;&lt;/p&gt;
&lt;p style="margin: 0in 0in 0.0001pt; font-family: Arial;"&gt;&lt;font size="3"&gt;&lt;span style="font-size: 10pt;"&gt;4. Marshalling and Serialization: In COM, through Marshalling, we can pass data from 1 COM component to another component at any time. Marshalling involves copying and processing data so that a complex type can appear to the receiving component the same as it appeared to the sending component. Marshalling is an expensive operation. ADO.NET Dataset and DataTable components support Remoting in the form of XML serialization. Rather than doing expensive Marshalling, it uses XML and sent data across boundaries.&lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/font&gt;&lt;/p&gt;
&lt;p style="margin: 0in 0in 0.0001pt; font-family: Arial;"&gt;&lt;font size="3"&gt;&lt;span style="font-size: 10pt;"&gt;5. Firewalls and DCOM and Remoting: Those who have worked with DCOM know that how difficult it is to marshal a DCOM component across a router. People generally came up with workarounds to solve this issue. ADO.NET DataSet uses Remoting, through which a DataSet / DataTable component can be serialized into XML, sent across the wire to a new AppDomain, and then Desterilized back to a fully functional DataSet. As the DataSet is completely disconnected, and it has no dependency, we lose absolutely nothing by serializing and transferring it through Remoting.&lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/font&gt;&lt;/p&gt;
&lt;p style="margin: 0in 0in 0.0001pt; font-family: Arial;"&gt;&lt;font size="3"&gt;&lt;span style="font-size: 10pt;"&gt;&lt;br /&gt;
&lt;strong&gt;How do you handle data concurrency in .NET ?&lt;/strong&gt;&lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/font&gt;&lt;/p&gt;
&lt;p style="margin: 0in 0in 0.0001pt; font-family: Arial;"&gt;&lt;font size="3"&gt;&lt;span style="font-size: 10pt;"&gt;One of the key features of the ADO.NET DataSet is that it can be a self-contained and disconnected data store. It can contain the schema and data from several rowsets in DataTable objects as well as information about how to relate the DataTable objects-all in memory. The DataSet neither knows nor cares where the data came from, nor does it need a link to an underlying data source. Because it is data source agnostic you can pass the DataSet around networks or even serialize it to XML and pass it across the Internet without losing any of its features. However, in a disconnected model, concurrency obviously becomes a much bigger problem than it is in a connected model.&lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/font&gt;&lt;/p&gt;
&lt;p style="margin: 0in 0in 0.0001pt; font-family: Arial;"&gt;&lt;font size="3"&gt;&lt;span style="font-size: 10pt;"&gt;In this column, I'll explore how ADO.NET is equipped to detect and handle concurrency violations. I'll begin by discussing scenarios in which concurrency violations can occur using the ADO.NET disconnected model. Then I will walk through an ASP.NET application that handles concurrency violations by giving the user the choice to overwrite the changes or to refresh the out-of-sync data and begin editing again. Because part of managing an optimistic concurrency model can involve keeping a timestamp (rowversion) or another type of flag that indicates when a row was last updated, I will show how to implement this type of flag and how to maintain its value after each database update.&lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/font&gt;&lt;/p&gt;
&lt;p style="margin: 0in 0in 0.0001pt; font-family: Arial;"&gt;&lt;font size="3"&gt;&lt;span style="font-size: 10pt;"&gt;&lt;br /&gt;
&lt;em&gt;Is Your Glass Half Full?&lt;/em&gt;&lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/font&gt;&lt;/p&gt;
&lt;p style="margin: 0in 0in 0.0001pt; font-family: Arial;"&gt;&lt;font size="3"&gt;&lt;span style="font-size: 10pt;"&gt;There are three common techniques for managing what happens when users try to modify the same data at the same time: pessimistic, optimistic, and last-in wins. They each handle concurrency issues differently.&lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/font&gt;&lt;/p&gt;
&lt;p style="margin: 0in 0in 0.0001pt; font-family: Arial;"&gt;&lt;font size="3"&gt;&lt;span style="font-size: 10pt;"&gt;The pessimistic approach says: "Nobody can cause a concurrency violation with my data if I do not let them get at the data while I have it." This tactic prevents concurrency in the first place but it limits scalability because it prevents all concurrent access. Pessimistic concurrency generally locks a row from the time it is retrieved until the time updates are flushed to the database. Since this requires a connection to remain open during the entire process, pessimistic concurrency cannot successfully be implemented in a disconnected model like the ADO.NET DataSet, which opens a connection only long enough to populate the DataSet then releases and closes, so a database lock cannot be held.&lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/font&gt;&lt;/p&gt;
&lt;p style="margin: 0in 0in 0.0001pt; font-family: Arial;"&gt;&lt;font size="3"&gt;&lt;span style="font-size: 10pt;"&gt;Another technique for dealing with concurrency is the last-in wins approach. This model is pretty straightforward and easy to implement-whatever data modification was made last is what gets written to the database. To implement this technique you only need to put the primary key fields of the row in the UPDATE statement's WHERE clause. No matter what is changed, the UPDATE statement will overwrite the changes with its own changes since all it is looking for is the row that matches the primary key values. Unlike the pessimistic model, the last-in wins approach allows users to read the data while it is being edited on screen. However, problems can occur when users try to modify the same data at the same time because users can overwrite each other's changes without being notified of the collision. The last-in wins approach does not detect or notify the user of violations because it does not care. However the optimistic technique does detect violations. &lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/font&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="font-family: Arial;"&gt;&lt;font size="3"&gt;&lt;strong&gt;&lt;u&gt;&lt;span style="font-size: 15pt;"&gt;&lt;o:p&gt;&lt;span style="text-decoration: none;"&gt; &lt;/span&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/u&gt;&lt;/strong&gt;&lt;/font&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="font-family: Arial;"&gt;&lt;font size="3"&gt;&lt;strong&gt;&lt;u&gt;&lt;span style="font-size: 15pt;"&gt;&lt;o:p&gt;&lt;span style="text-decoration: none;"&gt; &lt;/span&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/u&gt;&lt;/strong&gt;&lt;/font&gt;&lt;/p&gt;
&lt;p align="right" style="text-align: right; font-family: Arial;"&gt;&lt;font size="3"&gt;&lt;strong&gt;&lt;span style="font-size: 10pt;"&gt;&lt;a href="http://groups.msn.com/MumbaiUserGroup/adonet2.msnw" target="_top"&gt;&lt;span style="color: rgb(153, 0, 0);"&gt;&amp;lt;&amp;lt;Prev&lt;/span&gt;&lt;/a&gt;&lt;span style="color: rgb(153, 0, 0);"&gt; &lt;/span&gt;&lt;a href="http://groups.msn.com/MumbaiUserGroup/adonet4.msnw" target="_top"&gt;&lt;span style="color: rgb(153, 0, 0);"&gt;Next&amp;gt;&amp;gt;&lt;/span&gt;&lt;/a&gt;&lt;/span&gt;&lt;/strong&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/font&gt;&lt;/p&gt;
&lt;p style="font-family: Arial;"&gt;&lt;font size="3"&gt;&lt;span style="font-size: 10pt;"&gt;In optimistic concurrency models, a row is only locked during the update to the database. Therefore the data can be retrieved and updated by other users at any time other than during the actual row update operation. Optimistic concurrency allows the data to be read simultaneously by multiple users and blocks other users less often than its pessimistic counterpart, making it a good choice for ADO.NET. In optimistic models, it is important to implement some type of concurrency violation detection that will catch any additional attempt to modify records that have already been modified but not committed. You can write your code to handle the violation by always rejecting and canceling the change request or by overwriting the request based on some business rules. Another way to handle the concurrency violation is to let the user decide what to do. The sample application that is shown in Figure 1 illustrates some of the options that can be presented to the user in the event of a concurrency violation.&lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/font&gt;&lt;/p&gt;
&lt;p style="font-family: Arial;"&gt;&lt;font size="3"&gt;&lt;em&gt;&lt;span style="font-size: 10pt;"&gt;Where Did My Changes Go?&lt;/span&gt;&lt;/em&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/font&gt;&lt;/p&gt;
&lt;p style="font-family: Arial;"&gt;&lt;font size="3"&gt;&lt;span style="font-size: 10pt;"&gt;When users are likely to overwrite each other's changes, control mechanisms should be put in place. Otherwise, changes could be lost. If the technique you're using is the last-in wins approach, then these types of overwrites are entirely possible.For example, imagine Julie wants to edit an employee's last name to correct the spelling. She navigates to a screen which loads the employee's information into a DataSet and has it presented to her in a Web page. Meanwhile, Scott is notified that the same employee's phone extension has changed. While Julie is correcting the employee's last name, Scott begins to correct his extension. Julie saves her changes first and then Scott saves his.Assuming that the application uses the last-in wins approach and updates the row using a SQL WHERE clause containing only the primary key's value, and assuming a change to one column requires the entire row to be updated, neither Julie nor Scott may immediatelyrealize the concurrency issue that just occurred. In this particular situation, Julie's changes were overwritten by Scott's changes because he saved last, and the last name reverted to the misspelled version.&lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/font&gt;&lt;/p&gt;
&lt;p style="font-family: Arial;"&gt;&lt;font size="3"&gt;&lt;span style="font-size: 10pt;"&gt;So as you can see, even though the users changed different fields, their changes collided and caused Julie's changes to be lost. Without some sort of concurrency detection and handling, these types of overwrites can occur and even go unnoticed.When you run the sample application included in this column's download, you should open two separate instances of Microsoft® Internet Explorer. When I generated the conflict, I opened two instances to simulate two users with two separate sessions so that a concurrency violation would occur in the sample application. When you do this, be careful not to use Ctrl+N because if you open one instance and then use the Ctrl+N technique to open another instance, both windows will share the same session.&lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/font&gt;&lt;/p&gt;
&lt;p style="font-family: Arial;"&gt;&lt;font size="3"&gt;&lt;em&gt;&lt;span style="font-size: 10pt;"&gt;Detecting Violations&lt;/span&gt;&lt;/em&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/font&gt;&lt;/p&gt;
&lt;p style="font-family: Arial;"&gt;&lt;font size="3"&gt;&lt;span style="font-size: 10pt;"&gt;The concurrency violation reported to the user in Figure 1 demonstrates what can happen when multiple users edit the same data at the same time. In Figure 1, the user attempted to modify the first name to "Joe" but since someone else had already modified the last name to "Fuller III," a concurrency violation was detected and reported. ADO.NET detects a concurrency violation when a DataSet containing changed values is passed to a SqlDataAdapter's Update method and no rows are actually modified. Simply using the primary key (in this case the EmployeeID) in the UPDATE statement's WHERE clause will not cause a violation to be detected because it still updates the row (in fact, this technique has the same outcome as the last-in wins technique). Instead, more conditions must be specified in the WHERE clause in order for ADO.NET to detect the violation.&lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/font&gt;&lt;/p&gt;
&lt;p style="font-family: Arial;"&gt;&lt;font size="3"&gt;&lt;span style="font-size: 10pt;"&gt;The key here is to make the WHERE clause explicit enough so that it not only checks the primary key but that it also checks for another appropriate condition. One way to accomplish this is to pass in all modifiable fields to the WHERE clause in addition to the primary key. For example, the application shown in Figure 1 could have its UPDATE statement look like the stored procedure that's shown in Figure 2.&lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/font&gt;&lt;/p&gt;
&lt;p style="font-family: Arial;"&gt;&lt;font size="3"&gt;&lt;span style="font-size: 10pt;"&gt;Notice that in the code in Figure 2 nullable columns are also checked to see if the value passed in is NULL. This technique is not only messy but it can be difficult to maintain by hand and it requires you to test for a significant number of WHERE conditions just to update a row. This yields the desired result of only updating rows where none of the values have changed since the last time the user got the data, but there are other techniques that do not require such a huge WHERE clause.&lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/font&gt;&lt;/p&gt;
&lt;p style="font-family: Arial;"&gt;&lt;font size="3"&gt;&lt;span style="font-size: 10pt;"&gt;Another way to make sure that the row is only updated if it has not been modified by another user since you got the data is to add a timestamp column to the table. The SQL Server(tm) TIMESTAMP datatype automatically updates itself with a new value every time a value in its row is modified. This makes it a very simple and convenient tool to help detect concurrency violations.&lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/font&gt;&lt;/p&gt;
&lt;p style="font-family: Arial;"&gt;&lt;font size="3"&gt;&lt;span style="font-size: 10pt;"&gt;A third technique is to use a DATETIME column in which to track changes to its row. In my sample application I added a column called LastUpdateDateTime to the Employees table. &lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/font&gt;&lt;/p&gt;
&lt;p style="font-family: Arial;"&gt;&lt;font size="3"&gt;&lt;span style="font-size: 10pt;"&gt;ALTER TABLE Employees ADD LastUpdateDateTime DATETIME&lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/font&gt;&lt;/p&gt;
&lt;p style="font-family: Arial;"&gt;&lt;font size="3"&gt;&lt;span style="font-size: 10pt;"&gt;There I update the value of the LastUpdateDateTime field automatically in the UPDATE stored procedure using the built-in SQL Server GETDATE function. &lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/font&gt;&lt;/p&gt;
&lt;p style="font-family: Arial;"&gt;&lt;font size="3"&gt;&lt;span style="font-size: 10pt;"&gt;The binary TIMESTAMP column is simple to create and use since it automatically regenerates its value each time its row is modified, but since the DATETIME column technique is easier to display on screen and demonstrate when the change was made, I chose it for my sample application. Both of these are solid choices, but I prefer the TIMESTAMP technique since it does not involve any additional code to update its value.&lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/font&gt;&lt;/p&gt;
&lt;p style="font-family: Arial;"&gt;&lt;font size="3"&gt;&lt;em&gt;&lt;span style="font-size: 10pt;"&gt;Retrieving Row Flags&lt;/span&gt;&lt;/em&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/font&gt;&lt;/p&gt;
&lt;p style="font-family: Arial;"&gt;&lt;font size="3"&gt;&lt;span style="font-size: 10pt;"&gt;One of the keys to implementing concurrency controls is to update the timestamp or datetime field's value back into the DataSet. If the same user wants to make more modifications, this updated value is reflected in the DataSet so it can be used again. There are a few different ways to do this. The fastest is using output parameters within the stored procedure. (This should only return if @@ROWCOUNT equals 1.) The next fastest involves selecting the row again after the UPDATE within the stored procedure. The slowest involves selecting the row from another SQL statement or stored procedure from the SqlDataAdapter's RowUpdated event.&lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/font&gt;&lt;/p&gt;
&lt;p style="font-family: Arial;"&gt;&lt;font size="3"&gt;&lt;span style="font-size: 10pt;"&gt;I prefer to use the output parameter technique since it is the fastest and incurs the least overhead. Using the RowUpdated event works well, but it requires me to make a second call from the application to the database. The following code snippet adds an output parameter to the SqlCommand object that is used to update the Employee information: &lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/font&gt;&lt;/p&gt;
&lt;p style="font-family: Arial;"&gt;&lt;font size="3"&gt;&lt;span style="font-size: 10pt;"&gt;oUpdCmd.Parameters.Add(new SqlParameter("@NewLastUpdateDateTime", &lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/font&gt;&lt;/p&gt;
&lt;p style="font-family: Arial;"&gt;&lt;font size="3"&gt;&lt;span style="font-size: 10pt;"&gt;  SqlDbType.DateTime, 8, ParameterDirection.Output, &lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/font&gt;&lt;/p&gt;
&lt;p style="font-family: Arial;"&gt;&lt;font size="3"&gt;&lt;span style="font-size: 10pt;"&gt;  false, 0, 0, "LastUpdateDateTime", DataRowVersion.Current, null));&lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/font&gt;&lt;/p&gt;
&lt;p style="font-family: Arial;"&gt;&lt;font size="3"&gt;&lt;span style="font-size: 10pt;"&gt;oUpdCmd.UpdatedRowSource = UpdateRowSource.OutputParameters;&lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/font&gt;&lt;/p&gt;
&lt;p style="font-family: Arial;"&gt;&lt;font size="3"&gt;&lt;span style="font-size: 10pt;"&gt;The output parameter has its sourcecolumn and sourceversion arguments set to point the output parameter's return value back to the current value of the LastUpdateDateTime column of the DataSet. This way the updated DATETIME value is retrieved and can be returned to the user's .aspx page. &lt;em&gt;&lt;strong&gt;Contd....&lt;/strong&gt;&lt;/em&gt;&lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/font&gt;&lt;/p&gt;
&lt;p style="font-family: Arial;"&gt;&lt;font size="3"&gt;&lt;em&gt;&lt;span style="font-size: 10pt;"&gt;Saving Changes&lt;/span&gt;&lt;/em&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/font&gt;&lt;/p&gt;
&lt;p style="font-family: Arial;"&gt;&lt;font size="3"&gt;&lt;span style="font-size: 10pt;"&gt;Now that the Employees table has the tracking field (LastUpdateDateTime) and the stored procedure has been created to use both the primary key and the tracking field in the WHERE clause of the UPDATE statement, let's take a look at the role of ADO.NET. In order to trap the event when the user changes the values in the textboxes, I created an event handler for the TextChanged event for each TextBox control: &lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/font&gt;&lt;/p&gt;
&lt;p style="font-family: Arial;"&gt;&lt;font size="3"&gt;&lt;span style="font-size: 10pt;"&gt;private void txtLastName_TextChanged(object sender, System.EventArgs e)&lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/font&gt;&lt;/p&gt;
&lt;p style="font-family: Arial;"&gt;&lt;font size="3"&gt;&lt;span style="font-size: 10pt;"&gt;{&lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/font&gt;&lt;/p&gt;
&lt;p style="font-family: Arial;"&gt;&lt;font size="3"&gt;&lt;span style="font-size: 10pt;"&gt;    // Get the employee DataRow (there is only 1 row, otherwise I could&lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/font&gt;&lt;/p&gt;
&lt;p style="font-family: Arial;"&gt;&lt;font size="3"&gt;&lt;span style="font-size: 10pt;"&gt;    // do a Find)&lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/font&gt;&lt;/p&gt;
&lt;p style="font-family: Arial;"&gt;&lt;font size="3"&gt;&lt;span style="font-size: 10pt;"&gt;    dsEmployee.EmployeeRow oEmpRow =&lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/font&gt;&lt;/p&gt;
&lt;p style="font-family: Arial;"&gt;&lt;font size="3"&gt;&lt;span style="font-size: 10pt;"&gt;           (dsEmployee.EmployeeRow)oDsEmployee.Employee.Rows[0];&lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/font&gt;&lt;/p&gt;
&lt;p style="font-family: Arial;"&gt;&lt;font size="3"&gt;&lt;span style="font-size: 10pt;"&gt;    oEmpRow.LastName = txtLastName.Text;&lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/font&gt;&lt;/p&gt;
&lt;p style="font-family: Arial;"&gt;&lt;font size="3"&gt;&lt;span style="font-size: 10pt;"&gt;    // Save changes back to Session&lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/font&gt;&lt;/p&gt;
&lt;p style="font-family: Arial;"&gt;&lt;font size="3"&gt;&lt;span style="font-size: 10pt;"&gt;    Session["oDsEmployee"] = oDsEmployee;&lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/font&gt;&lt;/p&gt;
&lt;p style="font-family: Arial;"&gt;&lt;font size="3"&gt;&lt;span style="font-size: 10pt;"&gt;}&lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/font&gt;&lt;/p&gt;
&lt;p style="font-family: Arial;"&gt;&lt;font size="3"&gt;&lt;span style="font-size: 10pt;"&gt;This event retrieves the row and sets the appropriate field's value from the TextBox. (Another way of getting the changed values is to grab them when the user clicks the Save button.) Each TextChanged event executes after the Page_Load event fires on a postback, so assuming the user changed the first and last names, when the user clicks the Save button, the events could fire in this order: Page_Load, txtFirstName_TextChanged, txtLastName_TextChanged, and btnSave_Click.&lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/font&gt;&lt;/p&gt;
&lt;p style="font-family: Arial;"&gt;&lt;font size="3"&gt;&lt;span style="font-size: 10pt;"&gt;The Page_Load event grabs the row from the DataSet in the Session object; the TextChanged events update the DataRow with the new values; and the btnSave_Click event attempts to save the record to the database. The btnSave_Click event calls the SaveEmployee method (shown in Figure 3) and passes it a bLastInWins value of false since we want to attempt a standard save first. If the SaveEmployee method detects that changes were made to the row (using the HasChanges method on the DataSet, or alternatively using the RowState property on the row), it creates an instance of the Employee class and passes the DataSet to its SaveEmployee method. The Employee class could live in a logical or physical middle tier. (I wanted to make this a separate class so it would be easy to pull the code out and separate it from the presentation logic.) &lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/font&gt;&lt;/p&gt;
&lt;p style="font-family: Arial;"&gt;&lt;font size="3"&gt;&lt;span style="font-size: 10pt;"&gt;Notice that I did not use the GetChanges method to pull out only the modified rows and pass them to the Employee object's Save method. I skipped this step here since there is only one row. However, if there were multiple rows in the DataSet's DataTable, it would be better to use the GetChanges method to create a DataSet that contains only the modified rows.&lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/font&gt;&lt;/p&gt;
&lt;p style="font-family: Arial;"&gt;&lt;font size="3"&gt;&lt;span style="font-size: 10pt;"&gt;If the save succeeds, the Employee.SaveEmployee method returns a DataSet containing the modified row and its newly updated row version flag (in this case, the LastUpdateDateTime field's value). This DataSet is then merged into the original DataSet so that the LastUpdateDateTime field's value can be updated in the original DataSet. This must be done because if the user wants to make more changes she will need the current values from the database merged back into the local DataSet and shown on screen. This includes the LastUpdateDateTime value which is used in the WHERE clause. Without this field's current value, a false concurrency violation would occur.&lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/font&gt;&lt;/p&gt;
&lt;p style="font-family: Arial;"&gt;&lt;font size="3"&gt;&lt;em&gt;&lt;span style="font-size: 10pt;"&gt;Reporting Violations&lt;/span&gt;&lt;/em&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/font&gt;&lt;/p&gt;
&lt;p style="font-family: Arial;"&gt;&lt;font size="3"&gt;&lt;span style="font-size: 10pt;"&gt;If a concurrency violation occurs, it will bubble up and be caught by the exception handler shown in Figure 3 in the catch block for DBConcurrencyException. This block calls the FillConcurrencyValues method, which displays both the original values in the DataSet that were attempted to be saved to the database and the values currently in the database. This method is used merely to show the user why the violation occurred. Notice that the exDBC variable is passed to the FillConcurrencyValues method. This instance of the special database concurrency exception class (DBConcurrencyException) contains the row where the violation occurred. When a concurrency violation occurs, the screen is updated to look like Figure 1.&lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/font&gt;&lt;/p&gt;
&lt;p style="font-family: Arial;"&gt;&lt;font size="3"&gt;&lt;span style="font-size: 10pt;"&gt;The DataSet not only stores the schema and the current data, it also tracks changes that have been made to its data. It knows which rows and columns have been modified and it keeps track of the before and after versions of these values. When accessing a column's value via the DataRow's indexer, in addition to the column index you can also specify a value using the DataRowVersion enumerator. For example, after a user changes the value of the last name of an employee, the following lines of C# code will retrieve the original and current values stored in the LastName column: &lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/font&gt;&lt;/p&gt;
&lt;p style="font-family: Arial;"&gt;&lt;font size="3"&gt;&lt;span style="font-size: 10pt;"&gt;string sLastName_Before = oEmpRow["LastName", DataRowVersion.Original];&lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/font&gt;&lt;/p&gt;
&lt;p style="font-family: Arial;"&gt;&lt;font size="3"&gt;&lt;span style="font-size: 10pt;"&gt;string sLastName_After = oEmpRow["LastName", DataRowVersion.Current];&lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/font&gt;&lt;/p&gt;
&lt;p style="font-family: Arial;"&gt;&lt;font size="3"&gt;&lt;span style="font-size: 10pt;"&gt;The FillConcurrencyValues method uses the row from the DBConcurrencyException and gets a fresh copy of the same row from the database. It then displays the values using the DataRowVersion enumerators to show the original value of the row before the update and the value in the database alongside the current values in the textboxes.&lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/font&gt;&lt;/p&gt;
&lt;p style="font-family: Arial;"&gt;&lt;font size="3"&gt;&lt;em&gt;&lt;span style="font-size: 10pt;"&gt;User's Choice&lt;/span&gt;&lt;/em&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/font&gt;&lt;/p&gt;
&lt;p style="font-family: Arial;"&gt;&lt;font size="3"&gt;&lt;span style="font-size: 10pt;"&gt;Once the user has been notified of the concurrency issue, you could leave it up to her to decide how to handle it. Another alternative is to code a specific way to deal with concurrency, such as always handling the exception to let the user know (but refreshing the data from the database). In this sample application I let the user decide what to do next. She can either cancel changes, cancel and reload from the database, save changes, or save anyway.&lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/font&gt;&lt;/p&gt;
&lt;p style="font-family: Arial;"&gt;&lt;font size="3"&gt;&lt;span style="font-size: 10pt;"&gt;The option to cancel changes simply calls the RejectChanges method of the DataSet and rebinds the DataSet to the controls in the ASP.NET page. The RejectChanges method reverts the changes that the user made back to its original state by setting all of the current field values to the original field values. The option to cancel changes and reload the data from the database also rejects the changes but additionally goes back to the database via the Employee class in order to get a fresh copy of the data before rebinding to the control on the ASP.NET page.&lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/font&gt;&lt;/p&gt;
&lt;p style="font-family: Arial;"&gt;&lt;font size="3"&gt;&lt;span style="font-size: 10pt;"&gt;The option to save changes attempts to save the changes but will fail if a concurrency violation is encountered. Finally, I included a "save anyway" option. This option takes the values the user attempted to save and uses the last-in wins technique, overwriting whatever is in the database. It does this by calling a different command object associated with a stored procedure that only uses the primary key field (EmployeeID) in the WHERE clause of the UPDATE statement. This technique should be used with caution as it will overwrite the record.&lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/font&gt;&lt;/p&gt;
&lt;p style="font-family: Arial;"&gt;&lt;font size="3"&gt;&lt;span style="font-size: 10pt;"&gt;If you want a more automatic way of dealing with the changes, you could get a fresh copy from the database. Then overwrite just the fields that the current user modified, such as the Extension field. That way, in the example I used the proper LastName would not be overwritten. Use this with caution as well, however, because if the same field was modified by both users, you may want to just back out or ask the user what to do next. What is obvious here is that there are several ways to deal with concurrency violations, each of which must be carefully weighed before you decide on the one you will use in your application.&lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/font&gt;&lt;/p&gt;
&lt;p style="font-family: Arial;"&gt;&lt;font size="3"&gt;&lt;em&gt;&lt;span style="font-size: 10pt;"&gt;Wrapping It Up&lt;/span&gt;&lt;/em&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/font&gt;&lt;/p&gt;
&lt;p style="font-family: Arial;"&gt;&lt;font size="3"&gt;&lt;span style="font-size: 10pt;"&gt;Setting the SqlDataAdapter's ContinueUpdateOnError property tells the SqlDataAdapter to either throw an exception when a concurrency violation occurs or to skip the row that caused the violation and to continue with the remaining updates. By setting this property to false (its default value), it will throw an exception when it encounters a concurrency violation. This technique is ideal when only saving a single row or when you are attempting to save multiple rows and want them all to commit or all to fail.&lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/font&gt;&lt;/p&gt;
&lt;p style="font-family: Arial;"&gt;&lt;font size="3"&gt;&lt;span style="font-size: 10pt;"&gt;I have split the topic of concurrency violation management into two parts. Next time I will focus on what to do when multiple rows could cause concurrency violations. I will also discuss how the DataViewRowState enumerators can be used to show what changes have been made to a DataSet.&lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/font&gt;&lt;/p&gt;
&lt;p style="font-family: Arial;"&gt;&lt;font size="3"&gt;&lt;strong&gt;&lt;span style="font-size: 10pt;"&gt;How you will set the datarelation between two columns?&lt;/span&gt;&lt;/strong&gt;&lt;strong&gt;&lt;span style="font-size: 10pt;"&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/strong&gt;&lt;span style="font-size: 10pt;"&gt;ADO.NET provides DataRelation object to set relation between two columns.It helps to enforce the following  constraints,a unique constraint, which guarantees that a column in the table  contains no duplicates and a foreign-key constraint,which can be used to maintain referential  integrity.A unique constraint is implemented either by simply setting the Unique property of a data  column to true, or by adding an instance of the UniqueConstraint class to the DataRelation object's ParentKeyConstraint. As part of the foreign-key constraint, you can specify referential integrity  rules that are applied at three points,when a parent record is updated,when a parent record is deleted and when a change is accepted or rejected.&lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/font&gt;&lt;/p&gt;
&lt;div align="center" class="MsoNormal" style="text-align: center; font-family: Arial;"&gt;&lt;font size="3"&gt;&lt;span style="font-size: 10pt;"&gt;  &lt;hr width="100%" size="2" align="center" /&gt;
&lt;/span&gt;&lt;/font&gt;&lt;/div&gt;
&lt;p class="MsoNormal" style="font-family: Arial;"&gt;&lt;font size="3"&gt;&lt;strong&gt;&lt;u&gt;&lt;span style="font-size: 15pt;"&gt;&lt;o:p&gt;&lt;span style="text-decoration: none;"&gt; &lt;/span&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/u&gt;&lt;/strong&gt;&lt;/font&gt;&lt;/p&gt;&lt;p&gt;&lt;a href="http://www.pheedo.com/click.phdo?x=6cda6ad746d942b9a1110d0715a4fa12&amp;u=120987"&gt;&lt;img src="http://www.pheedo.com/img.phdo?x=6cda6ad746d942b9a1110d0715a4fa12&amp;u=120987" border="0"/&gt;&lt;/a&gt;&lt;/p&gt;&lt;iframe src="http://ads.geekswithblogs.net/a.aspx?ZoneID=5&amp;amp;Task=Get&amp;amp;PageID=31016&amp;amp;SiteID=1" width=1 height=1 Marginwidth=0 Marginheight=0 Hspace=0 Vspace=0 Frameborder=0 Scrolling=No&gt;
&lt;script language='javascript1.1' src="http://ads.geekswithblogs.net/a.aspx?ZoneID=5&amp;amp;Task=Get&amp;amp;Browser=NETSCAPE4&amp;amp;NoCache=True&amp;PageID=31016&amp;amp;SiteID=1"&gt;&lt;/script&gt;
&lt;noscript&gt;&lt;a href="http://ads.geekswithblogs.net/a.aspx?ZoneID=5&amp;amp;Task=Click&amp;amp;Mode=HTML&amp;amp;SiteID=1&amp;amp;PageID=31016" target="_blank"&gt;
&lt;img src="http://ads.geekswithblogs.net/a.aspx?ZoneID=5&amp;amp;Task=Get&amp;amp;Mode=HTML&amp;amp;SiteID=1&amp;amp;PageID=31016" width="1" height="1" border="0"  alt=""&gt;&lt;/a&gt;
&lt;/noscript&gt;
&lt;/iframe&gt;
&lt;img src="http://geekswithblogs.net/Gaurav/aggbug/120987.aspx" width="1" height="1" /&gt;</description>
            <dc:creator>Gaurav Taneja</dc:creator>
            <guid>http://geekswithblogs.net/Gaurav/archive/2008/04/02/120987.aspx</guid>
            <pubDate>Thu, 03 Apr 2008 03:43:29 GMT</pubDate>
            <wfw:comment>http://geekswithblogs.net/Gaurav/comments/120987.aspx</wfw:comment>
            <comments>http://geekswithblogs.net/Gaurav/archive/2008/04/02/120987.aspx#feedback</comments>
            <wfw:commentRss>http://geekswithblogs.net/Gaurav/comments/commentRss/120987.aspx</wfw:commentRss>
            <trackback:ping>http://geekswithblogs.net/Gaurav/services/trackbacks/120987.aspx</trackback:ping>
        </item>
        <item>
            <title>Code Access Security (CAS)</title>
            <link>http://geekswithblogs.net/Gaurav/archive/2008/04/02/120985.aspx</link>
            <description>&lt;p class="MsoNormal" style="font-family: Times New Roman;"&gt;&lt;strong&gt;&lt;u&gt;&lt;span style="font-size: 10pt;"&gt;Code Access Security (CAS)&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/u&gt;&lt;/strong&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="font-family: Times New Roman;"&gt;&lt;strong&gt;&lt;u&gt;&lt;span style="font-size: 10pt;"&gt;&lt;o:p&gt;&lt;span style="text-decoration: none;"&gt; &lt;/span&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/u&gt;&lt;/strong&gt;&lt;/p&gt;
&lt;p class="MsoBodyText" style="font-family: Times New Roman;"&gt;Ask any typical .NET developer about Code Access Security (CAS) and you've got the chance of hearing "Huh?" as the response. Most developers haven't run into CAS at all—let alone in a way that would cause them to develop a deep understanding of it. &lt;span style=""&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p style="font-family: Times New Roman;"&gt;&lt;span style="font-size: 10pt;"&gt;Ask your typical SharePoint developer about CAS and they're likely to begin to shudder uncontrollably. Why is that? Well, SharePoint developers have been dealing with CAS since the day that SharePoint was released. Unlike ASP.NET, which makes the assumption of full trust—effectively neutralizing any impact that CAS will have on a standard .NET application—SharePoint starts with a minimal trust, which means most code will need to have a CAS policy applied to it in order to work. &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p style="font-family: Times New Roman;"&gt;&lt;span style="font-size: 10pt;"&gt;Until.NET 2.0 switches the default from full trust, not much is likely to change on that front. But there has been one change in .NET that will encourage some Web developers to dig into CAS: new support for web parts. As Sharepoint developers know, Web parts are bits of code that can be plugged into application frameworks and be used to construct a visual interface. It is not unlike the way that user controls can be added to a web page except that web parts are designed to be moved and controlled at run time, not design time. &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p style="font-family: Times New Roman;"&gt;&lt;span style="font-size: 10pt;"&gt;In this article I'll explore what every web developer needs to know about CAS policies, and how they fit with both SharePoint and ASP.NET 2.0 &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p style="font-family: Times New Roman;"&gt;&lt;strong&gt;&lt;span style="font-size: 10pt;"&gt;Why CAS?&lt;/span&gt;&lt;/strong&gt;&lt;span style="font-size: 10pt;"&gt;&lt;br /&gt;
Before I drop into the details of what CAS is, you need to understand its place in the security world, including what it is not and why it's necessary. We are all familiar with Windows' basic security structure, which allows or denies operation based on the user who is logged in. We're also aware that all too often we're running as administrators on our local machines because eventually every user runs into something they need to do that requires administrative privileges. &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p style="font-family: Times New Roman;"&gt;&lt;span style="font-size: 10pt;"&gt;The problem, which has been demonstrated again and again by wave after wave of viruses and worms, is that any code that is run, intentionally or accidentally, by the user has all of their permissions. In the case of a user who is an administrator, that means it can do anything. This is a bad situation, not only because this effectively puts users in charge of what code to run on a case-by-case basis, opening the door for mistakes, but also because it's intrusive to the user. Being prompted for access time and again as software is loading eventually becomes tiresome. &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p style="font-family: Times New Roman;"&gt;&lt;span style="font-size: 10pt;"&gt;To complicate the problem, consider the case of a hosting company that is trying to make sure that several applications run on the same server without interfering with one another. There may be permissions that one application requires that they wouldn't want to give users directly. Such is the case with SharePoint, which will only run on a machine where the user is qualified as an Administrator (or Power User). That's more permissions than you would generally want to give to a hosting customer. &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p style="font-family: Times New Roman;"&gt;&lt;span style="font-size: 10pt;"&gt;Enter CAS. CAS doesn't approach security from the perspective of the logged in user and their role on the system. It augments role-based security; it doesn't replace it. It approaches security from the perspective of a trust level for the code being run. In this way, users who log in to the system as administrators can still be restricted from performing certain actions that, under role-based security, would always be in their purview. The level of trust for a particular program, then, provides another way to secure a system—with a lesser permission set than the users have themselves. &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p style="font-family: Times New Roman;"&gt;&lt;span style="font-size: 10pt;"&gt;Suddenly, you have a way to allow the user to directly delete files but to prevent an &lt;em&gt;application&lt;/em&gt;—something that they downloaded from the Internet, perhaps—from doing any deletions. Web hosting companies have a way to allow SharePoint to access the entire system while limiting the customer's access to only areas they should have access to. &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;
&lt;div align="center" style="font-family: Times New Roman;"&gt;
&lt;table cellspacing="0" cellpadding="0" border="0" style="" class="MsoNormalTable"&gt;
    &lt;tbody&gt;
        &lt;tr&gt;
            &lt;td style="padding: 0in;"&gt;
            &lt;p align="center" style="margin: 7.5pt 0in; text-align: center;" class="MsoNormal"&gt;&lt;strong&gt;&lt;span style="font-size: 10pt;"&gt;How   Does CAS Work?&lt;/span&gt;&lt;/strong&gt;&lt;span style="font-size: 10pt;"&gt;&lt;br /&gt;
            CAS defines permissions sets—things that can be done by a set of code and   membership conditions. To do this, CAS identifies and characterizes client   code so the appropriate permissions for that code can be determined. So   defining how you want code access security to work is all about defining what   you want an application to be able to do—and not do—and then telling .NET how   to figure out whether the code gets the permission set to work. &lt;/span&gt;&lt;span style="font-size: 10pt;"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;
            &lt;/td&gt;
        &lt;/tr&gt;
        &lt;tr style=""&gt;
            &lt;td style="padding: 0in;"&gt;
            &lt;p style="margin: 7.5pt 0in;" class="MsoNormal"&gt;&lt;span style="font-size: 10pt;"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;
            &lt;/td&gt;
        &lt;/tr&gt;
    &lt;/tbody&gt;
&lt;/table&gt;
&lt;/div&gt;
&lt;p style="font-family: Times New Roman;"&gt;&lt;span style="font-size: 10pt;"&gt;The next few sections connect the pieces of the system that define how CAS will make those determinations. After you have an understanding of how CAS settings are processed in an ASP.NET application, I'll show you how to create your own custom CAS policy and watch it in action. &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p style="font-family: Times New Roman;"&gt;&lt;strong&gt;&lt;span style="font-size: 10pt;"&gt;Defining CAS in the web.config&lt;/span&gt;&lt;/strong&gt;&lt;span style="font-size: 10pt;"&gt;&lt;br /&gt;
The first tool in configuring the CAS is the web.config. There are actually two areas that define CAS settings in the web.config file. Both of these areas are located within the &amp;lt;system.web&amp;gt; tag in the web.config file. The first section is a &amp;lt;securityPolicy&amp;gt; tag, which has no attributes and contains a set of &amp;lt;trustLevel&amp;gt; tags. &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p style="font-family: Times New Roman;"&gt;&lt;span style="font-size: 10pt;"&gt;The &amp;lt;trustLevel&amp;gt; tag is the tag that creates an association between a friendly name for the security policy and the actual policy file. The attributes for the trustLevel tag are: &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;
&lt;ul type="disc" style="font-family: Times New Roman;"&gt;
    &lt;li style="" class="MsoNormal"&gt;&lt;span style="font-size: 10pt;"&gt;name—This is the friendly      name for the policy file as it will be referred to below. &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/li&gt;
    &lt;li style="" class="MsoNormal"&gt;&lt;span style="font-size: 10pt;"&gt;policyFile—This is the file      name of the policy file. If the policy file is not located in the same      directory as the web.config file it is a full path to the policy file      including the file name.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p class="MsoNormal" style="font-family: Times New Roman;"&gt;&lt;span style="font-size: 10pt;"&gt;SharePoint, for instance, defines two &amp;lt;trustLevel&amp;gt; tags with names of WSS_Medium and WSS_Minimal. These are the two out-of-the-box policy files that SharePoint provides. As mentioned above, ASP.NET does not, by default, configure CAS at all—the default is Full trust. So if you're running ASP.NET without configuration you won't find these entries. &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p style="margin: 0in 0in 0.0001pt; font-family: Times New Roman;"&gt;&lt;span style="font-size: 10pt;"&gt;The second part of the configuration for the web.config is a &amp;lt;trust&amp;gt; tag, which is also placed in the &amp;lt;system.web&amp;gt; tag. The &amp;lt;trust&amp;gt; tag takes two attributes. They are: &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;
&lt;ul type="disc" style="font-family: Times New Roman;"&gt;
    &lt;li style="" class="MsoNormal"&gt;&lt;span style="font-size: 10pt;"&gt;level—The level attribute      corresponds to one of the &amp;lt;trustLevel&amp;gt; tag name attributes from      above, or Full for full trust. &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/li&gt;
    &lt;li style="" class="MsoNormal"&gt;&lt;span style="font-size: 10pt;"&gt;originUrl—This specifies      the host name for permissions that are defined only for certain hosts.      This attribute is optional.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p class="MsoNormal" style="font-family: Times New Roman;"&gt;&lt;span style="font-size: 10pt;"&gt;The entire &amp;lt;system.web&amp;gt; section and the &amp;lt;trust&amp;gt; tag can be encapsulated in a &amp;lt;location&amp;gt; tag if you need to allow for different locations with different trust levels or if you want to make sure that no one with an application in a subdirectory can override your settings. You can find out more about the &amp;lt;location&amp;gt; element in the MSDN documentation at &lt;a target="_blank" href="http://msdn.microsoft.com/library/default.asp?url=/library/en-us/cpgenref/html/gngrflocationelement.asp"&gt;http://msdn.microsoft.com/library/default.asp?url=/library/en-us/cpgenref/html/gngrflocationelement.asp&lt;/a&gt;. &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p style="margin: 0in 0in 0.0001pt; font-family: Times New Roman;"&gt;&lt;strong&gt;&lt;span style="font-size: 10pt;"&gt;Defining the Policy File&lt;/span&gt;&lt;/strong&gt;&lt;span style="font-size: 10pt;"&gt;&lt;br /&gt;
Using the two entries in the web.config file ASP.NET will load your CAS policy file. Now it's time to put something in that file that ASP.NET can use. To do that you may want to look at the configuration files already installed on your system by the framework. You can look in &lt;span class="pf"&gt;%WINDIR%\Microsoft.Net\Framework\V2.0.50727\CONFIG&lt;/span&gt;. The &lt;span class="pf"&gt;web_lowtrust.config&lt;/span&gt; is a simple file that you can start with to get comfortable with the file format. The &lt;span class="pf"&gt;web_hightrust.config&lt;/span&gt; is a reasonably complicated file that can be useful when you've gotten comfortable with the basic structure and how the files fit together. &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p style="margin: 0in 0in 0.0001pt; font-family: Times New Roman;"&gt;&lt;span style="font-size: 10pt;"&gt;The basic structure of the file is as follows: &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;
&lt;pre style="font-family: Times New Roman;"&gt;&lt;code&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;pre style="font-family: Times New Roman;"&gt;&lt;code&gt;&amp;lt;configuration&amp;gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;pre style="font-family: Times New Roman;"&gt;&lt;code&gt;&lt;span style=""&gt;     &lt;/span&gt;&amp;lt;mscorlib&amp;gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;pre style="font-family: Times New Roman;"&gt;&lt;code&gt;&lt;span style=""&gt;          &lt;/span&gt;&amp;lt;security&amp;gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;pre style="font-family: Times New Roman;"&gt;&lt;code&gt;&lt;span style=""&gt;               &lt;/span&gt;&amp;lt;policy&amp;gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;pre style="font-family: Times New Roman;"&gt;&lt;code&gt;&lt;span style=""&gt;                    &lt;/span&gt;&amp;lt;PolicyLevel&amp;gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;pre style="font-family: Times New Roman;"&gt;&lt;code&gt;&lt;span style=""&gt;                         &lt;/span&gt;&amp;lt;SecurityClasses&amp;gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;pre style="font-family: Times New Roman;"&gt;&lt;code&gt;&lt;span style=""&gt;                              &lt;/span&gt;&amp;lt;SecurityClass&amp;gt; …&lt;o:p&gt;&lt;/o:p&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;pre style="font-family: Times New Roman;"&gt;&lt;code&gt;&lt;span style=""&gt;                         &lt;/span&gt;&amp;lt;/SecurityClasses&amp;gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;pre style="font-family: Times New Roman;"&gt;&lt;code&gt;&lt;span style=""&gt;                         &lt;/span&gt;&amp;lt;NamedPermissionSets&amp;gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;pre style="font-family: Times New Roman;"&gt;&lt;code&gt;&lt;span style=""&gt;                              &lt;/span&gt;&amp;lt;PermissionSet&amp;gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;pre style="font-family: Times New Roman;"&gt;&lt;code&gt;&lt;span style=""&gt;                                   &lt;/span&gt;&amp;lt;IPermission&amp;gt; …&lt;o:p&gt;&lt;/o:p&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;pre style="font-family: Times New Roman;"&gt;&lt;code&gt;&lt;span style=""&gt;               &lt;/span&gt;&lt;span style=""&gt;               &lt;/span&gt;&amp;lt;/PermissionSet&amp;gt; …&lt;o:p&gt;&lt;/o:p&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;pre style="font-family: Times New Roman;"&gt;&lt;code&gt;&lt;span style=""&gt;                         &lt;/span&gt;&amp;lt;/NamedPermissionSets&amp;gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;pre style="font-family: Times New Roman;"&gt;&lt;code&gt;&lt;span style=""&gt;                         &lt;/span&gt;&amp;lt;CodeGroup&amp;gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;pre style="font-family: Times New Roman;"&gt;&lt;code&gt;&lt;span style=""&gt;                              &lt;/span&gt;&amp;lt;IMembershipCondition&amp;gt; …&lt;o:p&gt;&lt;/o:p&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;pre style="font-family: Times New Roman;"&gt;&lt;code&gt;&lt;span style=""&gt;                              &lt;/span&gt;&amp;lt;CodeGroup /&amp;gt; …&lt;o:p&gt;&lt;/o:p&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;pre style="font-family: Times New Roman;"&gt;&lt;code&gt;&lt;span style=""&gt;                         &lt;/span&gt;&amp;lt;/CodeGroup&amp;gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;pre style="font-family: Times New Roman;"&gt;&lt;code&gt;&lt;span style=""&gt;                    &lt;/span&gt;&amp;lt;/PolicyLevel&amp;gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;pre style="font-family: Times New Roman;"&gt;&lt;code&gt;&lt;span style=""&gt;               &lt;/span&gt;&amp;lt;/policy&amp;gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;pre style="font-family: Times New Roman;"&gt;&lt;code&gt;&lt;span style=""&gt;          &lt;/span&gt;&amp;lt;/security&amp;gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;pre style="font-family: Times New Roman;"&gt;&lt;code&gt;&lt;span style=""&gt;     &lt;/span&gt;&amp;lt;/mscorlib&amp;gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;pre style="font-family: Times New Roman;"&gt;&lt;code&gt;&amp;lt;/configuration&amp;gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p class="MsoNormal" style="font-family: Times New Roman;"&gt;&lt;span style="font-size: 10pt;"&gt;The key parts of the file are the SecurityClasses, the NamedPermissionSets, and the CodeGroups. I'll examine each one in detail in the following sections.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="font-family: Times New Roman;"&gt;&lt;strong&gt;&lt;span style="font-size: 10pt;"&gt;Security Classes&lt;/span&gt;&lt;/strong&gt;&lt;span style="font-size: 10pt;"&gt;&lt;br /&gt;
The SecurityClasses section is perhaps the most straightforward. It lists a set of &amp;lt;SecurityClass&amp;gt; tags for each of the kinds of available permissions. If you open up one of the CAS policy files from the framework directory, as mentioned above, you'll see that there are several &amp;lt;SecurityClass&amp;gt; tags defined and that their format is very simple. They take only two attributes: &lt;/span&gt;&lt;span style="font-size: 10pt;"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;
&lt;ul type="disc" style="font-family: Times New Roman;"&gt;
    &lt;li style="" class="MsoNormal"&gt;&lt;span style="font-size: 10pt;"&gt;Name—the name of the class      to load in processing the rest of the file. The class can be a permission,      a membership condition, or a helper class as in the case of the      NamedPermissionSet class. &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/li&gt;
    &lt;li style="" class="MsoNormal"&gt;&lt;span style="font-size: 10pt;"&gt;Description—This is the      full name of the assembly that the class is found in. This will include      the version number, the culture, and public key token. No path information      is typically given to the assembly because they are registered in the GAC.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;div align="center" style="font-family: Times New Roman;"&gt;
&lt;table cellspacing="0" cellpadding="0" border="0" style="" class="MsoNormalTable"&gt;
    &lt;tbody&gt;
        &lt;tr&gt;
            &lt;td style="padding: 0in;"&gt;
            &lt;p align="center" style="margin: 7.5pt 0in; text-align: center;" class="MsoNormal"&gt;&lt;span style="font-size: 10pt;"&gt;The   best thing to do for security class tags is to use the &lt;span class="pf"&gt;web_hightrust.config&lt;/span&gt;   as a starting point and remove any security classes that you do not need.   This will cover the NamedPermissionSet helper class, all of the membership   conditions, and the out of box permissions. &lt;/span&gt;&lt;span style="font-size: 10pt;"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;
            &lt;/td&gt;
        &lt;/tr&gt;
        &lt;tr style=""&gt;
            &lt;td style="padding: 0in;"&gt;
            &lt;p style="margin: 7.5pt 0in;" class="MsoNormal"&gt;&lt;span style="font-size: 10pt;"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;
            &lt;/td&gt;
        &lt;/tr&gt;
    &lt;/tbody&gt;
&lt;/table&gt;
&lt;/div&gt;
&lt;p style="margin: 0in 0in 0.0001pt; font-family: Times New Roman;"&gt;&lt;strong&gt;&lt;span style="font-size: 10pt;"&gt;Named Permission Sets&lt;/span&gt;&lt;/strong&gt;&lt;span style="font-size: 10pt;"&gt;&lt;br /&gt;
Named permission sets allow you to collect up the various permissions that the code may need into a single set of permissions. This single set of permissions can then be referenced from the code groups that identify assemblies and grant them permissions. The &amp;lt;NamedPermissionSets&amp;gt; section contains a set of &amp;lt;PermissionSet&amp;gt; tags, each of which defines an individual named permission that the code group can refer to. &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p style="margin: 0in 0in 0.0001pt; font-family: Times New Roman;"&gt;&lt;span style="font-size: 10pt;"&gt;The basic format of the &amp;lt;PermissionSet&amp;gt; tag has the following attributes: &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;
&lt;ul type="disc" style="font-family: Times New Roman;"&gt;
    &lt;li style="" class="MsoNormal"&gt;&lt;span style="font-size: 10pt;"&gt;class—This indicates the      class to be instantiated. By default, the class is NamedPermissionSet. &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/li&gt;
    &lt;li style="" class="MsoNormal"&gt;&lt;span style="font-size: 10pt;"&gt;version—the version of the      policy configuration. This has a value of "1" even in .NET 2.0. &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/li&gt;
    &lt;li style="" class="MsoNormal"&gt;&lt;span style="font-size: 10pt;"&gt;Name—The name that will be      used to refer to this permission set. &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/li&gt;
    &lt;li style="" class="MsoNormal"&gt;&lt;span style="font-size: 10pt;"&gt;Description—The description      for the policy set. &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/li&gt;
    &lt;li style="" class="MsoNormal"&gt;&lt;span style="font-size: 10pt;"&gt;Unrestricted—An optional      attribute that when set to "true" allows for unrestricted      access. Typically this is only used with a Full trust permission set.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p class="MsoNormal" style="font-family: Times New Roman;"&gt;&lt;span style="font-size: 10pt;"&gt;In each &amp;lt;PermissionSet&amp;gt; tag there may be zero or more &amp;lt;IPermission&amp;gt; tags, which associate the permission with the permission set. The &amp;lt;IPermission&amp;gt; tag has the following attributes: &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;
&lt;ul type="disc" style="font-family: Times New Roman;"&gt;
    &lt;li style="" class="MsoNormal"&gt;&lt;span style="font-size: 10pt;"&gt;class—This is the class      from the &amp;lt;SecurityClasses&amp;gt; group above which bestows the permission.      This value should precisely match the name attribute of one of the      &amp;lt;SecurityClass&amp;gt; tags in the &amp;lt;SecurityClasses&amp;gt; tag. &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/li&gt;
    &lt;li style="" class="MsoNormal"&gt;&lt;span style="font-size: 10pt;"&gt;version—As above, this      attribute indicates the version and is always set to "1" even in      .NET 2.0.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p class="MsoNormal" style="font-family: Times New Roman;"&gt;&lt;span style="font-size: 10pt;"&gt;There are several other attributes that may be added to each of the &amp;lt;IPermission&amp;gt; tags based on the class being referenced. The attributes supported cannot be easily ascertained from the documentation of the classes themselves, however, the additional attributes and the permissions that they relate to can be found in the Patterns and Practices guide "How to: Use Code Access Security in ASP.NET 2.0" available at. Refer to Table 4 in the article (linked just above) to find a mapping of individual permission classes and attributes to the trust levels built into ASP.NET 2.0. In doing this the Table enumerates all of the options for the ASP.NET permissions classes.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="font-family: Times New Roman;"&gt;&lt;strong&gt;&lt;span style="font-size: 10pt;"&gt;Code Groups&lt;/span&gt;&lt;/strong&gt;&lt;span style="font-size: 10pt;"&gt;&lt;br /&gt;
The final section of the CAS policy file to address is the &amp;lt;CodeGroup&amp;gt; section. Unlike the other sections of the file, which were not hierarchical in nature, the &amp;lt;CodeGroup&amp;gt; tag can be nested inside itself. This is, in fact, how it is set up by default. The first &amp;lt;CodeGroup&amp;gt; tag specifies a membership condition that includes all assemblies but grants them no permission. Under this are all of the individual code groups. The basic format of the &amp;lt;CodeGroup&amp;gt; tag has the following attributes: &lt;/span&gt;&lt;span style="font-size: 10pt;"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;
&lt;ul type="disc" style="font-family: Times New Roman;"&gt;
    &lt;li style="" class="MsoNormal"&gt;&lt;span style="font-size: 10pt;"&gt;class—This is the class,      from &amp;lt;SecurityClasses&amp;gt; above, which is associated with the      &amp;lt;CodeGroup&amp;gt; tag. For the first, highest tag this is      "FirstMatchingCodeGroup." The FirstMatchingCodeGroup tells .NET      to locate the first matching code group (child of this node) and apply      only its permissions. All of the subsequent tags typically use      "UnionCodeGroup." This indicates that the permissions granted      for all of the membership matches below should be granted to the assembly.      &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/li&gt;
    &lt;li style="" class="MsoNormal"&gt;&lt;span style="font-size: 10pt;"&gt;version—Version always      contains "1" even if working with ASP.NET 2.0. &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/li&gt;
    &lt;li style="" class="MsoNormal"&gt;&lt;span style="font-size: 10pt;"&gt;PermissionSetName—This is      the name of the permission set (from above) to be granted to the code      matching this code group.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p class="MsoNormal" style="font-family: Times New Roman;"&gt;&lt;span style="font-size: 10pt;"&gt;Within the &amp;lt;CodeGroup&amp;gt; tag there should be one and only one &amp;lt;IMembershipCondition&amp;gt; tag. If you want a code group to apply to multiple assemblies that cannot be matched securely with one condition, simply put new &amp;lt;CodeGroup&amp;gt; tags in for each membership condition that you need. The IMembershipCondition is used to specify a few different kinds of matches. The basic types are listed below: &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;
&lt;ul type="disc" style="font-family: Times New Roman;"&gt;
    &lt;li style="" class="MsoNormal"&gt;&lt;span style="font-size: 10pt;"&gt;StrongNameMembershipCondition—This      condition matches any code that was signed by a specific strong name key.      It takes a PublicKeyBlob attribute, which specifies the public key that      matches the private key used to sign the assembly. &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/li&gt;
    &lt;li style="" class="MsoNormal"&gt;&lt;span style="font-size: 10pt;"&gt;PublisherMembershipCondition—This      condition uses the Authenticode x.509v3 signature to determine whether the      assembly can be trusted. This class takes the attribute of Certificate,      which indicates the certificate to use for membership. &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/li&gt;
    &lt;li style="" class="MsoNormal"&gt;&lt;span style="font-size: 10pt;"&gt;HashMembershipCondition—This      condition matches code based on its hash. In other words, the hash of the      assembly after it was compiled. This class takes two attributes, the      HashValue and the HashAlgorithm. &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/li&gt;
    &lt;li style="" class="MsoNormal"&gt;&lt;span style="font-size: 10pt;"&gt;SiteMembershipCondition—This      condition matches code based on the site that it originated from. The Site      attribute specifies the site to be matched, including wildcards. &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/li&gt;
    &lt;li style="" class="MsoNormal"&gt;&lt;span style="font-size: 10pt;"&gt;ZoneMembershipCondition—This      condition matches code based on where the code was run from, as defined by      Internet Explorer. This membership type takes an attribute of Zone, which      matches the Internet Explorer zone name that the code is coming from. &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/li&gt;
    &lt;li style="" class="MsoNormal"&gt;&lt;span style="font-size: 10pt;"&gt;ApplicationDirectory—This      condition matches assemblies based on their directory on the computer. The      additional attribute, ApplicationDirectory, specifies the directory for      the application to be matched. &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/li&gt;
    &lt;li style="" class="MsoNormal"&gt;&lt;span style="font-size: 10pt;"&gt;UrlMembershipCondition—This      condition matches based on testing the assembly's URL. This membership      condition takes an additional attribute of Url, which is used to provide      the URL to match for. &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/li&gt;
    &lt;li style="" class="MsoNormal"&gt;&lt;span style="font-size: 10pt;"&gt;AllMembershipCondition—This      condition matches all code.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p class="MsoNormal" style="font-family: Times New Roman;"&gt;&lt;span style="font-size: 10pt;"&gt;The basic format of the &amp;lt;IMembershipCondition&amp;gt; has at least two attributes: &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;
&lt;ul type="disc" style="font-family: Times New Roman;"&gt;
    &lt;li style="" class="MsoNormal"&gt;&lt;span style="font-size: 10pt;"&gt;class—Indicating the class      name from above, which is to be used to determine membership. &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/li&gt;
    &lt;li style="" class="MsoNormal"&gt;&lt;span style="font-size: 10pt;"&gt;version—As with other      classes, always set to "1" even in .NET version 2.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p class="MsoNormal" style="font-family: Times New Roman;"&gt;&lt;span style="font-size: 10pt;"&gt;Added to these two attributes are whatever additional attributes are necessary to specify the condition to be matched.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;a href="http://www.pheedo.com/click.phdo?x=6cda6ad746d942b9a1110d0715a4fa12&amp;u=120985"&gt;&lt;img src="http://www.pheedo.com/img.phdo?x=6cda6ad746d942b9a1110d0715a4fa12&amp;u=120985" border="0"/&gt;&lt;/a&gt;&lt;/p&gt;&lt;iframe src="http://ads.geekswithblogs.net/a.aspx?ZoneID=5&amp;amp;Task=Get&amp;amp;PageID=31016&amp;amp;SiteID=1" width=1 height=1 Marginwidth=0 Marginheight=0 Hspace=0 Vspace=0 Frameborder=0 Scrolling=No&gt;
&lt;script language='javascript1.1' src="http://ads.geekswithblogs.net/a.aspx?ZoneID=5&amp;amp;Task=Get&amp;amp;Browser=NETSCAPE4&amp;amp;NoCache=True&amp;PageID=31016&amp;amp;SiteID=1"&gt;&lt;/script&gt;
&lt;noscript&gt;&lt;a href="http://ads.geekswithblogs.net/a.aspx?ZoneID=5&amp;amp;Task=Click&amp;amp;Mode=HTML&amp;amp;SiteID=1&amp;amp;PageID=31016" target="_blank"&gt;
&lt;img src="http://ads.geekswithblogs.net/a.aspx?ZoneID=5&amp;amp;Task=Get&amp;amp;Mode=HTML&amp;amp;SiteID=1&amp;amp;PageID=31016" width="1" height="1" border="0"  alt=""&gt;&lt;/a&gt;
&lt;/noscript&gt;
&lt;/iframe&gt;
&lt;img src="http://geekswithblogs.net/Gaurav/aggbug/120985.aspx" width="1" height="1" /&gt;</description>
            <dc:creator>Gaurav Taneja</dc:creator>
            <guid>http://geekswithblogs.net/Gaurav/archive/2008/04/02/120985.aspx</guid>
            <pubDate>Thu, 03 Apr 2008 02:32:26 GMT</pubDate>
            <wfw:comment>http://geekswithblogs.net/Gaurav/comments/120985.aspx</wfw:comment>
            <comments>http://geekswithblogs.net/Gaurav/archive/2008/04/02/120985.aspx#feedback</comments>
            <wfw:commentRss>http://geekswithblogs.net/Gaurav/comments/commentRss/120985.aspx</wfw:commentRss>
            <trackback:ping>http://geekswithblogs.net/Gaurav/services/trackbacks/120985.aspx</trackback:ping>
        </item>
        <item>
            <title>Authentication in ASP.NET</title>
            <link>http://geekswithblogs.net/Gaurav/archive/2008/04/02/120983.aspx</link>
            <description>&lt;p style="font-family: Times New Roman;" class="MsoNormal"&gt;&lt;font size="3"&gt;&lt;strong&gt;&lt;span style="font-size: 10pt;"&gt;Authentication in ASP.NET&lt;/span&gt;&lt;/strong&gt;&lt;span style="font-size: 10pt;"&gt;&lt;br /&gt;
&lt;br /&gt;
There are two closely interlinked concepts at the heart of security for distributed &lt;a href="http://www.c-sharpcorner.com/Code/2003/Sept/AuthenticationAndAuthorization.asp" target="_blank"&gt;&lt;span style="color: darkgreen; text-decoration: none;"&gt;applications&lt;/span&gt;&lt;/a&gt; - authentication and authorization. &lt;em&gt;Authentication&lt;/em&gt; is the process of obtaining some sort of credentials from the users and using those credentials to verify the user’s identity. &lt;em&gt;Authorization&lt;/em&gt; is the process of allowing an authenticated user access to resources. Authentication is always precedes to Authorization; even if your application lets anonymous users connect and use the application, it still authenticates them as being anonymous. &lt;br /&gt;
ASP.net provides flexible set of alternatives for authentication. You can perform authentication yourself in code or delegate authentication to other authorities (such as Microsoft Passport). In fact sometimes it seems ASP.net authentication is a bit too flexible; it can be difficult for a new developer to know just where to start. In this article, we review the settings in ASP.net and Internet Information Services (IIS) that control authentication and authorization in ASP.net applications.&lt;br /&gt;
&lt;br /&gt;
An ASP.net application has two separate authentication layers. That is because ASP.net is not a standalone product. Rather it is a layer on top of IIS. All requests flow through IIS before they are handed to ASP.net. As a result, IIS can decide to deny access without the ASP.net process even knowing that someone requested a particular page. Here is an overview of the steps in the joint IIS and ASP.net authentication process.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
1. IIS first checks to make sure the incoming request comes from an IP address that is allowed access to the domain. If not it denies the request.&lt;br /&gt;
&lt;br /&gt;
2. Next IIS performs its own user authentication if it configured to do so. By default IIS allows anonymous access, so requests are automatically authenticated, but you can change this default on a per – application basis with in IIS.&lt;br /&gt;
&lt;br /&gt;
3. If the request is passed to ASP.net with an authenticated user, ASP.net checks to see whether impersonation is enabled. If impersonation is enabled, ASP.net acts as though it were the authenticated user. If not ASP.net acts with its own configured account.&lt;br /&gt;
&lt;br /&gt;
4. Finally the identity from step 3 is used to request resources from the &lt;a href="http://www.c-sharpcorner.com/Code/2003/Sept/AuthenticationAndAuthorization.asp" target="_blank"&gt;&lt;span style="color: darkgreen; text-decoration: none;"&gt;operating system&lt;/span&gt;&lt;/a&gt;. If ASP.net authentication can obtain all the necessary resources it grants the users request otherwise it is denied. Resources can include much more than just the ASP.net page itself you can also use .Net’s code access security features to extend this authorization step to disk files, Registry keys and other resources.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
As you can see several security authorities interact when the user requests and ASP.net page. If things are not behaving the way you think they should, it can be helpful to review this list and make sure you have considered all the factors involved&lt;br /&gt;
&lt;br /&gt;
Authentication providers&lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/font&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="font-family: Times New Roman;"&gt;&lt;font size="3"&gt;&lt;span style="font-size: 10pt;"&gt;Assuming IIS passes a request to ASP.net, what happens next? The answer depends on the configuration of ASP.net itself. The ASP.net architecture includes the concept of and authentication provider a piece of code whose job is to verify credentials and decide whether a particular request should be considered authenticated. Out of the box ASP.net gives you a choice of three different authentication providers.&lt;/span&gt;&lt;/font&gt;&lt;/p&gt;
&lt;ul type="disc" style="font-family: Times New Roman;"&gt;
    &lt;li class="MsoNormal" style=""&gt;&lt;font size="3"&gt;&lt;span style="font-size: 10pt;"&gt;The windows Authentication provider lets you      authenticates users based on their windows accounts. This provider uses      IIS to perform the authentication and then passes the authenticated      identity to your code. This is the default provided for ASP.net.&lt;/span&gt;&lt;/font&gt; &lt;/li&gt;
    &lt;li class="MsoNormal" style=""&gt;&lt;font size="3"&gt;&lt;span style="font-size: 10pt;"&gt;The passport authentication provider uses Microsoft’s      passport service to authenticate users.&lt;/span&gt;&lt;/font&gt; &lt;/li&gt;
    &lt;li class="MsoNormal" style=""&gt;&lt;font size="3"&gt;&lt;span style="font-size: 10pt;"&gt;The forms authentication provider uses custom HTML      forms to collect authentication information and lets you use your own      logic to authenticate users. The user’s credentials are stored in a cookie      for use during the session.&lt;/span&gt;&lt;/font&gt; &lt;/li&gt;
&lt;/ul&gt;
&lt;p class="MsoNormal" style="font-family: Times New Roman;"&gt;&lt;font size="3"&gt;&lt;span style="font-size: 10pt;"&gt;Selecting an authentication provider is as simple as making an entry in the web.config file for the application. You can use one of these entries to select the corresponding built in authentication provider:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;authentication mode=”windows”&amp;gt;&lt;br /&gt;
&amp;lt;authentication mode=”passport”&amp;gt;&lt;br /&gt;
&amp;lt;authentication mode=”forms”&amp;gt;&lt;br /&gt;
&lt;br /&gt;
ASP.net also supports custom authentication providers. This simply means that you set the authentication mode for the application to none, then write your own custom code to perform authentication. For example, you might install an ISAPI filter in IIS that compares incoming requests to list of source IP addresses, and considers requests to be authenticated if they come from an acceptable address. In that case, you would set the authentication mode to none to prevent any of the .net authentication providers from being triggered.&lt;br /&gt;
&lt;br /&gt;
The fig below illustrates the authorization and authentication mechanisms provided by ASP.NET and IIS.&lt;/span&gt;&lt;/font&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style=""&gt;&lt;font size="3"&gt;&lt;span style="font-size: 10pt; font-family: Verdana;"&gt;&lt;!--[if gte vml 1]&gt;&lt;v:shapetype
id="_x0000_t75" coordsize="21600,21600" o:spt="75" o:preferrelative="t"
path="m@4@5l@4@11@9@11@9@5xe" filled="f" stroked="f"&gt;
&lt;v:stroke joinstyle="miter" /&gt;
&lt;v:formulas&gt;
&lt;v:f eqn="if lineDrawn pixelLineWidth 0" /&gt;
&lt;v:f eqn="sum @0 1 0" /&gt;
&lt;v:f eqn="sum 0 0 @1" /&gt;
&lt;v:f eqn="prod @2 1 2" /&gt;
&lt;v:f eqn="prod @3 21600 pixelWidth" /&gt;
&lt;v:f eqn="prod @3 21600 pixelHeight" /&gt;
&lt;v:f eqn="sum @0 0 1" /&gt;
&lt;v:f eqn="prod @6 1 2" /&gt;
&lt;v:f eqn="prod @7 21600 pixelWidth" /&gt;
&lt;v:f eqn="sum @8 21600 0" /&gt;
&lt;v:f eqn="prod @7 21600 pixelHeight" /&gt;
&lt;v:f eqn="sum @10 21600 0" /&gt;
&lt;/v:formulas&gt;
&lt;v:path o:extrusionok="f" gradientshapeok="t" o:connecttype="rect" /&gt;
&lt;o:lock v:ext="edit" aspectratio="t" /&gt;
&lt;/v:shapetype&gt;&lt;v:shape id="_x0000_i1025" type="#_x0000_t75" alt="" style='width:459pt;
height:291pt'&gt;
&lt;v:imagedata src="file:///C:\DOCUME~1\gtaneja\LOCALS~1\Temp\msohtml1\01\clip_image001.jpg"
o:href="http://www.c-sharpcorner.com/Code/2003/Sept/Authen1.jpg" /&gt;
&lt;/v:shape&gt;&lt;![endif]--&gt;&lt;!--[if !vml]--&gt;&lt;img width="612" height="388" border="0" alt="" src="file:///C:/DOCUME~1/gtaneja/LOCALS~1/Temp/msohtml1/01/clip_image001.jpg" v:shapes="_x0000_i1025" /&gt;&lt;!--[endif]--&gt;&lt;/span&gt;&lt;/font&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="font-family: Times New Roman;"&gt;&lt;font size="3"&gt;&lt;strong&gt;&lt;span style="font-size: 10pt;"&gt;Windows authentication and IIS&lt;/span&gt;&lt;/strong&gt;&lt;/font&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="font-family: Times New Roman;"&gt;&lt;font size="3"&gt;&lt;span style="font-size: 10pt;"&gt;If you select windows authentication for your ASP.NET application, you also have to configure authentication within IIS. This is because IIS provides Windows authentication. IIS gives you a choice for four different authentication methods: &lt;/span&gt;&lt;/font&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="font-family: Times New Roman;"&gt;&lt;font size="3"&gt;&lt;span style="font-size: 10pt;"&gt;Anonymous, basic digest, and windows integrated&lt;br /&gt;
&lt;br /&gt;
If you select anonymous authentication, IIS doesn’t perform any authentication, Any one is allowed to access the ASP.NET application.&lt;br /&gt;
&lt;br /&gt;
If you select basic authentication, users must provide a windows username and password to connect. How ever this information is sent over the &lt;a href="http://www.c-sharpcorner.com/Code/2003/Sept/AuthenticationAndAuthorization.asp" target="_blank"&gt;&lt;span style="color: darkgreen; text-decoration: none;"&gt;network&lt;/span&gt;&lt;/a&gt; in clear text, which makes basic authentication very much insecure over the internet.&lt;br /&gt;
&lt;br /&gt;
If you select digest authentication, users must still provide a windows user name and password to connect. However the password is hashed before it is sent across the network. Digest authentication requires that all users be running Internet Explorer 5 or later and that windows accounts to stored in active directory.&lt;br /&gt;
&lt;br /&gt;
If you select windows integrated authentication, passwords never cross the network. Users must still have a username and password, but the application uses either the Kerberos or challenge/response protocols authenticate the user. Windows-integrated authentication requires that all users be running internet explorer 3.01 or later Kerberos is a network authentication protocol. It is designed to provide strong authentication for client/server applications by using secret-key cryptography. Kerberos is a solution to network security problems. It provides the tools of authentication and strong cryptography over the network to help to secure information in systems across entire enterprise&lt;br /&gt;
&lt;br /&gt;
&lt;strong&gt;Passport authentication&lt;/strong&gt;&lt;/span&gt;&lt;/font&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="font-family: Times New Roman;"&gt;&lt;font size="3"&gt;&lt;span style="font-size: 10pt;"&gt;Passport authentication lets you to use Microsoft’s passport service to authenticate users of your application. If your users have signed up with passport, and you configure the authentication mode of the application to the passport authentication, all authentication duties are offloaded to the passport servers.&lt;br /&gt;
&lt;br /&gt;
Passport uses an encrypted cookie mechanism to indicate authenticated users. If users have already signed into passport when they visit your site, they’ll be considered authenticated by ASP.NET. Otherwise they’ll be redirected to the passport servers to log in. When they are successfully log in, they’ll be redirected back to your site&lt;/span&gt;&lt;/font&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="font-family: Times New Roman;"&gt;&lt;font size="3"&gt;&lt;span style="font-size: 10pt;"&gt;To use passport authentication you have to download the Passport Software Development Kit (SDK) and install it on your server. The SDK can be found at http://msdn.microdoft.com/library/default.asp?url=/downloads/list/websrvpass.aps.It includes full details of implementing passport authentication in your own applications.&lt;br /&gt;
&lt;br /&gt;
&lt;strong&gt;Forms authentication&lt;/strong&gt;&lt;/span&gt;&lt;/font&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="font-family: Times New Roman;"&gt;&lt;font size="3"&gt;&lt;span style="font-size: 10pt;"&gt;Forms authentication provides you with a way to handle authentication using your own custom logic with in an ASP.NET application. The following applies if you choose forms authentication.&lt;br /&gt;
&lt;br /&gt;
1) When a user requests a page for the application, ASP.NET checks for the presence of a special session cookie. If the cookie is present, ASP.NET assumes the user is authenticated and processes the request.&lt;br /&gt;
2) If the cookie isn’t present, ASP.NET redirects the user to a web form you provide&lt;br /&gt;
&lt;br /&gt;
3) You can carry out whatever authentication, checks you like in your form. When the user is authenticated, you indicate this to ASP.NET by setting a property, which creates the special cookie to handle subsequent requests.&lt;br /&gt;
&lt;br /&gt;
&lt;strong&gt;Configuring Authorization &lt;/strong&gt;&lt;/span&gt;&lt;/font&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="font-family: Times New Roman;"&gt;&lt;font size="3"&gt;&lt;span style="font-size: 10pt;"&gt;After your application has authenticated users, you can proceed to authorize their access to resources. But there is a question to answer first: Just who is the user to whom your are grating access? It turns out that there are different answers to that question, depending on whether you implement impersonation. Impersonation is a technique that allows the ASP.NET process to act as the authenticated user, or as an arbitrary specified user&lt;br /&gt;
&lt;br /&gt;
ASP.NET impersonation is controlled by entries in the applications web.config file. The default setting is “no impersonation”. You can explicitly specify that ASP.NET shouldn’t use impersonation by including the following code in the file&lt;/span&gt;&lt;/font&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="font-family: Times New Roman;"&gt;&lt;font size="3"&gt;&lt;span style="font-size: 10pt;"&gt;&amp;lt;identity impersonate=”false”/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
With this setting ASP.NET does not perform impersonation. It means that ASP.NET will runs with its own privileges. By default ASP.NET runs as an unprivileged account named ASPNET. You can change this by making a setting in the processModel section of the machine.config file. When you make this setting, it automatically applies to every site on the server. To user a high-privileged system account instead of a low-privileged, set the userName attribute of the processModel element to SYSTEM. Using this setting is a definite security risk, as it elevates the privileges of the ASP.NET process to a point where it can do bad things to the operating system.&lt;br /&gt;
&lt;br /&gt;
When you disable impersonation, all the request will run in the context of the account running ASP.NET: either the ASPNET account or the system account. This is true when you are using anonymous access or authenticating users in some fashion. After the user has been authenticated, ASP.NET uses it own identity to request access to resources.&lt;br /&gt;
&lt;br /&gt;
The second possible setting is to turn on impersonation.&lt;/span&gt;&lt;/font&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="font-family: Times New Roman;"&gt;&lt;font size="3"&gt;&lt;span style="font-size: 10pt;"&gt;&amp;lt;identity impersonate =”true”/&amp;gt;&lt;/span&gt;&lt;/font&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="font-family: Times New Roman;"&gt;&lt;font size="3"&gt;&lt;span style="font-size: 10pt;"&gt;In this case, ASP.NET takes on the identity IIS passes to it. If you are allowing anonymous access in IIS, this means ASP.NET will impersonate the IUSR_ComputerName account that IIS itself uses. If you aren’t allowing anonymous access,ASP.NET will take on the credentials of the authenticated user and make requests for resources as if it were that user. Thus by turning impersonation on and using a non-anonymous method of authentication in IIS, you can let users log on and use their identities within your ASP.NET application. &lt;br /&gt;
&lt;br /&gt;
Finally, you can specify a particular identity to use for all authenticated requests&lt;br /&gt;
&amp;lt;identity impersonate=”true” username=”DOMAIN\username” password=”password”/&amp;gt;&lt;/span&gt;&lt;/font&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="font-family: Times New Roman;"&gt;&lt;font size="3"&gt;&lt;span style="font-size: 10pt;"&gt;With this setting, all the requests are made as the specified user (Assuming the password it correct in the configuration file). So, for example you could designate a user for a single application, and use that user’s identity every time someone authenticates to the application. The drawback to this technique is that you must embed the user’s password in the web.config file in plain text. Although ASP.NET won’t allow anyone to download this file, this is still a security risk if anyone can get the file by other means.&lt;br /&gt;
&lt;br /&gt;
&lt;strong&gt;Best practices&lt;/strong&gt;&lt;/span&gt;&lt;/font&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="font-family: Times New Roman;"&gt;&lt;font size="3"&gt;&lt;span style="font-size: 10pt;"&gt;Now that you know what the choices are for ASP.NET authentication, here are some points that tell which to choose.&lt;/span&gt;&lt;/font&gt;&lt;/p&gt;
&lt;ul type="disc" style="font-family: Times New Roman;"&gt;
    &lt;li class="MsoNormal" style=""&gt;&lt;font size="3"&gt;&lt;span style="font-size: 10pt;"&gt;If there is nothing sensitive about the application,      stick with no authentication in ASP.NET and anonymous authentication in      IIS. That lets anyone who can reach the host computer use the application.&lt;/span&gt;&lt;/font&gt;      &lt;/li&gt;
    &lt;li class="MsoNormal" style=""&gt;&lt;font size="3"&gt;&lt;span style="font-size: 10pt;"&gt;If you have to authenticate users, there are several      choices. If all users have accounts on your network, use Windows      authentication in ASP.net with one of the strong IIS authentication      settings. If users don’t have network accounts, own custom authentication      scheme is preferred, means forms authorization.&lt;/span&gt;&lt;/font&gt; &lt;/li&gt;
    &lt;li class="MsoNormal" style=""&gt;&lt;font size="3"&gt;&lt;span style="font-size: 10pt;"&gt;If different users must have different privileges,      impersonation in ASP.net configuration files needs to be turn on.&lt;/span&gt;&lt;/font&gt; &lt;/li&gt;
&lt;/ul&gt;&lt;p&gt;&lt;a href="http://www.pheedo.com/click.phdo?x=6cda6ad746d942b9a1110d0715a4fa12&amp;u=120983"&gt;&lt;img src="http://www.pheedo.com/img.phdo?x=6cda6ad746d942b9a1110d0715a4fa12&amp;u=120983" border="0"/&gt;&lt;/a&gt;&lt;/p&gt;&lt;iframe src="http://ads.geekswithblogs.net/a.aspx?ZoneID=5&amp;amp;Task=Get&amp;amp;PageID=31016&amp;amp;SiteID=1" width=1 height=1 Marginwidth=0 Marginheight=0 Hspace=0 Vspace=0 Frameborder=0 Scrolling=No&gt;
&lt;script language='javascript1.1' src="http://ads.geekswithblogs.net/a.aspx?ZoneID=5&amp;amp;Task=Get&amp;amp;Browser=NETSCAPE4&amp;amp;NoCache=True&amp;PageID=31016&amp;amp;SiteID=1"&gt;&lt;/script&gt;
&lt;noscript&gt;&lt;a href="http://ads.geekswithblogs.net/a.aspx?ZoneID=5&amp;amp;Task=Click&amp;amp;Mode=HTML&amp;amp;SiteID=1&amp;amp;PageID=31016" target="_blank"&gt;
&lt;img src="http://ads.geekswithblogs.net/a.aspx?ZoneID=5&amp;amp;Task=Get&amp;amp;Mode=HTML&amp;amp;SiteID=1&amp;amp;PageID=31016" width="1" height="1" border="0"  alt=""&gt;&lt;/a&gt;
&lt;/noscript&gt;
&lt;/iframe&gt;
&lt;img src="http://geekswithblogs.net/Gaurav/aggbug/120983.aspx" width="1" height="1" /&gt;</description>
            <dc:creator>Gaurav Taneja</dc:creator>
            <guid>http://geekswithblogs.net/Gaurav/archive/2008/04/02/120983.aspx</guid>
            <pubDate>Thu, 03 Apr 2008 01:56:02 GMT</pubDate>
            <wfw:comment>http://geekswithblogs.net/Gaurav/comments/120983.aspx</wfw:comment>
            <comments>http://geekswithblogs.net/Gaurav/archive/2008/04/02/120983.aspx#feedback</comments>
            <wfw:commentRss>http://geekswithblogs.net/Gaurav/comments/commentRss/120983.aspx</wfw:commentRss>
            <trackback:ping>http://geekswithblogs.net/Gaurav/services/trackbacks/120983.aspx</trackback:ping>
        </item>
    </channel>
</rss>