<> wrote in message
news: ups.com...
> Experts,
>
> I have a simple .aspx page that takes a path to a .wav file, and
> plays it. This page works fine on all OSs (Windows 2000, Windows 2003,
> Windows XP), but not on Vista. Could the protected mode on vista be
> interfering with this page? Any other ideas on why the code does not
> work on Vista would be greatly appreciated. The (simple) code for this
> page is
>
> ==========.aspx page========================================
> <%@ Page Language="C#" AutoEventWireup="true"
> CodeBehind="WavFileTest.aspx.cs" Inherits="MiscTests.WavFileTest" %>
>
> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
> "http://
> www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
>
> <html xmlns="http://www.w3.org/1999/xhtml" >
> <head runat="server">
> <title>Untitled Page</title>
> </head>
> <body>
> <form id="form1" runat="server">
> <div>
> Enter File Location: <asp:TextBox ID="WavFileName"
> runat="server" />
> <asp:Button ID="Play" Text="Play" runat="server"
> OnClick="Play_Clicked" />
> </div>
> </form>
> </body>
> </html>
>
>
> ======================= .cs code behind
> code======================================
> using System;
> using System.Data;
> using System.Configuration;
> using System.Collections;
> using System.Web;
> using System.Web.Security;
> using System.Web.UI;
> using System.Web.UI.WebControls;
> using System.Web.UI.WebControls.WebParts;
> using System.Web.UI.HtmlControls;
> using System.Media;
>
> namespace MiscTests
> {
> public partial class WavFileTest : System.Web.UI.Page
> {
> protected TextBox WavFileName;
> protected Button Play;
> protected void Page_Load(object sender, EventArgs e)
> {
>
> }
> protected void Play_Clicked(object sender, System.EventArgs e)
> {
> try
> {
>
> SoundPlayer player = new SoundPlayer();
> player.SoundLocation = WavFileName.Text;
> player.Load();
> player.Play();
> }
> catch (Exception ex)
> {
> Response.Write(ex.Message);
> }
> }
> }
> }
> ================================================== ==========================
>
> Thank you in advance.
>
> Best,
>
> Raj.
>
You might want to try this on the MSDN Forums:
http://forums.microsoft.com/msdn/default.aspx?siteid=1
--
Michael Solomon
Backup is a PC user's best friend
DTS-L.Org:
http://www.dts-l.org/