Set - 9

Question 1 :

How do you debug an ASP.NET Web application?

Answer :

Attach the aspnet_wp.exe process to the DbgClr debugger.

Question 2 :

How do you mark a method obsolete?

Answer :

Assuming you've done a "using System;": [Obsolete]
public int Foo() {...}
or [Obsolete("This is a message describing why this method is obsolete")]
public int Foo() {...}
Note: The O in Obsolete is capitalized.

Question 3 :

How is the DLL Hell problem solved in .NET?

Answer :

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

Question 4 :

What are the ways to deploy an assembly?

Answer :

An MSI installer, a CAB archive, and XCOPY command.

Question 5 :

Why does DllImport not work for me?

Answer :

All methods marked with the DllImport attribute must be marked as public static extern.