Networking and TCP/IP and HTTP Interview Questions

Questions What is TCP IP and UDP?****  The Transmission Control Protocol (TCP) is one of the core protocols of the Internet Protocol Suite. TCP is one of the two original components of the suite, complementing the Internet Protocol (IP), and therefore the entire suite is commonly referred to as TCP/IP.

TCP provides reliable, ordered delivery of a stream of bytes from a program on one computer to another program on another computer. TCP is the protocol used by major Internet applications such as the World Wide Web, email, remote administration and file transfer. Other applications, which do not require reliable data stream service, may use the User Datagram Protocol (UDP),
UDP provides a datagram service that emphasizes reduced latency over reliability. i.e speed is more prioritized than security here.****What is HTTP? HTTP (Hypertext Transfer Protocol) is the set of rules for transferring files (text, graphic images, sound, video, and other multimedia files) on the World Wide Web. As soon as a Web user opens their Web browser, the user is indirectly making use of HTTP. HTTP is an application protocol that runs on top of the TCP/IP suite of protocols (the foundation protocols for the Internet). HTTP is a stateless protocol In computing, a stateless protocol is a communications protocol that treats each request as an independent transaction that is unrelated to any previous request so that the communication consists of independent pairs of requests and responses. A stateless protocol does not require the server to retain session information or status about each communications partner for the duration of multiple requests. An example of a stateless protocol is the Hypertext Transfer Protocol (HTTP) which is the foundation of data communication for the World Wide Web. How can HTTP be made statefull ? One is cookies, in which case the state is sent and returned in HTTP headers. The second is URL rewriting, in which case the state is sent as part of the response and returned as part of the request URI. The third is hidden form fields, in which the state is sent to the client as part of the response, and returned to the server as part of a form’s data (which can be in the request URI or the POST body, depending on the form’s method). GET Method: 1. All the name value pairs are submitted as a query string in URL. 2. It’s not secured as it is visible in plain text format in the Location bar of the web browser. 3. As the data transfers through address bar (URL) there are some restrictions in using space, some characters like ampersand (&) etc in the GET method of posting data. We have to take special care for encoding data if such special characters are present. 4. Length of the string is restricted. 5. If method is not mentioned in the Form tag, this is the default method used. 6. If get method is used and if the page is refreshed it would not prompt before the request is submitted again. 7. One can store the name value pairs as bookmark and directly be used while sharing with others – example search results. 8. Data is always submitted in the form of text 9. If the response of the page is always same for the posted query then use GET example database searches POST Method: 1. All the name value pairs are submitted in the Message Body of the request. 2. Length of the string (amount of data submitted) is not restricted. 3. Post Method is secured because Name-Value pairs cannot be seen in location bar of the web browser. 4. If post method is used and if the page is refreshed it would prompt before the request is resubmitted. 5. If the service associated with the processing of a form has side effects (for example, modification of a database or subscription to a service), the method should be POST. 6. Data is submitted in the form as specified in enctype attribute of form tag and thus files can be used in FileUpload input box. Methods of HTTP HTTP defines nine methods (sometimes referred to as “verbs”) indicating the desired action to be performed on the identified resource. What this resource represents, whether pre-existing data or data that is generated dynamically, depends on the implementation of the server. Often, the resource corresponds to a file or the output of an executable residing on the server. HEAD **Asks for the response identical to the one that would correspond to a GET request, but without the response body. This is useful for retrieving meta-information written in response headers, without having to transport the entire content. **GET **Requests a representation of the specified resource. Requests using GET should only retrieve data and should have no other effect. (This is also true of some other HTTP methods.) The W3C has published guidance principles on this distinction, saying, “Web application design should be informed by the above principles, but also by the relevant limitations.” **POST **Submits data to be processed (e.g., from an HTML form) to the identified resource. The data is included in the body of the request. This may result in the creation of a new resource or the updates of existing resources or both. **PUT **Uploads a representation of the specified resource. **DELETE **Deletes the specified resource. **TRACE **Echoes back the received request, so that a client can see what (if any) changes or additions have been made by intermediate servers. **OPTIONS **Returns the HTTP methods that the server supports for specified URL. This can be used to check the functionality of a web server by requesting ‘*’ instead of a specific resource. **CONNECT **Converts the request connection to a transparent TCP/IP tunnel, usually to facilitate SSL-encrypted communication (HTTPS) through an unencrypted HTTP proxy. **PATCH **Is used to apply partial modifications to a resource. HTTP servers are required to implement at least the GET and HEAD methods and, whenever possible, also the OPTIONS method. Some methods (for example, HEAD, GET, OPTIONS and TRACE) are defined as safe** Socket Programming Socket Programming is a technique through which we establish communication between client and server. What is IP? An Internet Protocol address (IP address) is a numerical label assigned to each device (e.g., computer, printer) participating in a computer network that uses the Internet Protocol for communication. An IP address serves two principal functions: host or network interface identification and location addressing. Its role has been characterized as follows: “A name indicates what we seek. An address indicates where it is. A route indicates how to get there.”

