1

Possible Duplicate:
WCF service: app.config versus attributes or a mixture of both

can i override the hard coded configuration with the app.config configuration?

for example, i have this hard coded configuration:

[ServiceBehavior(TransactionTimeout = "00:02:00")]
public class DateTimeService : IDateTimeService
{
    //....
}

and i want to override this with app.config configuration, like this:

<serviceBehaviors >
    <behavior name ="DateTimeService_serviceBehavior">
      <serviceTimeouts transactionTimeout ="00:01:00"/>
    </behavior>
  </serviceBehaviors>

is it possible ? also, is it possible to merge those configurations in case of different elements?

Community
  • 1
  • 1
Jacob
  • 751
  • 1
  • 6
  • 18
  • 2
    This should answer your question: http://stackoverflow.com/questions/6761105/wcf-service-app-config-versus-attributes-or-a-mixture-of-both – Pete Dec 11 '12 at 15:44

0 Answers0