.NET Interview Question & Answer

What is the difference between .Net Remoting and Asp.Net Web Services?

ASP.NET Web Services Can be accessed only over HTTP but .Net Remoting Can be accessed over various protocols like TCP, HTTP, SMTP etc.

Web Services are based on stateless service architecture but .Net Remoting support for both stateful and stateless environment.

Web Services support heterogeneous environments means interoperability across platforms but .Net remoting requires .Net on both server and client end.

.NET Remoting provides the fast communication than Web Services when we use the TCP channel and the binary formatter.

Web services support only the objects that can be serialized but .NET Remoting can provide support to all objects that inherit MarshalByRefObject.

Web Services are reliable than .Net remoting because Web services are always hosted in IIS.

Web Services are ease to create and deploy but .Net remoting is bit complex to program.



What would be the common layers in an n- tier architecture based web application?
Common layers in an n- tier architecture

Presentation GUI: Look & Feel ,Html, aspx file, JavaScript, window forms etc.

Controller- Work flow layer: aspx.cs file, means event handlers and Data binding with controls etc.

Business Logic: where we implement business rules like add book, search library etc.

Data Access: SQLHelper.cs like create connection, get DataSet, Execute Query etc.

Physical Data: tables, views, stored procedures, indexes etc.



What are the different state management techniques used in asp.net for web applications?

In ASP.Net the state can be maintained in following ways
Server-side state management
Application objects
Session Variables
Database
Client-side state management
Cookies
Hidden input fields
Query String
ViewState


How to get records in random order from a sql query in sql server?
In SQL Server we can get records in random order from a sql query using NEWID() Function like:

SELECT Subject FROM dbo.forumThreads ORDER BY NEWID()

No comments:

Post a Comment