Thanks,
Great... after adding .AddBaseAddresses("
http://localhost:9001/SMS/
service.svc") it started and it works.
Now I go back to the initial question of the post... how do I make the
service read all config settings from app.config instead of hardcoding
them into app or building custom config section? So, instead of
calling AddBaseAddresses and At I would like to point the service to
the config section in the app.config.
For example, app.config contains for this test app the following:
<system.serviceModel>
<bindings>
<basicHttpBinding>
<binding name="Basic" receiveTimeout="00:30:00"
sendTimeout="00:30:00"
maxBufferSize="
2147483647" maxBufferPoolSize="
2147483647"
maxReceivedMessageSize="
2147483647" >
<security mode="None">
<transport clientCredentialType="Basic"
realm="norealmhere" />
</security>
</binding>
</basicHttpBinding>
</bindings>
<services>
<service behaviorConfiguration="MyServiceTypeBehaviors"
name="sms_wcf">
<endpoint address="" binding="basicHttpBinding"
bindingConfiguration="Basic"
contract="TestWCFFacility.IMyService" />
<endpoint address="mex" binding="mexHttpBinding"
contract="IMetadataExchange" />
<host>
<baseAddresses>
<add baseAddress="
http://localhost:9001/svc/service.svc" /
>
</baseAddresses>
</host>
</service>
</services>
<behaviors>
<serviceBehaviors>
<behavior name="MyServiceTypeBehaviors">
<serviceMetadata httpGetEnabled="true"
httpsGetEnabled="true" />
<dataContractSerializer maxItemsInObjectGraph="100000" />
<serviceDebug includeExceptionDetailInFaults="true" />
</behavior>
</serviceBehaviors>
</behaviors>
</system.serviceModel>