I have interest more about a shared service assembly method, how to do that?
"Marc Gravell" <marc.gravell@gmail.com> wrote in message
news:Om7rdZRnHHA.568@TK2MSFTNGP02.phx.gbl...
> Well... what *does* happen?
>
> Have you enabled metadata exchange (mex) for this service? mex is needed
> to generate a proxy, as is visibility of the service. Boilerplate
> IIS-based WCF services tell you how to do this if you browse to the svc
> file, but I'll quote it (bottom).
>
> Finally - note that if you use a shared service assembly then you don't
> need mex at all - you can just use ClientBase<T> for T = your contract (or
> a trivial subclass, since ClientBase<T> is abstract and doesn't expose the
> Channel; I use a subclass that simply exposes the base.Chanel). A shared
> assembly is viable in this type of closed scenario, but is not suited to
> cases where external entities need to call your service (i.e. B2B etc).
>
> Marc
>
> --- mex ---
>
> If you have access to the service, you can enable metadata publishing by
> completing the following steps to modify your web or application
> configuration file:
>
> 1. Create the following service behavior configuration, or add the
> <serviceMetadata> element to an existing service behavior configuration:
>
> <behaviors>
> <serviceBehaviors>
> <behavior name="MyServiceTypeBehaviors" >
> <serviceMetadata httpGetEnabled="true" />
> </behavior>
> </serviceBehaviors>
> </behaviors>
>
> 2. Add the behavior configuration to the service:
>
> <service name="MyNamespace.MyServiceType"
> behaviorConfiguration="MyServiceTypeBehaviors" >
>
> Note: the service name must match the configuration name for the service
> implementation.
>
> 3. Add the following endpoint to your service configuration:
>
> <endpoint contract="IMetadataExchange" binding="mexHttpBinding"
> address="mex" />
>
> Note: your service must have an http base address to add this endpoint.
>
> The following is an example service configuration file with metadata
> publishing enabled:
>
> <configuration>
> <system.serviceModel>
>
> <services>
> <!-- Note: the service name must match the configuration name
> for the service implementation. -->
> <service name="MyNamespace.MyServiceType"
> behaviorConfiguration="MyServiceTypeBehaviors" >
> <!-- Add the following endpoint. -->
> <!-- Note: your service must have an http base address to
> add this endpoint. -->
> <endpoint contract="IMetadataExchange"
> binding="mexHttpBinding" address="mex" />
> </service>
> </services>
>
> <behaviors>
> <serviceBehaviors>
> <behavior name="MyServiceTypeBehaviors" >
> <!-- Add the following element to your service behavior
> configuration. -->
> <serviceMetadata httpGetEnabled="true" />
> </behavior>
> </serviceBehaviors>
> </behaviors>
>
> </system.serviceModel>
> </configuration>
>
>
>