无法创建抽象类或接口的实例'Microsoft.Practices.EnterpriseLibrary.WindowsAzure.TransientFaultHandling.RetryManager'

时间:2013-12-28 11:12:36

标签: asp.net sql azure

我只是试图在azure中重试瞬态失败的逻辑,这是我的代码,我收到了这个错误。

Cannot create an instance of the abstract class or interface 'Microsoft.Practices.EnterpriseLibrary.WindowsAzure.TransientFaultHandling.RetryManager'

帮我宽一点

        const string defaultRetryStrategyName = "fixed";
        const int retryCount = 10;
        var retryIntervel = TimeSpan.FromSeconds(3);
        var strategy = new FixedInterval(defaultRetryStrategyName, retryCount, retryIntervel);
        var strategies = new List<RetryStrategy> { strategy };
        var manager = new RetryManager(strategies, defaultRetryStrategyName);
        RetryManager.SetDefault(manager);

0 个答案:

没有答案