silverlight - is it safe to use public static variables in WCF? -


i'm reading emails in silverlight 4 app (vs2010, c#), i've created wcf handles email operations (through imap), , consume functions in silverlight app (in fact silverlight app going user control in parent silverlight application). can declare public static variables username, password, imap server address , other items? application have several users, safe use public static variables in wcf or should pass username, password, imap address, port , other stuff wcf functions each user? options here?

should use mechanism such sessions or can safely use static variables? happen if several users call service @ same time?

thanks

if parameters going same users in simple case can read them config file instead of hard-coding them in static variables. in way if server or port changes can update web.config without going recompile.

if parameters changes user user better idea create class in service side contains parameters.

there no problem in using static variables in wcf when constants. when not constants may have thread.


Comments

Popular posts from this blog

django - How can I change user group without delete record -

java - Need to add SOAP security token -

java - EclipseLink JPA Object is not a known entity type -