.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
 
Sign In
Register
 
Win Surprise Gifts!!!
Congratulations!!!




Find questions, FAQ's and their answers related to .NET, C#, Vb.Net, Sql Server and many more.

 
Post New Question Subscribe to Interview Questions
 
Quick Links For Interview Questions Categories:
ASP.NetWindows Application  .NET Framework  C#  VB.Net  ADO.Net  
Sql Server  SharePoint  Silverlight  OOPs  JQuery  JavaScript/VBScript
BiztalkPatten/Practices.IISWCFWPFWWF
NetworkingAptitudeOthers  All    
 

Interview Questions And Answers

What is DataContext?

Author: Narayanan          Posted Date: December 21, 2012    Category: LINQ     Points: 40

DataContext:
To communicate with a Database a connection must be made. In LINQ this connection is created by a DataContext.
Create connection to database.
It submits and retrieves object to database.
Converts objects to SQL queries and vice versa.

Are Web Services a replacement for other distributed computing platforms?

Author: Baimey Rajesh          Posted Date: December 05, 2012    Category: ASP.Net     Points: 40

No. Web Services is just a new way of looking at existing implementation platforms.

Which standard binding could be used for a service that was designed to replace an existing ASMX web service?

Author: Baimey Rajesh          Posted Date: December 05, 2012    Category: WCF     Points: 40

The basicHttpBinding standard binding is designed to expose a service as if it is an ASMX/ASP.NET web service. This will enable us to support existing clients as applications are upgrade to WCF.


What is a Lambda expression?

Author: Baimey Rajesh          Posted Date: December 05, 2012    Category: LINQ     Points: 40

A Lambda expression is nothing but an Anonymous Function, can contain expressions and statements. Lambda expressions can be used mostly to create delegates or expression tree types. Lambda expression uses lambda operator => and read as 'goes to' operator.

Example: myExp = myExp/10;

The => operator has the same precedence as assignment (=) and is right-associative.

Lambdas are used in method-based LINQ queries as arguments to standard query operator methods such as Where.

What are the types of input forms that can be created for a workflow ?

Author: abhays          Posted Date: November 14, 2012    Category: SharePoint     Points: 40

We can create four different types of input forms for workflow
1. An association form
2. An initiation form
3. A modification form
4. A task edit form

What is Run With Elevated Privileges in SharePoint and what is its syntax?

Author: abhays          Posted Date: November 12, 2012    Category: SharePoint     Points: 40

RunWithElevatedPrivileges (RWEP) executes the specified method with Full Control rights even if the user does not otherwise have Full Control. In Other words The RunWithElevatedPrivileges (RWEP) method enables you to supply a delegate that runs a subset of code in the context of an account with higher privileges than the current user.
A delegate method that is to run with elevated rights. This method runs under the Application Pool identity, which has site collection administrator privileges on all site collections hosted by that application pool.
The example shows the syntax that is required to define an anonymous method in the call to RunWithElevatedPrivileges.
SPSecurity.RunWithElevatedPrivileges(delegate()
{
// implementation details omitted
});

How can I add the result of an ASP.NET MVC controller action to a Bundle?

Author: Jack Smith          Posted Date: November 09, 2012    Category: ASP.Net     Points: 40



I have a controller action that returns Javascript file. I can reference this file from my view and it works fine. I'd like to put it in a System.Web.Optimization.Bundle with the other JS files.

I'm trying to do this, essentially:

new Bundle().Include("~/DynamicScript/UrlDictionary");

The other files in my Bundle get rendered just fine, but this one is ignored. Seeing this behavior, my assumption is that bundling gets handled before the application is able to resolve URL's through the routing infrastructure, or maybe that the bundling component doesn't request files in a manner that would allow that resolution to happen.

If someone could confirm that for me and/or point me in a good direction here, it would be much appreciated.

StructureMap caching in a WinForms app

Author: Jack Hard          Posted Date: November 09, 2012    Category: ASP.Net     Points: 40

Here are the types availible.

PerRequest - The default operation. A new instance will be created for each request. Singleton - A single instance will be shared across all requests ThreadLocal - A single instance will be created for each requesting thread. Caches the instances with ThreadLocalStorage. HttpContext - A single instance will be created for each HttpContext. Caches the instances in the HttpContext.Items collection. HttpSession - A single instance will be created for each HttpSession. Caches the instances in the HttpContext.Session collection. Use with caution. Hybrid - Uses HttpContext storage if it exists, otherwise uses ThreadLocal storage.

Needless to say other than singleton and Thread local, they seem pretty web specific.

Difference between OLEDB Provider and SqlClient?

Author: Jack Smith          Posted Date: November 08, 2012    Category: ADO.Net     Points: 40

With respect to usage, there is no difference between OLEDB Provider and SqlClient. The difference lies in their performance. SqlClient is explicitly used to connect your application to SQL server directly, OLEDB Provider is generic for various databases, such as Oracle and Access including SQL Server.

Difference between sharepoint List and Library

Author: abhays          Posted Date: November 07, 2012    Category: SharePoint     Points: 40

The main differences between SharePoint List and Library
1. A list is a collection of information that you share with team members.
Document libraries are collections of files that you can share with team members on a Web based on Microsoft Windows SharePoint Services. For example, you can create a library of common documents for a project, and team members can use their Web browsers to find the files, read them, and make comments.
2 We can attach multiple documents to one list item, but in document library there will be only one attachment.
3. In the List the title of the document is NOT indexed. So an end user would not be able to search on the title of the document. Example: I attached a document titled "Copy of Test SPDoc.doc" but after incremental indexing I get no results searching on the word "SPDoc." But we can perform searching by title in Document Library.

4. With a list we only can SPAttachmentCollection.Add(string, byte) only accepting a byte , means the attachment must fit entirely in one continuous block memory. It this is something you do with large file , your server memory may become fragmented.
With a document library we can SPFileCollection.add(string, stream) – The document library Accept a stream, means the content can be in memory, or disk or even a TCP/IP socket.
5. We can't display the name of the attached document in the List. We only see the paperclip that signifies the attachment. Whereas in document Library we are able to see Ttile of attachment or we can modify it.
6. We can’t check in and Check out in List whereas we can check in and check out in library.
7. We can have only major versioning in List whereas in document library we have both major and minor versioning.
7. We can publish a InfoPath Form Template in document library, and this problem arises when we submit the Form in different place



Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend