I work with legacy code <gulp>written in .NET 3.5 using ASMX web services.
The Windows service (call it FooService) statically caches the ASMX proxy for the web service (call it BarWS), which it calls in response to client requests about 10-30 times per hour.
Being <gulp>legacy code, it is incredibly difficult to test for various reasons. I'm in the process of breaking down dependencies to make it verifiable, and this static link got me thinking. It has been many years since I used ASMX, and I remember that the proxy is thread safe, but I wondered if it could become unusable just like the Singleton / shared WCF proxies when they create a problem and become invalid.
Given the easy use of this proxy (BarWS is called less than 30 times / hour), I think it would be much safer to create a new proxy on every call, but I'm just wondering if I will make unnecessary changes. Somebody knows?
PS I know WCF is better, but the transition to WCF has changed too much right now in this <gulp>outdated code base.
source
share