Silverlight. Cannot open web stream for files larger than 4GbRSS

5 replies

Last post Mar 20, 2018 03:58 AM by Yuk Ding

  • Silverlight. Cannot open web stream for files larger than 4Gb

    Mar 13, 2018 03:35 PM|maxima120|LINK

    I have IIS 10 which hosts 2 x mp4 videos. 3 and 4 gb.

    If I run the following code in console .NET app it works fine.

    If I run the same in Silverlight 5 the OpenReadCompleted is never fired for 4Gb video but works for 3Gb.

    The IE11 is 64 on Windows 10 x64 and the Silverlight is x64.

    public void Start()
    {
      //var addr = @"http://localhost/small.mp4";
      var addr = @"http://localhost/large.mp4";
    WebClient webClient = new WebClient(); webClient.OpenReadCompleted += (s, x) => { try { Debug.WriteLine("Got result: " + (x.Result == null ? "null" : x.Result.CanRead.ToString())); } catch (Exception ex) { Debug.WriteLine($"Got exception {ex}"); } };
    Debug.WriteLine($"Requesting stream {addr}"); webClient.OpenReadAsync(new Uri(addr)); }

    The actual task at hand is to make the larger videos (and I have up to 50Gb ones) work with media element. But it never goes past "opening" state.

    While stripping everything off I found that if I use file stream for large video media element works, but if I try web stream it doesn't, which led me to do the simplest possible test - open web stream alone. And it doesn't work.

    This code works in Silverlight for both - small and large videos:

    FileStream fs = new FileStream(@"c:\media\large.mp4", FileMode.Open);
    ssme.SetSource(fs);

    Hence the problem is in the delivery over HTTP.

    Fiddler shows no result (-) and -1 as body size. The response details shows "No Body Content" and raw response shows HTTP/1.1 200 OK with correct content-length. 

    Any idea on how to investigate further from this point?

  • Re: Silverlight. Cannot open web stream for files larger than 4Gb

    Mar 14, 2018 09:31 AM|Yuk Ding|LINK

    Hi maxima120,

    If it just return 200, then it means the IIS request filter and .net framework runtime didn't block the request. What value did you set for the request filter->edit feature setting->maximum allowed content length?

    I think maybe the silver light have restriction for the content length, so maybe you could consult the msdn.

    https://social.msdn.microsoft.com/Forums/silverlight/en-us/home?category=silverlight

    Or you could enable the failed request tracing to ensure whether it is an IIS configuration issue.

    Best Regards,

    Yuk Ding

    Yuk Ding

    MSDN Community Support
    Please remember to "Mark as Answer" the responses that resolved your issue.
  • Re: Silverlight. Cannot open web stream for files larger than 4Gb

    Mar 14, 2018 11:14 AM|maxima120|LINK

    Thank you.

    the request filter doesn't have the file extension in question (.mp4) in the list of the filters. So I assume there is no length limits.

    the failed request tracing will take some time to setup ill try it later.

    ill write to the Silverlight forum and report back if I find anything.

  • Re: Silverlight. Cannot open web stream for files larger than 4Gb

    Mar 15, 2018 09:43 AM|Yuk Ding|LINK

    Hi maxima120,

    Did you see something wrong in IIS FRT log?

    Best Regards,

    Yuk Ding

    Yuk Ding

    MSDN Community Support
    Please remember to "Mark as Answer" the responses that resolved your issue.
  • Re: Silverlight. Cannot open web stream for files larger than 4Gb

    Mar 15, 2018 11:27 AM|maxima120|LINK

    I just configured it for codes 100-999. It created FailedReqLogFiles folder

    I got some files after I ran my app..

    If I run for a good file (ie <4gb) I got log file for 2 requests (clientaccesspolicy.xml and the mp4 in question).

    If I run it for the bad file I got only clientaccesspolicy.xml log...

    does this mean IIS not returning the response at all ? Why? And how to proceed from this point?

  • Re: Silverlight. Cannot open web stream for files larger than 4Gb

    Mar 20, 2018 03:58 AM|Yuk Ding|LINK

    Hi maxima120

    I mean you need to analyze the status code and the FRT log to make sure which module is causing this indeed. If the FRT log didn't log any error, then it should not be an IIS configuration issue.

    Best Regards,

    Yuk Ding

    Yuk Ding

    MSDN Community Support
    Please remember to "Mark as Answer" the responses that resolved your issue.