WCF/S#arpArch: underlying ISession is closed after the first call within a request

前端 未结 2 835
清酒与你
清酒与你 2021-01-03 12:37

I know the use of WCF in SA is deprecated because it will move to SA Contrib. But until it has, I guess I have to use the support in SA.

That said, I have a problem

2条回答
  •  长发绾君心
    2021-01-03 13:25

    I'm not that familiar with SharpArchitecture, but it seems like you have at least two options here:

    1. On the client side, dispose the WCF Service after the first call and new up another WCF Service before making the second call, thus getting a new ISession.

    2. Make the WCF Service smarter about session disposal such that you can keep the session open longer. There are multiple ways to do this and it probably involves a decent amount of new logic in the WCF service, but it should be totally feasible.

提交回复
热议问题