Я получаю следующую ошибку при выполнении моего простого приложения транзакций wcf.Почему моя транзакция WCF не работает?
«По крайней мере, одна операция по контракту„Service1“сконфигурирован с TransactionFlowAttribute атрибут установлен обязательным требованием, но канала связывания„BasicHttpBinding“не настроен с TransactionFlowBindingElement. TransactionFlowAttribute набор атрибутов для обязательного не может быть использована без TransactionFlowBindingElement «.
Мой Фрагмент кода выглядит следующим образом: Iservice1.cs
[OperationContract]
[TransactionFlow(TransactionFlowOption.Mandatory)]
bool PerformCreditTransaction(string creditAccountID, double amount);
[OperationContract, TransactionFlow(TransactionFlowOption.Mandatory)]
bool PerformDebitTransaction(string debitAccountID, double amount);
Service1.svc.cs
[OperationBehavior(TransactionScopeRequired = true)]
public bool PerformCreditTransaction(string creditAccountID, double amount)
{
//my code
}
[OperationBehavior(TransactionScopeRequired = true)]
public bool PerformDebitTransaction(string debitAccountID, double amount)
{
//my code
}
Может ли один помочь мне с этой проблемой?