[英]Windows 8 C# portable library for metro app foreground background lock HttpWebRequest
I have an issue on Windows 8 C# library for a metro application. 我在都会应用程序的Windows 8 C#库上遇到问题。 I use an HttpWebRequest object to send datas and receive server response with BeginGetRequestStream method.
我使用HttpWebRequest对象使用BeginGetRequestStream方法发送数据并接收服务器响应。 But when I go background foreground several times I never reaching this code :
但是当我多次进入后台前景时,我从未到达以下代码:
HttpWebRequest req = HttpWebRequest.CreateHttp(monUri); req.BeginGetRequestStream(result => { /* My Code */ },req);
I found this topic Windows 8.1 App - HttpWebRequest working only once but I cannot use "await" because I am in a C# portable library. 我发现此主题Windows 8.1 App-HttpWebRequest仅工作一次,但由于使用C#可移植库,因此无法使用“等待”。
Moreover I have try to abort all connexion but when I start a new one I am already locked. 此外,我尝试中止所有连接,但是当我开始一个新连接时,我已经被锁定。
On network stacktrace it is locked at : Exiting HttpWebRequest#44973269::BeginGetRequestStream() -> ContextAwareResult#52835420 在网络堆栈跟踪上,它被锁定在:退出HttpWebRequest#44973269 :: BeginGetRequestStream()-> ContextAwareResult#52835420
Several things: 几件事:
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.