WCF-service is hosted by ASP.NET web-site. ASP.NET Membership is not used in web-site. User is logged using "custom" page, ID of logged user is stored into Session (HttpContext.Current.Session).
WCF-service is consumed by Silverlight (4 version) application.
How to check if current user (that loaded Silverlight application) is authorised to access a certain WCF-method?
I see few options:
- During request to WCF-method check if the HttpContext.Current.Session object contains user id. This method doesn't work for me (http://stackoverflow.com/questions/3162819/httpcontext-current-in-wcf-service-during-2nd-request).
- Use OperationContext - I don't know how to use it.
Could you please:
a. advise me how to resolve any of the above listed issues;
OR (probably better option)
b. suggest me any other approach.
Thanks you very much.