Windows phone 7 使用3G时应用程序崩溃

Windows phone 7 使用3G时应用程序崩溃,windows-phone-7,Windows Phone 7,我开发了一个应用程序WCH,它使用套接字连接多个服务器。该应用程序在WI-Fi连接上运行良好,但在3g连接上崩溃(当然在真实设备上,在模拟器上一切正常)。我不能调试它,因为它的事实,wken手机连接到PC。如何处理这个问题? 提前感谢首先:捕捉异常并阅读它们 第二:我预计您将无法连接到套接字,因为防火墙保护内部网计算机不被外部访问。第一:捕获异常并读取它们 第二:由于防火墙保护内部网计算机不被外部访问,我预计您将无法连接到套接字。订阅(对于UI线程异常)和(对于所有未处理的异常),并在进程终止之

我开发了一个应用程序WCH,它使用套接字连接多个服务器。该应用程序在WI-Fi连接上运行良好,但在3g连接上崩溃(当然在真实设备上,在模拟器上一切正常)。我不能调试它,因为它的事实,wken手机连接到PC。如何处理这个问题?
提前感谢

首先:捕捉异常并阅读它们


第二:我预计您将无法连接到套接字,因为防火墙保护内部网计算机不被外部访问。

第一:捕获异常并读取它们

第二:由于防火墙保护内部网计算机不被外部访问,我预计您将无法连接到套接字。

订阅(对于UI线程异常)和(对于所有未处理的异常),并在进程终止之前尝试写入文件

应用程序崩溃后,使用命令行将数据复制回计算机

Application.Current.UnhandledException += (s,e) => 
    WriteExceptionFast(e.ExceptionObject, "ApplicationUnhandled");

AppDomain.Current.UnhandledException += (s,e) => 
    WriteExceptionFast(e.ExceptionObject, "AppDomainUnhandled");

private void WriteExceptionFast(Exception ex, String name)
{
    string filename = Path.ChangeExtension(name, ".log");

    using (var store = IsolatedStorageFile.GetUserStoreForApplication())
    using (var stream = store.CreateFile(filename))
    using (var writer = new StreamWriter(stream))
    {
        writer.WriteLine(ex.ToString());
        writer.Flush();
    }
}
订阅(对于UI线程异常)和(对于所有未处理的异常),并在进程终止之前尝试写入文件

应用程序崩溃后,使用命令行将数据复制回计算机

Application.Current.UnhandledException += (s,e) => 
    WriteExceptionFast(e.ExceptionObject, "ApplicationUnhandled");

AppDomain.Current.UnhandledException += (s,e) => 
    WriteExceptionFast(e.ExceptionObject, "AppDomainUnhandled");

private void WriteExceptionFast(Exception ex, String name)
{
    string filename = Path.ChangeExtension(name, ".log");

    using (var store = IsolatedStorageFile.GetUserStoreForApplication())
    using (var stream = store.CreateFile(filename))
    using (var writer = new StreamWriter(stream))
    {
        writer.WriteLine(ex.ToString());
        writer.Flush();
    }
}