IIS7.5でASP.NET4.0を使用しており、WCFコールバック手法を使用しています。コールバックは問題ありません。wcfサービスはWebクライアントでコールバックメソッドを起動できますが、UIスレッドとは別のスレッドにあるようです。
public partial class _Default : System.Web.UI.Page, IServiceCallback
{
private IService proxy = null;
private static TextBox _textBoxtest;
protected void Page_Load(object sender, EventArgs e)
{
_textBoxtest = TextBox1;
}
protected void Button1_Click(object sender, EventArgs e)
{
//then server will call back to FireCallBackFromServer
proxy.CallService(type, "someObject");
}
#region IServiceCallback Members
public void FireCallBackFromServer(string txt)
{
TextBox1.Text = txt; <-- the value does not update on textBox
}
#endregion
}
コールバックイベントからtextBoxを更新する方法を考えるのを手伝ってください。
ありがとうございました。