Hi.
I'd like some basic guidance on setting up my WCF configuration. This is my first serious effort with WCF (and first post on stackoverflow).
I have a WCF class library (APILibrary) that I am referncing in my web project. In the wcf library, I currently have two services - IAuthService and ITradeService.
Along these lines, I have three questions:
1) My problem (and the original reason for this post) is that when I compile my application I am able to call TradeServiceCient but not AuthServiceClient in my web app. The latter does not appear in the intellisense. I have a feeling that it has to do with the fact that they are sharing the same port (and only one endpoint got included) but I am obviously unclear.
2) I am attempting to expose two service endpoints at the same time (and, likely a few more) while I develop and test. When I move over to staging and hosting, each endpoint will have its own address. Until then, how do I do this (I have a feeling this relates to my question above)?
3) I am noticing in a lot of posts people have examples of the "client" and "server" "system.serviceModel" code. Are these unique files or tags in the App.config file that resides in my WCF library? What is each doing? Currently, I think I just have the server side?
Here is what I currently have in my App.config file (in my WCF Library):
<?xml version="1.0" encoding="utf-8" ?>
<configuration>
<system.web>
<compilation debug="true" />
</system.web>
<!-- When deploying the service library project, the content of the config file must be added to the host's
app.config file. System.Configuration does not support config files for libraries. -->
<system.serviceModel>
<client />
<services>
<service behaviorConfiguration="ApiLibrary.ApiBehavior" name="SpoonSys.Api.Trade.TradeService">
<endpoint address="" binding="wsHttpBinding" contract="SpoonSys.Api.Trade.ITradeService">
<identity>
<dns value="localhost:8731" />
</identity>
</endpoint>
<endpoint address="mex" binding="mexHttpBinding" contract="IMetadataExchange" />
<host>
<baseAddresses>
<add baseAddress="http://localhost:8731/Design_Time_Addresses/ApiLibrary/Trade/" />
</baseAddresses>
</host>
</service>
<service behaviorConfiguration="ApiLibrary.ApiBehavior" name="SpoonSys.Api.Authentication.AuthService">
<endpoint address="" binding="wsHttpBinding" contract="SpoonSys.Api.Authentication.IAuthService">
<identity>
<dns value="localhost:8731" />
</identity>
</endpoint>
<endpoint address="mex" binding="mexHttpBinding" contract="IMetadataExchange" />
<host>
<baseAddresses>
<add baseAddress="http://localhost:8731/Design_Time_Addresses/ApiLibrary/Authentication/" />
</baseAddresses>
</host>
</service>
</services>
<behaviors>
<serviceBehaviors>
<behavior name="ApiLibrary.ApiBehavior">
<!-- To avoid disclosing metadata information,
set the value below to false and remove the metadata endpoint above before deployment -->
<serviceMetadata httpGetEnabled="True"/>
<!-- To receive exception details in faults for debugging purposes,
set the value below to true. Set to false before deployment
to avoid disclosing exception information -->
<serviceDebug includeExceptionDetailInFaults="True" />
</behavior>
</serviceBehaviors>
</behaviors>
</system.serviceModel>
</configuration>
My configuration is ASP.NET / Framework 3.5 / VS 2008 / C#
I appreciate your help.