Previous Next

Thread: IIS7 did not play sounds

Last post 08-22-2008 10:17 AM by jeff@zina.com. 4 replies.

Average Rating Rate It (5)

RSS

Page 1 of 1 (5 items)

Sort Posts:

  • 08-21-2008, 6:38 AM

    • wuyow
    • Not Ranked
    • Joined on 08-21-2008, 8:50 AM
    • Posts 2

    IIS7 did not play sounds

    Hi,

    I am developing a web based attendance taking system in VS2005, VB, .NET v2.0, IIS7, IE7 and Vista Ent. The system suppose to beep at each check-in.

    When I debug the program from VS2005, the beep sound works. However, when I run the program from IIS7 (localhost), there is no sound and no exception.

    I've tried the following methods that made sound from VS2005 but not through IIS7:

    1. beep() - system.Console
    2. beep() - system.VisualBasic.Interaction
    3. beep(frequency, duration) - Private Declare Function Beep Lib "kernel32" Alias "Beep" _
       (ByVal dwFreq As Long, ByVal dwDuration As Long) As Long
    4. PlaySound(Path, Int, Int) - Private Declare Auto Function PlaySound Lib "winmm.dll" (ByVal lpszSoundName As String, ByVal hModule As Integer, ByVal dwFlags As Integer) As Integer

    Anyone could help to figure out the problem and the solution? Is there any configuration need to be set for IIS7?

    Thanks!

  • 08-21-2008, 11:07 AM In reply to

    Re: IIS7 did not play sounds

    How do you expect IIS to access the local system?  And why would you want a beep on the server?

    Jeff

    Look for Wrox's new book Professional IIS 7 in your local bookstore, or order now at Amazon.com
  • 08-21-2008, 9:20 PM In reply to

    • wuyow
    • Not Ranked
    • Joined on 08-21-2008, 8:50 AM
    • Posts 2

    Re: IIS7 did not play sounds

    Hi Jeff,

    Sorry, I didn't make myself clear.

    I am developing the attendance taking system on my laptop. It will then be deployed on production server (server 2003). My development environment is as in previous post. As the attendance taking system (referred as 'the application') will be web based, I put it in localhost (IIS7) on my laptop and run it to simulate the real tasks.

    When an user opens the page to take attendance, the page (client side) will beep on each entry to alert the user. The situation I face is, when I debug the application from SV2005, a virtual localhost will be created for it and the beep sound is there. When I run the application from http://localhost, there is no beep sound. All the other functionalities such as read from database, verify the attendees, write to database, etc. are running well. Just there's no beep sound where it supposed to have.

    Thanks!

  • 08-22-2008, 2:56 AM In reply to

    • mukhtard
    • Top 25 Contributor
    • Joined on 07-07-2008, 5:13 PM
    • Redmond, WA
    • Posts 165

    Re: IIS7 did not play sounds

    I don't think you can get beep to work in a web application especially when you are trying to use the beep functions and API calls that you mentioned in your first post.

    You want to use a client side script that will run on the remote browser and play some media file. Here are a couple of links that explain how to incorporate sound in a web application:

    http://www.freevbcode.com/ShowCode.asp?ID=8184

    http://blogs.msdn.com/coding4fun/archive/2007/01/24/1525816.aspx

    Thanks,
    Mukhtar Desai
    IIS Performance Team

  • 08-22-2008, 10:17 AM In reply to

    Re: IIS7 did not play sounds

    In addition to the beep not playing on the client, only on the server, your issue is that IIS runs as the ASP.NET process account, whioch doesn't have permission to create the beep sound.  On the VWD test server, you're running as the logged in user, who does have permission.

    Jeff

    Look for Wrox's new book Professional IIS 7 in your local bookstore, or order now at Amazon.com
Page 1 of 1 (5 items)
Page view counter