what is NuGet ?

It is a Visual Studio extension that makes it easy to add, remove, and update libraries and tools in Visual Studio projects that use the .NET Framework.

When you add a library or tool, NuGet copies files to your solution and automatically makes whatever changes are needed in your project, such as adding and changing your app.config or web.config file.

NuGet runs in Visual Studio 2010 or Visual Web Developer 2010.

Web service can only be written in .net?

No, it is not true that web services can only be written in .net. It can be written in any language, because web service is the concept of XML, so that it can be written in any platform.

When calculating Code Metrics, what is Cyclomatic Complexity ?

Cyclomatic Complexity refers to the structural complexity of the code. Here, different code paths in the flow of the program are calculated.

A complex control flow requires a more tests to achieve good code coverage. hence, the code will be less maintainable.

Briefly list the steps of Form Authentication process ?

The steps are :-

(1) Open the url for example(www.testing.com)
(2) Login page opens.
(3) User enters user name and password and submits these to the server.
(4) Server validates the credentials and if valid, creates an authentication cookie and sends it back to the user browser.
(5) With valid cookie, user no longer needs to enter a user name and password to access the site on each page request.
(6) From next time he/she is simply redirected to the default page.

What is System.Web.Mail ?

System.Web.Mail (SWM) is the .Net namespace which is used to send email in .Net Framework applications. SWM contains three classes:

1. MailMessage – used for creating and manipulating the mail message contents.
2. MailAttachments – used for creating a mail attachment to be added to the mail message.
3. SmtpMail – used for sending email to the relay mail server.

can we declare private class in namespace?

No we can declare private class in namespace, it will give compile time error.


namespace example
private class ex //error

“Error: Elements defined in a namespace cannot be explicitly declared as private, protected, or protected internal”