Problem with the c# System.Media.SoundPlayer on a web host

Posted on 2007-08-03
Last Modified: 2013-12-17
i have an (c#) web app that uses the Syste.Media.SoundPlayer class. i have no problems playing sounds on my local machine but when i deploy the exact same code on my dev server the sound does not play (also, i get the same result on production).

what makes this situation more confusing is that there is no error message. i have tried using .wav files and the system sounds with no success.

any ideas as to why this is happening? thanks
Question by:dbruzzone79
    LVL 25

    Expert Comment

    code-behind is executed on the server, not on the client.  It works locally because your machine is the server.  It is likely playing the sound on the server.
    LVL 18

    Accepted Solution

    For a web media player consider flash ( or if you want to be really cutting edge, use the new Microsoft Silverlight (

    Gary Davis

    Author Comment

    ahhhh, you are right dstanley9. i will research silverlight and see if there is a reasonable solution.
    LVL 18

    Expert Comment

    by:Gary Davis
    No objection here:)


    Featured Post

    Why You Should Analyze Threat Actor TTPs

    After years of analyzing threat actor behavior, it’s become clear that at any given time there are specific tactics, techniques, and procedures (TTPs) that are particularly prevalent. By analyzing and understanding these TTPs, you can dramatically enhance your security program.

    Join & Write a Comment

    Recently while returning home from work my wife (another .NET developer) was murmuring something. On further poking she said that she has been assigned a task where she has to serialize and deserialize objects and she is afraid of serialization. Wha…
    This article describes relatively difficult and non-obvious issues that are likely to arise when creating COM class in Visual Studio and deploying it by professional MSI-authoring tools. It is assumed that the reader is already familiar with the cla…
    Illustrator's Shape Builder tool will let you combine shapes visually and interactively. This video shows the Mac version, but the tool works the same way in Windows. To follow along with this video, you can draw your own shapes or download the file…
    This video gives you a great overview about bandwidth monitoring with SNMP and WMI with our network monitoring solution PRTG Network Monitor ( If you're looking for how to monitor bandwidth using netflow or packet s…

    754 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    24 Experts available now in Live!

    Get 1:1 Help Now