How To Dynamically Generate ASX Files Using ASP Pages (184396)



The information in this article applies to:

  • Microsoft Windows Media Services 4.0
  • Microsoft Windows Media Services 4.1

This article was previously published under Q184396

SUMMARY

In some situations, you may want to create an ASX file dynamically by using the Active Server Page (ASP) scripting language.

MORE INFORMATION

The following sample illustrates how this may be done:
<% Response.ContentType="video/x-ms-asf" %><ASX version="3.0"> 
   <Entry> 

   <Ref href="mms://servername/filename.asf" /> 

   </Entry>
   </ASX>
Notice that the Response.ContentType method is immediately followed by the opening tag of the ASX file. If these two entries are made on separate lines, Microsoft Internet Explorer inserts an extra blank line at the top of the resulting ASX file. The Windows Media Player does not recognize the ASX file if this extra line is present.

Note If you use HTML forms, you must use the GET method because the POST method does not pass form data to the Windows Media Player.

Modification Type:MinorLast Reviewed:9/7/2004
Keywords:kbhowto KB184396 kbAudDeveloper