C# WP7(Windows Phone 7)和Fiddler的HTTP流问题

C# WP7(Windows Phone 7)和Fiddler的HTTP流问题,c#,silverlight,windows-phone-7,fiddler,C#,Silverlight,Windows Phone 7,Fiddler,我在为WP7开发一个程序时遇到了一个非常特殊的问题。首先是背景,我正在开发一个异步使用HttpWebRequest/Response的流式报价应用程序。我还在Fiddler中监控整个过程,以确保一切正常 报价是通过与服务器的始终打开的Http连接输入的。登录工作正常,并提交报价订阅请求。问题是,除非我做以下两件事之一,否则我永远不会得到回复(它永远不会得到EndGetResponse): 1-通过Fiddler重新发出开放订阅请求 2-通过Fiddler的RequestBuilder提交相同的请

我在为WP7开发一个程序时遇到了一个非常特殊的问题。首先是背景,我正在开发一个异步使用HttpWebRequest/Response的流式报价应用程序。我还在Fiddler中监控整个过程,以确保一切正常

报价是通过与服务器的始终打开的Http连接输入的。登录工作正常,并提交报价订阅请求。问题是,除非我做以下两件事之一,否则我永远不会得到回复(它永远不会得到EndGetResponse):

1-通过Fiddler重新发出开放订阅请求 2-通过Fiddler的RequestBuilder提交相同的请求

我试着在我的笔记本电脑上的模拟器上运行这个应用程序,但是这个应用程序不起作用,我得到了一个协议异常,但这是另一个线程的问题

有什么想法吗?我认为这与通过Fiddler传输数据有关。我尝试卸载Fiddler,禁用捕获,撤消WinInet中的代理设置,但没有任何效果。这让我快发疯了,非常感谢你的帮助

更新:我可以用Twitter的流媒体API重新创建这个。下面是新代码。只需使用您自己的更改凭据占位符:

MainPage.xaml:

<phoneNavigation:PhoneApplicationPage 
    x:Class="TestHttpStreaming.MainPage"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:phoneNavigation="clr-namespace:Microsoft.Phone.Controls;assembly=Microsoft.Phone.Controls.Navigation"
    xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
    mc:Ignorable="d" d:DesignWidth="480" d:DesignHeight="800"
    FontFamily="{StaticResource PhoneFontFamilyNormal}"
    FontSize="{StaticResource PhoneFontSizeNormal}"
    Foreground="{StaticResource PhoneForegroundBrush}">

    <Grid x:Name="LayoutRoot" Background="{StaticResource PhoneBackgroundBrush}">
        <Grid.RowDefinitions>
            <RowDefinition Height="Auto"/>
            <RowDefinition Height="*"/>
        </Grid.RowDefinitions>

        <!--TitleGrid is the name of the application and page title-->
        <Grid x:Name="TitleGrid" Grid.Row="0">
            <TextBlock Text="MY APPLICATION" x:Name="textBlockPageTitle" Style="{StaticResource PhoneTextPageTitle1Style}"/>
            <TextBlock Text="page title" x:Name="textBlockListTitle" Style="{StaticResource PhoneTextPageTitle2Style}"/>
        </Grid>

        <!--ContentGrid is empty. Place new content here-->
        <Grid x:Name="ContentGrid" Grid.Row="1">
            <Button Content="Test" Height="70" HorizontalAlignment="Left" Margin="163,149,0,0" Name="button1" VerticalAlignment="Top" Width="160" Click="button1_Click" />
        </Grid>
    </Grid>

</phoneNavigation:PhoneApplicationPage>
请查看:

  • 是否已在工具栏菜单栏上启用流模式

    二,。 您是否已关闭“启用自动响应”


  • 希望有帮助。

    这似乎是框架/工具/模拟器中的一个错误:

    不确定是否还有人面临这个问题。我有这个问题,一旦我设置:

    request.AllowReadStreamBuffering = false;
    

    这是最新的框架。

    我已经完成了#1,但我在哪里可以找到“启用自动响应”选项?我刚刚找到它,它默认为禁用,我从未更改过。你还在为这个问题挣扎吗?我是。我尝试卸载fiddler,在关闭fiddler的情况下运行模拟器,以及我能想到的所有其他方法,但都没有效果。你安装了坦佩雷吗?我认为这些东西可能会阻止回复。在上面的msdn answers线程的最新测试版中,该错误已被确认为已解决。
    request.AllowReadStreamBuffering = false;