关于 wcf 异常处理——页面超时

异常错误:

通信对象System.ServiceModel.Channels.ServiceChannel 无法用于通信

解决方案:

后台 Code
try

{

  DBService.DataAccessServiceClient daclient = new DBService.DataAccessServiceClient();

    

...

    _daclient .Close();

}

catch (CommunicationException e)

{

    ...

    _daclient .Abort();

}

catch (TimeoutException e)

{

    ...

    _daclient .Abort();

}

catch (Exception e)

{

    ...

    _daclient .Abort();

    throw;

}

 

 

Tks:http://www.cnblogs.com/aehyok/archive/2013/03/29/2955379.html

你可能感兴趣的:(异常处理)