SQL Interview Questions and Answers

What is normalization? What are different types of normalization?
What is denormalization?
What is a candidate key?
What are the different types of joins? What is the difference between them?
What are indexes? What is the difference between clustered and nonclustered indexes?
How can you increase SQL performance?
What is the use of OLAP?
What is a measure in OLAP?
What are dimensions in OLAP?
What are levels in dimensions?
What are fact tables and dimension tables in OLAP?
What is DTS?
What is fill factor ?
What is RAID and how does it work?
What is the difference between DELETE TABLE and TRUNCATE TABLE commands?
If locking is not implemented, what issues can occur?
What are different transaction levels in SQL SERVER?
What are the different locks in SQL SERVER?
Can we suggest locking hints to SQL SERVER?
What is LOCK escalation?
What are the different ways of moving data between databases in SQL Server?
What are advantages of SQL 2000 over SQl 7.0?
What is the difference between a HAVING CLAUSE and a WHERE CLAUSE?
What is the difference between UNION and UNION ALL SQL syntax?
How can you raise custom errors from stored procedure?
what is ACID fundamental? What are transactions in SQL SERVER?
What is DBCC?
What is the purpose of Replication?
What are the different types of replication supported by SQL SERVER?
What is BCP utility in SQL SERVER?
What are the different types of triggers in SQl SERVER?
If we have multiple AFTER Triggers on table how can we define the sequence of the triggers?
What is SQL injection?
What is the difference between Stored Procedure (SP) and User Defined Function (UDF)?

ADO.NET Interview Questions and Answers

What is the namespace in which .NET has the data functionality class?
Can you give an overview of ADO.NET architecture?
What are the two fundamental objects in ADO.NET?
What is difference between dataset and data reader?
What are major difference between classic ADO and ADO.NET?
What is the use of connection object?
What is the use of command objects?
What is the use of data adapter?
What are basic methods of Data adapter?
What is Dataset object?
What are the various objects in Dataset?
How can we connect to Microsoft Access, FoxPro, and Oracle etc?
How do we connect to SQL SERVER, which namespace do we use?
How do we use stored procedure in ADO.NET and how do we provide parameters to the stored procedures?
How can we force the connection object to close after my data reader is closed?
I want to force the data reader to return only schema of the data store rather than data.?
How can we fine-tune the command object when we are expecting a single row?
Which is the best place to store connection string in .NET projects?
What are the steps involved to fill a dataset?
What are the various methods provided by the dataset object to generate XML?
How can we save all data from dataset?
How can we check that some changes have been made to dataset since it was loaded?
How can we add/remove row is in “Data Table” object of “Dataset”?
What is basic use of “Data View”?
What is the difference between “Dataset” and “Data Reader” ?
How can we load multiple tables in a Dataset?
How can we add relation between tables in a Dataset?
What is the use of Command Builder?
What’s difference between “Optimistic” and “Pessimistic” locking ?
How many ways are there to implement locking in ADO.NET?
How can we perform transactions in .NET?
What is difference between Dataset? Clone and Dataset. Copy?
Can you explain the difference between an ADO.NET Dataset and an ADO Record set?
Explain in detail the fundamental of connection pooling?
What is Maximum Pool Size in ADO.NET Connection String?
How to enable and disable connection pooling?
What extra features does ADO.Net 2.0 have ?

ASP.NET Patterns and Architecture Interview Questions and Answers

What are design patterns?
What is the difference between Factory and Abstract Factory Patterns?
What is MVC pattern?
How can we implement singleton pattern in .NET?
How do you implement prototype pattern in .NET?
What are the situations you will use a Web Service and Remoting in projects?
Can you give a practical implementation of FAÇADE patterns?
How can we implement observer pattern in .NET?
What is three-tier architecture?
Have you ever worked with Microsoft Application Blocks, if yes then which?
What is Service Oriented architecture?
What are different ways you can pass data between tiers?
What is Windows DNA architecture?
What is aspect oriented programming?

ASP.NET Interview Questions and Answers

