I have a silverlight-enabled WCF-service, of which one method absolutely requires the [STAOperationBehavior] attri......e. I need to access user details (Forms Authentication) for the user, ...... Membership.GetUser() fails while the [STAOperationBehavior] attri......e is applied.
i.e.
[STAOperationBehavior]
[OperationContract]
public string DoWork(int inputStuff)
{
Membership.GetUser();//Fails
}
......
//NOT ON STA THREAD
[OperationContract]
public string DoWork(int inputStuff)
{
Membership.GetUser();//Works
}
我如何利用这一方法获得用户信息,或者以其他方式向用户提供信息?