You must Sign In to post a response.
  • Category: WCF

    What is the full form of svc file

    what is the full form of svc file
  • #487210
    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


  • 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.