hoetz
hoetz

Reputation: 2388

Silverlight 4 + Prism + WCF: Storing user information globally

I've set up a Silverlight 4 Application with PRISM 4. During startup I'd like to get the Active Directory User GUID of the currently logged on User and want to make it accessible for the entire application. What's the best practice for achieving this? Getting the User GUID itself is no problem for me. Thank you!

Upvotes: 1

Views: 499

Answers (2)

Neil
Neil

Reputation: 1922

If you are not too worried about client side security then you can store the the information in the IsolatedStorage and pass it to WCF or use it in silverlight

If you want the information accessible anywhere in your WCF service. Then i suggest using a MembershipProvider that authenticates the user against the Active directory store, then you can access it via the OperationContext

Upvotes: 0

Rafa Castaneda
Rafa Castaneda

Reputation: 832

There many ways, i'd suggest you to create a service interface with properties for your settings, for example:

public interface ISettingsService
{
    Guid ActiveDirectoryGuid { get; }

    // Other settings
}

and have Prism to inyect a singleton instance of a class that implement the interface into whatever place where you need the setting.

Upvotes: 1

Related Questions