Win Surprise Gifts!!!
Top 5 Contributors of the Month
Post New Question
Subscribe to Interview Questions
What are the various ways of hosting a WCF Service?
Posted By :
Posted Date :
September 28, 2010
There are three ways available through which we can host the WCF Service, They are;
1) Using Internet Information Server(IIS)
2) Self hosting
3) Windows Activation Service (WAS)
You can also find related Interview Question to
What are the various ways of hosting a WCF Service?
What are the various ways of hosting a WCF service?
Ways of hosting WCF Service: Self hosting: - The service code is embedded within the application code. An end point for the service is defined and an instance of SeriveHost is created.
What are different ways hosting WCF services ?
WAS(Windows Activation Service) (Your selection was wrong)
What are various ways of hosting WCF Services?
For a service to host, we need at least a managed process, a ServiceHost instance and an Endpoint configured. Possible approaches for hosting a service are:
1. Hosting in a Managed Application/ Self Hosting
a. Console Application
b. Windows Application
c. Windows Service
2. Hosting on Web Server
a. IIS 6.0 (ASP.NET Application supports only HTTP)
b. Windows Process Activation Service (WAS) i.e. IIS 7.0 supports HTTP, TCP,
What are tha advantages of hosting WCF service in WAS?
WAS (Windows Activation Service) is a component of IIS 7.0. Following are few advantages :
1. We are not only limited to HTTP protocol. We can also use supported protocols like TCP, named pipes and MSMQ
2. No need to completely install IIS. We can only install WAS component and keep away the WebServer.
What is serialization in .NET? What are the ways to control serialization?
Serialization is the process of converting an object into a stream of bytes. Deserialization is the opposite process of creating an object from a stream of bytes. Serialization/Deserialization is mostly used to transport objects (e.g. during remoting), or to persist objects (e.g. to a file or database).Serialization can be defined as the process of storing the state of an object to a storage medium. During this process, the public and private fields of the object and the name of the class, including the assembly containing the class, are converted to a stream of bytes, which is then written to a data stream. When the object is subsequently deserialized, an exact clone of the original object is created.
Binary serialization preserves type fidelity, which is useful for preserving the state of an object between different invocations of an application. For example, you can share an object between different applications by serializing it to the clipboard. You can serialize an object to a stream, disk, memory, over the network, and so forth. Remoting uses serialization to pass objects "by value" from one computer or application domain to another.
XML serialization serializes only public properties and fields and does not preserve type fidelity. This is useful when you want to provide or consume data without restricting the application that uses the data. Because XML is an open standard, it is an attractive choice for sharing data across the Web. SOAP is an open standard, which makes it an attractive choice.
There are two separate mechanisms provided by the .NET class library -
XmlSerializer and SoapFormatter/BinaryFormatter. Microsoft uses XmlSerializer for Web Services, and uses
SoapFormatter/BinaryFormatter for remoting. Both are available for use in your own code.
Where is window Service Entries located in the system
Describe ways of cleaning up objects.
The run time will maintain a service called as garbage collector.
this service will take care of deallocating memory corresponding to
objects.it works as a thread with least priority.when application
demenads for memory the runtime will take care of setting the high
priority for the garbage collector,so that it will be called for execution
and memory will be released.the programmer can make a call
to garbage colector by using GC class in system name space.
What is the Transport Protocol you use to call a Web Service ?
SOAP (Simple Object Access Protocol) is the preferred protocol.
What is SQL Server Service broker?
Service Broker is a unique feature in Microsoft SQL Server 2005 which is used to by internal or external processes to send and receive guaranteed, asynchronous messages by using extensions to Transact-SQL Data Manipulation Language (DML).
It's a platform for building a new class of loosely coupled services for database applications. Service Broker not only brings asynchronous, queued messaging to database applications but significantly expands the state of the art for reliable messaging.
The key components of SQL Server Service broker are
.Queue stores the messages for a particular service.
.Dialog is a conversation between two services.
.Conversation group is a group of related conversations. Every conversation belongs to exactly one conversation group.
.Activation specifies a stored procedure that will handle messages destined for a particular service.
What are the essential components of SQL Server Service broker?
Service Broker uses queues to provide loose coupling between the message sender and the message receiver. The sender can put a message in a queue and then continue on with the application, relying on Service Broker to ensure that the message reaches its destination. Queues permit a lot of scheduling flexibility.
Dialogs are bidirectional streams of messages between two endpoints. All messages in a dialog are ordered, and dialog messages are always delivered in the order they are sent. The order is maintained across transactions, across input threads, across output threads, and across crashes and restarts.
It's a way of grouping all the dialogs that are used for a particular task. All the dialogs associated with processing a particular order would be grouped into a single conversation group. The conversation group is implemented as a conversation group identifier, which is included with all messages in all dialogs contained in the conversation group. When a message is received from any of the dialogs in a conversation group, the conversation group is locked with a lock that is held by the receiving transaction. For the duration of the transaction, only the thread that holds the lock can receive messages from any of the dialogs in the conversation group. This makes our order entry application much easier to write because even though we use many threads for scalability, any particular order is only processed on one thread at a time. This means we don't have to make our application resilient to problems that are caused by the simultaneous processing of a single order on multiple threads.
You use the activation feature of Service Broker to specify a stored procedure that will handle messages destined for a particular service. When messages arrive for a service, Service Broker checks whether there is a stored procedure running that can process the messages. If there isn't a running message-processing stored procedure, Service Broker starts one. The stored procedure then processes messages until the queue is empty, after which it terminates. Moreover, if Service Broker determines that messages are arriving faster than the stored procedure can process them, it starts additional instances of the stored procedure until enough are running to keep up with the incoming messages (or until the configured maximum number is reached). This ensures that the right number of resources for processing incoming messages are always available.
What are the ways available in SQL Server to execute SQL statements?
SQL Server uses different ways to execute SQL statements which are listed below.
1)Single SQL statement processing
3)Stored procedure and trigger execution
4)Execution plan caching and reuse
5)Parallel query processing
Can a .NET web application consume Java web service?
Yes Offcourse.Actually Webservices are independent to language. it depends on WSDL and SOAP. so any one can develope the Webservices anddisclose the wsdl and users can consume the webservices.wsdl and soap both are xml based.. and all languages having xml parsing
capability and access to http protocol will be able to work with Webservices.
How do you invoke a web method of web service in AJAX?
In order to use a webmethod of a webservice, we need to add the reference of webservice in the
section of ScriptManager. Under services you have to configure the servicepath.
< asp:ScriptManager ID="ScriptManager1" runat="server">
< asp:ServiceReference Path="..\service1.asmx" />
C++ is similar to that of C in following ways ?
Quick Links For Interview Questions Categories:
Find questions, FAQ's and their answers related to .NET, C#, Vb.Net, Sql Server and many more.
Now you can find lots of .NET, C#, Vb.Net, SQL Server,Windows, ASP.Net related Questions and their Answers here at www.dotnetspark.com. Our aim is to help you pass your certification Exams (MCP, MCSD, MCAD etc.,) with flying scores and get good name in your company.
So, Start looking our
section daily and improve your .NET Skills. You can also help others by posting Interview Questions and their Answers in this section.
Hall of Fame
Terms of Service
Tell A Friend