We have a site hosted in IIS6 that we created using the .NET 1.1 Framework. Users who access this site use Internet Explorer exclusively and log in using forms authentication. Inside the site, users can go to a specific page on which iFrame is embedded. This iFrame points to another virtual directory hosted on the same server, and this second virtual directory simply transfers the movie stream file. Assuming the user has Windows Media Player installed on their computer, and set it up so that Windows Media Player is the default player when the user navigates to the page using iFrame, Windows Media Player pop-up windows open a new window and the movie plays.
We updated our software very recently to use the .NET 3.5 environment. However, we noticed that our video file is no longer playing. Instead, we get a message saying that Windows Media Player cannot connect to the server.
I went ahead and did some research on network traffic between client and server machines using Fiddler, and these are the steps that take place in a scenario where everything works:
1) Internet Explorer makes a server request for a video file. The request header contains the cookies necessary to correctly identify and identify the session.
* GET MYSITE HTTP / 1.1
Accept: image / jpeg, image / gif, image / pjpeg, application / x-ms-application, application / xaml + xml, application / x-ms-xbap, application / vnd.ms-excel, application / vnd.ms- powerpoint, application / msword, application / x-shockwave-flash, /
Referent: MYREFERRER
Accept Language: ru-US
User-Agent: Mozilla / 4.0 (compatible; MSIE 8.0; Windows NT 6.1; WOW64; Trident / 4.0; SLCC2; .NET CLR 2.0.50727; .NET CLR 3.5.30729; .NET CLR 3.0.30729; InfoPath.2)
Accept-Encoding: gzip, deflate
Host: MYHOST Connection: Keep-Alive
Cookie: a99fd71e-eb1b-4750-a391-5ad8cfe32068 = 800edb77-9649-4f93-9db9-98d678a3b166; ASP.NET_SessionId = uf1cr1bflwly0nmhbm1wnb55; EDDS = 581A46E81C8DB0B475F1AFE00545F9B157A377BD31DF65BB2AEF7D1B293BDE9E178409FF251CF49F109FDC601C48F15A5FCDE1A29A18E6853357887698A01E7A2CC3690ECE98C464DE1359D796B60BE969F875EF08F638A04CDED78A309ACD6E9732F8C3751A2B0A411ADFA91B0AE567 *
2) The server uses cookies to authenticate the request from the user, and then returns the movie. The return status code is 200.
HTTP / 1.1 200 OK
Date: Wed, Aug 11 2010 21:30:55 GMT
Server: Microsoft-IIS / 6.0
X-Powered-By: ASP.NET
X-AspNet Version: 1.1.4322
Content Length: 3934146
Accept-Ranges: Byte
Content-Disposition: inline; filename = AS000006.wmv
Last modified: Tue, Aug 10 2010 21:24:49 GMT
ETag: "MyExampleFileID"
Cache Control: Private
Content-Type: application / octet-stream
3) Windows Media Player makes a server request for the movie file. Again, the request header contains cookies. However, this time the request includes a range request for bytes 8192 -.
* GET MYSITE HTTP / 1.1
To accept:/
User-Agent: Windows-Media-Player / 12.0.7600.16415
Accept-Encoding: gzip, deflate
Range: bytes = 8192-
No change, s: Tue, Aug 10 2010 21:24:49 GMT
If-Range: "MyExampleFileID"
Connection: Keep-Alive
Host: MYHOST
Cookie: ASP.NET_SessionId = uf1cr1bflwly0nmhbm1wnb55; EDDS = 581A46E81C8DB0B475F1AFE00545F9B157A377BD31DF65BB2AEF7D1B293BDE9E178409FF251CF49F109FDC601C48F15A5FCDE1A29A18E6853357887698A01E7A2CC3690ECE98C464DE1359D796B60BE969F875EF08F638A04CDED78A309ACD6E9732F8C3751A2B0A411ADFA91B0AE567; a99fd71e-eb1b-4750-a391-5ad8cfe32068 = 800edb77-9649-4f93-9db9-98d678a3b166 *
4) The server uses cookie information to authenticate the request from the user and then returns the document. The return status code is 206.
HTTP / 1.1 206 Partial Content
Date: Wed, Aug 11 2010 21:30:57 GMT
Server: Microsoft-IIS / 6.0
X-Powered-By: ASP.NET
X-AspNet Version: 1.1.4322
Content-Range: Bytes 8192-3934145 / 3934146
Content Length: 3925954
Accept-Ranges: Byte
Content-Disposition: inline; filename = AS000006.wmv
Last modified: Tue, Aug 10 2010 21:24:49 GMT
ETag: "MyExampleFileID"
Cache Control: Private
Content-Type: application / octet-stream
When everything does not work, it looks like this:
1) Internet Explorer makes a server request for a video file. The request header contains cookies.
* GET MYSITE HTTP / 1.1
Accept: image / jpeg, image / gif, image / pjpeg, application / x-ms-application, application / xaml + xml, application / x-ms-xbap, application / vnd.ms-excel, application / vnd.ms- powerpoint, application / msword, application / x-shockwave-flash, /
Referer: MYREFERRER Accept language: ru-US
User-Agent: Mozilla / 4.0 (compatible; MSIE 8.0; Windows NT 6.1; WOW64; Trident / 4.0; SLCC2; .NET CLR 2.0.50727; .NET CLR 3.5.30729; .NET CLR 3.0.30729; InfoPath.2)
Accept-Encoding: gzip, deflate
Host: MYHOST
Connection: Keep-Alive
Cookie: a99fd71e-eb1b-4750-a391-5ad8cfe32068 = 7ac4710e-1434-43c9-b521-bdf30328e2fb; ASP.NET_SessionId = glytwo55ztohig451qrf1355; EDDS = CFC5EAE69F6D6CDD0A1D53632F01629F8AC8F4901A6106DD26A0A9F4E1E0B0EC9D4B1B78FBEF5C504A54E6B1A43F576CD846ADD3D394DF257EBBF982BED5E99900116945191268E985ED923DAA78DF4FBD68B09FF3B4D14D7092FB846012E5F464D9EBC4BA834235839A397A4F00B548D353A1AB9B67F6F960E26FC655D19D4B89347DFA2BCC7101E2397AC7EB0F105025E5A21253C0E619E809C1D9B64E53E8 *
2) The server uses cookies to authenticate the request from the user, and then returns the movie. The return status code is 200.
HTTP / 1.1 200 OK
Cache Control: Private
Content Length: 3934146
Content-Type: application / octet-stream
Last modified: Wed, Aug 11 2010 15:29:44 GMT
Accept-Ranges: Byte
ETag: "MyExampleFileID"
Server: Microsoft-IIS / 7.5
X-AspNet-Version: 2.0.50727
Content-Disposition: inline; filename = AS000006.wmv
X-Powered-By: ASP.NET
Date: Wed, Aug 11 2010 21:36:45 GMT
3) Windows Media Player makes a server request for the movie file. The request does NOT contain cookies. The server cannot authenticate the user, and the movie is not sent down.
* GET MYSITE HTTP / 1.1
To accept:/
User-Agent: Windows-Media-Player / 12.0.7600.16415
Accept-Encoding: gzip, deflate
Range: bytes = 8192-
Not changed yet-from: Wed, 11 Aug 2010 15:29:44 GMT
If-Range: "MyExampleFileID"
Connection: Keep-Alive
Host: MYHOST *
So, at the moment, I know exactly why it does not work. The request from Windows Media Player does not contain cookies, so our server will not authenticate the request and send data. I donβt fully understand why these cookies are not used by Windows Media Player when requested.
All of the above requests were made from the same computer to two different sites, so I know that this is not a problem with different versions of Windows Media Player. I reproduced the behavior on several different machines with different operating systems and different versions of IE, so it does not seem to be associated with a specific machine. I tried to revert to IIS6 instead of using IIS7 for the new site, and that doesn't make any difference either. I was left to think that this should be something in my code, but I donβt even know where to start looking.
My question is: does anyone really understand how Internet Explorer passes the URL information to Windows Media Player and maybe point me in the right direction to figure this out? My only other option at this stage is to open a ticket with Microsoft support ... and, frankly, my experience with their support group has been less than optimal over the past few years. Any help would be greatly appreciated!
EDIT: Using Process Explorer, I was able to prove that IE simply does not provide cookie information for Windows Media Player. However, I still do not understand why.