Asp.net,异步抛出Response is not available in

ApiNativeDelegate apinative = new ApiNativeDelegate(NativeNotify);
IAsyncResult ia = apinative.BeginInvoke(order_no, null, null);

public void NativeNotify(string order_no) {
        WxPayData result = null;
        do
        {
            Thread.Sleep(1000);
            WxPayData data = new WxPayData();
            data.SetValue("out_trade_no", order_no);
            result = WxPayApi.OrderQuery(data);
        } while (result.ToPrintStr().Contains("订单未支付"));
        string timestamp = DateTime.Now.ToString("yyyyMMddHHmmss");
        string umd5 = Commonlib.CheckUserAuth(order_no, timestamp);
        string geturl = "www.baidu.com";
        Response.Redirect(geturl);    -- 出现此标题错误。Response is not available in this context.
    }

            原因页面加载完就不能使用 Response 跳转。 有没有什么好的办法 实现监控完跳转
查看全部
hjhnet
hjhnet
2015/08/05 07:39
  • string
  • asp.net
  • 异步
  • 点赞
  • 收藏
  • 回答
    私信

1个回复