Home
ASP.Net
Interview FAQs

C# is an elegant and type-safe object-oriented language that enables developers to build a variety of secure and robust applications that run on the .NET Framework. You can use C# to create Windows client applications, XML Web services, distributed components, client-server applications, database applications, and much, much more. Visual C# provides an advanced code editor, convenient user interface designers, integrated debugger, and many other tools to make it easier to develop applications based on the C# language and the .NET Framework. Reference - http://msdn.microsoft.com/en-IN/library/z1zx9t92.aspx
System.GC.Collect() forces garbage collector to run. This is not recommended but can be used if situations arises.

Web.config File Re-factoring means most of the elements of web.config file moved to machine.config. So we get more cleaner and easy to maintain web.config. The newly created web.config is almost empty with only .net target framework information in System.web.

No, The <HTTPHANDLERS> 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 a section in a local Web.config file.

Permanent cookies are available until a specified expirationdate, and are stored on the hard disk. So set the "Expires" propertyto a value greater than DataTime.MinValue with respect to the current datetime.If you want the cookie that never expires set its Expires property equal toDateTime.maxValue.

Using ASP.NET Web API has a number of advantages, but core of the advantages are:

  • It works the HTTP way using standard HTTP verbs like GET, POST, PUT, DELETE etc for all CRUD operations
  • Complete support for routing.
  • Response generated in JSON or XML format using MediaTypeFormatter
  • It has the ability to be hosted in IIS as well as self-host outside of IIS.
  • Supports Model binding and Validation

Authentication means validating users. In this step, we verify user credentials to check whether the person tying to log in is the right one or not.

Authorization is keeping track of what the current user is allowed to see and what should be hidden from him.
Note: Authentication verifies who you are and Authorization verifies what you are authorized to do.

If we set session Mode=”off” in web.config file, session will be disabled in the application. For this we need to configure web.config in the following way:


<Configuration>

     <sessionmode="off"/>

</configuration>

PreviousDisplaying 34 of 46Next
Need Help? Contact Us.

Log in

*
*

Forgot password?

*

New User

*
*
*
*