I have a class library with loads of classes like User and Customer blah blah blah
I have 4 params that are common to ALL calls to these objects:
  • Auth Username
  • Auth Password
  • WebServiceURL
  • PDC

ie:
Code:
Dim obj As New User("My New User Name", authUsername, authPassword, url, pdc)
this however is very irritating and I simplyu want to call this function with the param "My New User Name".

I created a new shared class, in the project with all my other classes, and used this to store the props I want. Now my code looks like:

Code:
WokasDataController.AuthUsername = authUsername
WokasDataController.AuthPassword = authPassword
WokasDataController.WebServiceURL = url
WokasDataController.PDC = pdc

Dim obj As New User("My New User Name)
The code inside the User class then queries this data from the shared file.
All good so far.

Except that in the web world the saved data is available to the entire web app and not just the session that the app is running under. These shared params can therefore get overwritten my another user submitting a request.

Any ideas on how to get these 4 params into my DLL with passing all 4 to every function calls that makes a call to the backend web service?

Woof