What’ is the sequence in which ASP.NET events are processed?
In which event are the controls fully loaded?
How can we identify that the Page is Post Back?
How does ASP.NET maintain state in between subsequent request?
What is event bubbling?
How do we assign page specific attributes?
How do we ensure viewstate is not tampered?
What is the use of @ Register directives?
What is the use of Smart Navigation property?
What is AppSetting Section in “Web.Config” file?
Where is View State information stored?
what is the use of @ Output Cache directive in ASP.NET?
How can we create custom controls in ASP.NET?
How many types of validation controls are provided by ASP.NET?
Can you explain “AutoPostBack”?
How can you enable automatic paging in Data Grid?
What is the use of “GLOBAL.ASAX” file?
What is the difference between “Web.config” and “Machine.Config”?
What is a SESSION and APPLICATION object?
What is the difference between ‘Server.Transfer’ and ‘response. Redirect’ ?
What is the difference between Authentication and authorization?
what is impersonation in ASP.NET?
Can you explain in brief how the ASP.NET authentication process works?
What are the various ways of authentication techniques in ASP.NET?
How does authorization work in ASP.NET?
What is difference between Data grid, Datalist, and repeater?
From performance point of view, how do they rate?
What is the method to customize columns in Data Grid?
How can we format data inside Data Grid?
How to decide on the design consideration to take a Data grid, data list, or repeater?
Difference between ASP and ASP.NET?
What are major events in GLOBAL.ASAX file?
What order they are triggered?
Do session use cookies?
How can we force all the validation control to run?
How can we check if all the validation control are valid and proper?
If client side validation is enabled in your Web page, does that mean server side code is not run.?
Which JavaScript file is referenced for validating the validators at the client side?
How to disable client side script in validators?
How can I show the entire validation error message in a message box on the client side?
You find that one of your validations is very complicated and does not fit in any of the validators, what will you do?
What exactly happens when ASPX page is requested from a browser?
How can we kill a user session?
How do you upload a file in ASP.NET?
How do I send email message from ASP.NET?
What are different IIS isolation levels?
ASP used STA threading model, what is the threading model used for ASP.NET.?
What is the use of <%@ page aspcompat=true %> attribute?
Explain the differences between Server-side and Client-side code?
Can you explain Forms authentication in detail?
How do I sign out in forms authentication?
If cookies are not enabled at browser end does form Authentication work?
How to use a checkbox in a data grid?
What are the steps to create a windows service in VB.NET?
What is the difference between “Web farms” and “Web garden”?
How do we configure “Web Garden”?
What is the main difference between Grid layout and Flow Layout?
What’s the difference between trace and debug in ASP.NET?
How do you enable tracing in on an ASP.NET page?
Which namespace is needed to implement debug and trace ?
Can you explain the concept of trace listener?
What are trace switches?

ASP.NET OOPS Interview Questions and Answers

