Last post Sep 24, 2013 06:41 AM by ramana123
Sep 24, 2013 04:35 AM|johnlim35|LINK
I had web service projects which consists of alot ASMX page, and recently i noticed that there is a SAME VARIABLES existing in ASMX page.
I understood that there is a way to put all those variables in global class files, but is there any other good way to handle that?
Kindly share :)
Sep 24, 2013 04:39 AM|atulthummar|LINK
Just use Session state, or else just pass the data you need in the method calls.
Sep 24, 2013 04:41 AM|MetalAsp.Net|LINK
Application might be an option. Or maybe some config file.
Sep 24, 2013 04:44 AM|PatriceSc|LINK
It depends on how they are used rather than how they are named. Could they have a different value if both ASMX services are called at the same time ?
For example if they provide configuration values, base data for all services etc... the approach would be likely different. IMO we need to know first how they are used.
Sep 24, 2013 06:41 AM|ramana123|LINK
you can even try putting those values in singleton way and use the singleton in all ASMX within the project. so no duplication or no data inconsistency all ASMX will read same values.
just a thought.