Forums » .NET » WCF »

What is the full form of svc file


Posted Date: 28 Mar 2010      Posted By:: shoab shah     Member Level: Silver    Member Rank: 2600     Points: 1   Responses: 1



what is the full form of svc file




Responses

#487210    Author: Vikram Singh Saini      Member Level: Gold      Member Rank: 248     Date: 28/Mar/2010   Rating: 3 out of 53 out of 53 out of 5     Points: 3

WCF services hosted in IIS are represented as special content files (.svc files) inside the IIS application. This model is similar to the way ASMX pages are represented inside of an IIS application as .asmx files. A .svc file contains a WCF-specific processing directive (@ServiceHost) that allows the WCF hosting infrastructure to activate hosted services in response to incoming messages. The most common syntax for a .svc file is in the following statement.


<% @ServiceHost Service="MyNamespace.MyServiceImplementationTypeName" %>


It consists of the @ServiceHost directive and a single attribute, Service. The value of the Service attribute is the common language runtime (CLR) type name of the service implementation. Using this directive is basically equivalent to creating a service host using the following code.


new ServiceHost( typeof( MyNamespace.MyServiceImplementationTypeName ) );


Additional hosting configuration, such as creating a list of base addresses for the service can also be done. You can also use a custom ServiceHostFactory to extend the directive for use with custom hosting solutions.

The IIS applications that host WCF services are not responsible for managing the creation and lifetime of ServiceHost instances. The managed WCF hosting infrastructure creates the necessary ServiceHost instance dynamically when the first request is received for the .svc file. The instance is not released until either it is closed explicitly by code or when the application is recycled.

NOTE: This content has been picked from http://msdn.microsoft.com/en-us/library/aa751792.aspx

RESULTS MATTER, REASONS NOT!


 
Post Reply

 This thread is locked for new responses. Please post your comments and questions as a separate thread.
If required, refer to the URL of this page in your new post.



Next : Wcf
Previous : Reg.WCF Interview Questions & Answers
Return to Discussion Forum
Post New Message
Category: WCF

Related Messages

Subscribe to Subscribers
Active Members
TodayLast 7 Daysmore...

Awards & Gifts
Talk to Webmaster Tony John
Copyright © SpiderWorks Technologies Pvt Ltd., Kochi, India