What is Object Oriented Programming?
What is a Class?
What is an Object?
What is the relation between Classes and Objects?
What are different properties provided by Object-oriented systems?
How can we achieve inheritance in VB.NET?
what are abstract classes?
What is a Interface?
What is difference between abstract classes and interfaces?
What is a delegate?
What are Events?
Do events have return type?
Can events have access modifiers?
Can we have shared events?
what is shadowing?
What is the difference between Shadowing and Overriding?
what is the difference between delegate and events?
If we inherit a class do the private variables also get inherited?
What is the different accessibility levels defined in .NET?
Can you prevent a class from overriding?
what is the use of “Must inherit” keyword in VB.NET?
Do interface have accessibility modifier?
What are similarities between Class and structure?
What is the difference between Class and structure’s?
What does virtual keyword mean?
What are shared (VB.NET)/Static(C#) variables?
What is Dispose method in .NET?
What is the use of “Overrides” and “Overridable” keywords?
Where are all .NET Collection classes located?
What is ArrayList?
What is a HashTable?
What are queues and stacks?
What is ENUM?
What is nested Classes?
What is Operator overloading in .NET?
For the below code which constructor will fire first?
What is the significance of Finalize method in .NET?
How can we suppress a finalize method?
What is the use of DISPOSE method?
How do I force the Dispose method to be called automatically, as clients can forget to call Dispose method?
In what instances you will declare a constructor to be private?
Can we have different access modifiers on get/set methods of a property ?
If we write a goto or a return statement in try and catch block will the finally block execute?
What is Indexer?
Can we have static indexer in C#?
Can two catch blocks be executed?
What is the difference between System.String and System.StringBuilder classes?

ASP.NET Caching Interview Questions and Answers

What is an application object?
what is the difference between Cache object and application object?
How can get access to cache object?
What are dependencies in cache and types of dependencies?
Can you show a simple code showing file dependency in cache?
What is Cache Callback in Cache?
What is scavenging?
What are different types of caching using cache object of ASP.NET?
How can you cache different version of same page using ASP.NET cache object?
How will implement Page Fragment Caching?
Can you compare ASP.NET sessions with classic ASP?
Which are the various modes of storing ASP.NET session?
Is Session_End event supported in all session modes?
What are the steps to configure StateServer Mode?
What are the steps to configure SQLServer mode?
Where do you specify session state mode in ASP.NET?
What are the other ways you can maintain state?
What are benefits and Limitation of using Hidden fields?
What is ViewState?
Does the performance for viewstate vary according to User controls?
What are benefits and Limitation of using Viewstate for state management?
How can you use Hidden frames to cache client data ?
What are benefits and limitations of using Hidden frames?
What are benefits and limitations of using Cookies?
What is Query String and What are benefits and limitations of using Query Strings?
What is Absolute and Sliding expiration?
What is cross page posting?
How do we access viewstate value of this page in the next page ?
Can we post and access view state in another application?
What is SQL Cache Dependency in ASP.NET 2.0?
How do we enable SQL Cache Dependency in ASP.NET 2.0?
What is Post Cache substitution?
Why do we need methods to be static for Post Cache substitution?

ASP.NET Webservices Interview Questions and Answers

What is an application domain?
What is .NET Remoting?
Which class does the remote object has to inherit?
what are two different types of remote object creation mode in .NET ?
Describe in detail Basic of SAO architecture of Remoting?
What are the situations you will use singleton architecture in remoting?
What is fundamental of published or precreated objects in Remoting?
What are the ways in which client can create object on server in CAO model?
Are CAO stateful in nature?
To create objects in CAO with ‘new’ keyword what should be done?
Is it a good design practice to distribute the implementation to Remoting Client?
What are LeaseTime, SponsorshipTime, RenewonCallTime and LeaseManagerPollTime?
Which config file has all the supported channels/protocol?
How can you specify remoting parameters using Config files?
Can Non-Default constructors be used with Single Call SAO?
How can we call methods in remoting asynchronously?
What is Asynchronous One-Way Calls?
What is marshalling and what are different kinds of marshalling?
What is ObjRef object in remoting?
What is a Web Service?
What is UDDI?
What is DISCO?
What is WSDL?
What the different phase/steps of acquiring a proxy object in Web service?
What the different phase/steps of acquiring a proxy object in Web service?
What is file extension of Web services?
Which attribute is used in order that the method can be used as WebService?
What are the steps to create a web service and consume it?
Do webservice have state?

ASP.NET Threading Interview Questions and Answers

What is Multi-tasking?
What is Multi-threading?
What is a Thread?
Did VB6 support multi-threading?
Can we have multiple threads in one App domain?
Which namespace has threading?
What does Address Of operator do in background?
How can you reference current thread of the method?
what is Thread.Sleep () in threading?
How can we make a thread sleep for infinite period?
What is Suspend and Resume in Threading?
What the way to stop a long running thread?
How do I debug thread?
What is Thread.Join () in threading?
What are Daemon threads and how can a thread be created as Daemon?
How is shared data managed in threading?
Can we use events with threading?
How can we know a state of a thread?
What is use of Interlocked class ?
What is a monitor object?
What are wait handles?
What is ManualResetEvent and AutoResetEvent?
What is Reader Writer Locks?
How can you avoid deadlock in threading?
What is the difference between thread and process?

ASP.NET .NET Framework Interview Questions and Answers

What is ASP.NET ?

What is an IL?

What is a CLR?

What is CTS?

What is a CLS (Common Language Specification)?
What is a Managed Code?
What is a Assembly?
What are the different types of Assembly?
What is NameSpace?
What is Difference between NameSpace and Assembly?
If you want to view an Assembly how do you go about it?
What is Manifest?
Where is version information stored of an assembly?
Is versioning applicable to private assemblies?
What is GAC?
what is the concept of strong names?
How to add and remove an assembly from GAC?
What is Delay signing?
What is garbage collection?
Can we force garbage collector to run?
What is reflection?
What are different types of JIT?
What are Value types and Reference types?
What is concept of Boxing and Unboxing ?
What is the difference between VB.NET and C#?
what is the difference between System exceptions and Application exceptions?
What is CODE Access security?
What is a satellite assembly?
How to prevent my .NET DLL to be decompiled?
what is the difference between Convert.toString and .toString () method?
What is Native Image Generator (Ngen.exe)?
If we have two version of same assembly in GAC how do we make a choice?
What is CodeDom?