For ASMX, this is correct and pretty much good. Services should be as stateless as possible, and if you really need to store something between calls, you can use a singleton. I donβt think that keeping a database connection would be qualified because they are cached and you still want to use your use.
If you want one object to stay alive between calls, WCF offers this option. Given that ASMX is out of date, you can go to WCF.
Steven sudit
source share