.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
Sign In
Win Surprise Gifts!!!

Top 5 Contributors of the Month
Gaurav Pal
Post New Web Links

System.Media - SoundPlayer PlayLooping() - Error When Another Timer Is Running

Posted By:      Posted Date: October 03, 2010    Points: 0   Category :Windows Application

Recently I had a problem using SoundPlayer PlayLooping method.

Below is my problem and the solution I have found.

Hope this will help anybody with similar issues.

The issue is that as this is essentially a timer, if anther timer is operating at the same time the other timer will somehow interfere and the sound player will loose its file and playback computer noise.  A way around this seems to be to construct a manual timer for looping back the sound.

timer_LoopRinging.Enabled = true;

private void timer_LoopRinging_Tick(object sender, EventArgs e)


      SoundPlayer player = new

View Complete Post

More Related Resource Links

System.Windows.Media.Composition.DUCE.Channel.SyncFlush() error when we open our application in IE 8


Experts, please advice.

I have a WPF application developed using Visual Studio 2008 + DotNET 3.5 + Windows XP - SP 3.We have wrapped Our WPF application in Active X and hosting in IE 6 and it is works fine ,recently we migrated to IE 8 .Actually we are launching our app inside a parent application which is Browser based application(developed in java).

When we launch our app in IE 8 and switching between different modules along with our app in parent application our application is crashing.Pls find below stack trace for the problem.


Exception from HRESULT: 0x88980406
Exception Stack Trace: 

  at System.Windows.Media.Composition.DUCE.Channel.SyncFlush()
   at System.Windows.Media.MediaContext.CompleteRender()
   at System.Windows.Interop.HwndTarget.OnResize()
   at System.Windows.Interop.HwndTarget.HandleMessage(Int32 msg, IntPtr wparam, IntPtr lparam)
   at System.Windows.Interop.HwndSource.HwndTargetFilterMessage(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam, Boolean& handled)

Very Basic Question - Error message running first page


Hi Everyone,

I am running Windows 7 and I have gone into Control Panel and activated all of the IIS Functions.

The web application I am running was downloaded from the net (and has worked on other machines previously).  Once I downloaded it, I moved it into C:/inetpub/wwwroot/code/main.asp

I am a bit of a novice at this!  But I am hoping someone can point me in the right direction!


I get the following error when I try and run the web application through IE:

"An error occurred on the server when processing the URL. Please contact the system administrator. If you are the system administrator please click here to find out more about this error."

(When i click the "click here" button it just goes to the IIS site).


Appreciate any help I can get!




Compiler Error Message : CS0006: Metadata file 'System.EnterpriseServices.dll' could not be found


I get this error when i Debug my web application....


I followed these steps.,

  • Ended the aspnet_wp.exe process in the Windows Task Manager
  • Then deleted the application`s folder in C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files\
  • Then started Visual Studio 2008 again

I also rebooted my system but no use....

Plz help !

Business Data Error: System.OverFlowException


I have a Business Data Catalog file I've uploaded to connect to our back end Firebird DBMS through ODBC.

The SharePoint server is MOSS 2007 x64. The web front end server(s) all have an x64 Firebird Engine and ODBC driver with verified connectivity to Firebird.

When I use one of the methods, I can see connections being made to our Firebird server and the query being passed. I know the query returns results (it's a stored procedure with no parameters), but I get the following error "An error occurred while retrieving data from MROTest1. Administrators, see the server log for more information" in IE. If I look in the server logs, I see (12\Hive\Logs)

Exception handed to HandleRuntimeException.HandleException System.OverflowException: Arithmetic operation resulted in an overflow.     at System.Data.Odbc.OdbcDataReader.GetData(Int32 i, SQL_C sqlctype, Int32 cb, Int32& cbActualOut)

causing 500 server error :(


So, I'm just learning ASP.NET with C#, but this code just makes the page display a "500 - server error page"

the webpage is here: hereswhereyourewrong.net/aspnettest.aspx

the code is as follows:

<%@ Page Language="C#" AutoEventWireup="true" %>
<!-- This program throws up an Error 500: Server Error -->
<!-- I'm not sure why, it compiles just fine. -->
<!-- The last time it was because I had asp:TextBox fields not in a form -->
<!-- but here I just don't know -->
    <head runat="server" >
        <title>ASP.NET With C# Test</title>
        <script runat="server">
            protected void Page_Load(object sender, EventArgs e)
                timeText.Text = DateTime.Now.ToString("MM-dd-yyyy HH:mm:ss");

            public void updateTime(object sender, EventArgs e)
                timeText.Text = DateTime.Now.ToString("MM-dd-yyyy HH:mm:ss");
        <div style="text-align: center;">
            <form runat="server" ID="timerForm">
                <asp:ScriptManager ID=

Incorrect syntax near 'GO' error while running a sql script ?


I am using Visual Studio 2008

I have one Database A

now i want to create Database B just like Database A

I generated a script of Database A

and created fresh Database B

Now, when i try to run the generated script against Database B, i get this error, why ? how to fix it ?

sql error

For your information:

I have checked in my script it is:


and i have also tried to save the sql script in notepad as: ANSI, UTF-8 and UNICODE

and then i copied from txt file to query but still doesn't work and getting the same error

and these are the option that i selected/used while creating my script:


Got error on System.Ling.Queryable


I got the following error :

Error	1	The type arguments for method 'System.Linq.Queryable.OrderBy<TSource,TKey>(System.Linq.IQueryable<TSource>, System.Linq.Expressions.Expression<System.Func<TSource,TKey>>)' cannot be inferred from the usage. Try specifying the type arguments explicitly.	D:\EMMA\Mailer2\Mailer\Controllers\ReportsController.cs	50	46	Mailer


For the code :

var data = from mms in _DataContext.tb_Mailer_mailings
                       where mms.clientId == clientId
                       select new
                           Code = mms.Name + " (" + mms.DateCreated.ToString("yyyy-MM-dd hh:mm:ss") + ")"
                           Pk = mms.Id.ToString()

            /* Error here on orderBy*/
            SelectList list = new SelectList(data.OrderBy("Code"), "Pk", "Code");

 I have the same code for another type of select with also Code and Pk and I have no errors on that one.



Error in Crystal report while running at webserver



I need ur help its urgent i got a problem while running crystal report at web server.On local host its work fine bt on web server it gives error in web config file(assembly error).Please reslove it.

I m sending u the snapshot of error.

Code of server side script:-

 protected void Page_Load(object sender, EventArgs e)
        if (!IsPostBack)
            SqlConnection con = new SqlConnection(Session["MyDb"].ToString());

System.Net.WebException: The underlying connection was closed: An unexpected error occurred on a rec

Hello Guys,         I am getting following exception while web service (ASMX) is returning the response. <!-- [if gte mso 10]> <mce:style> System.Net.WebException: The underlying connection was closed: An unexpected error occurred on a receive.     <!-- [if gte mso 10]> <mce:style>                                                     InnterException (System.IO.Exception): "Unable to read data from the transport connection: An existing connection was forcibly closed by the remote host."       I think either the Asp.net web server is closing the connection or the response is too long.   Following is my simple code.    1)   namespace JFA.IndiePay.BusinessAccess { public class VerTexProcessor { public DataSet ProcessVerTexForBatch(DataSet dsInputRequest) { DataSet dsResponse = new DataSet(); //Call vertex web service here. VertexService.Service texCalculator = new VertexService.Service(); texCalculator.Timeout = 500000;

System.Messaging - Error accessing properties of remote private queues - "UnsupportedFormatNameExcep

I'm having some difficulty accessing private queues on a remote machine, but no trouble using remote public queues or private queues on a local machine. Calling: System.Messaging.MessageQueue.GetPrivateQueuesByMachine("machine"); ..succesfully returns the array of private queues on the remote machine.  However, trying to access nearly all of the properties on these MessageQueue objects returns: MessageQueueErrorCode: UnsupportedFormatNameOperation Message:"The specified format name does not support the requested operation. For example, a direct queue format name cannot be deleted." I have no trouble accessing queues created identically on the local machine using GetPrivateQueuesByMachine("."), plus accessing public queues using GetPublicQueuesByMachine("machine") also returns MessageQueue objects that are useable. The FormatName returned appears to be valid, as you would expect from queues retreived via GetPrivateQueuesByMachine().  e.g: FormatName:Direct=OS:machine\\private$\\example ..so I think the error message returned may be somewhat spurious. The permissions on the queues all appear to be set correctly.  I had even attempted allowing "Full Control" to "Everyone" on these queues as an experiment, with the same results. Any ideas for other things I might try? p.s. I am running Windows XP SP2, using .NET 2.

Error: 18456, Severity: 14, State: 16 Login failed for user 'NT AUTHORITY\SYSTEM'

Hi,   can someone help me with this error. Error: 18456, Severity: 14, State: 16 Login failed for user 'NT AUTHORITY\SYSTEM' [CLIENT:<local machine>] I've found several Threads but not with the NT AUTHORITY\SYSTEM.   Thanks for help.   Jens

Unable to open physical file - Operating system error 5: 5(error not found) Microsoft SQL Server: Er

I am trying to attach a database to SQL 2005. This database has not previously been attached. I have only just installed SQL.   I get the following message: Unable to open physical file "C:\ArrowSQL\Arr@Data\Arrow_data.mdf" Operating system error 5: "5(error not found)" (Microsoft SQL Server: Error 5120)".   I have loaded SQL and the database fiel and directory with the same user acccount which is a local adminstrator ont hsi machine. I have checked that I have read/write access to the file.   The machine runs Windows Vista Business. SQL has SP 2 loaded.   What causes this?

STOP: c000021a (Fatal System Error)" Error!

Dear All, I am having the same more or less problem with the rest of the people here. When booting to windows xp I get a blue screen and a message like this STOP: c000021a (Fatal System error) The windows subsystem system process terminated unexpectedly with a status 0xc0000005 (0x7c9106c3 0x0053ec24) The system has been shut down. I tried using the safe mode and removing the last program Microsoft SQL Express 2005 server that I've installed and after which I was getting this message but without any success. The system immediately crashes and i get the same blue screen. People do you have any ideas of what i could do to fix this??? It's kind of urgent so I would appreciate any quick responses. thank you all again eveve

I am getting System.Web.Services.Protocols.SoapHeaderException: Server unavailable error?..

 Hi,    I am using WSE 3.0 for my applicaton. when run from the client end I am getting following error.System.Web.Services.Protocols.SoapHeaderException: Server unavailable, please try later ---> System.ApplicationException: WSE841: An error occured processing an outgoing fault response. ---> System.Web.Services.Protocols.SoapHeaderException: Microsoft.Web.Services3.Security.SecurityFault: Header http://schemas.xmlsoap.org/ws/2004/08/addressing:Action for ultimate recipient is required but not present in the message.  at Microsoft.Web.Services3.Design.RequireSoapHeaderAssertion.RequireSoapHeaderFilter.ProcessMessage(SoapEnvelope envelope)  at Microsoft.Web.Services3.Pipeline.ProcessInputMessage(SoapEnvelope envelope)  at Microsoft.Web.Services3.WseProtocol.FilterRequest(SoapEnvelope requestEnvelope)  at Microsoft.Web.Services3.WseProtocol.RouteRequest(SoapServerMessage message)  at System.Web.Services.Protocols.SoapServerProtocol.Initialize()  at System.Web.Services.Protocols.ServerProtocolFactory.Create(Type type, HttpContext context, HttpRequest request, HttpResponse response, Boolean& abortProcessing)  --- End of inner exception stack trace ---  --- End of inner exception stack trace ---         Help needed on this. re

System error 67 has occurred.

Hello, I found lots of articles about problem connecting to SharePoint using UNC and I am still unable to solve my problem. I want to connect through the command prompt (map a drive) to a SharePoint library. I am successful if I am connecting to the portal site, but not a site collection with a different management path. I have Sharepoint admin rights and security should not be the issue. This doesn’t work: net use * http://<url>.com/<dep>/sites/<sitename>/Documents System error 67 has occurred. The network name cannot be found.   this works: net use * http://<url>.com/Documents The command completed successfully.   I have another farm that is setup the same (as much as I know) and net use * http://<url>.com/<dep>/sites/<sitename>/Documents works. Any suggestion? Thanks

Assembly load error system.runtime.serialization

Hello ! I have a web project which i began there is some month, and compile perfectly until now. In fact, i have some compile error;   erreur 1 Could not load file or assembly 'System.Runtime.Serialization, Version=, Culture=neutral, PublicKeyToken=b77a5c561934e089' or one of its dependencies. The module was expected to contain an assembly manifest.   on explorer :   The module was expected to contain an assembly manifest. (Exception from HRESULT: 0x80131018) Description : Une exception non gérée s'est produite au moment de l'exécution de la demande Web actuelle. Contrôlez la trace de la pile pour plus d'informations sur l'erreur et son origine dans le code. Détails de l'exception: System.BadImageFormatException: The module was expected to contain an assembly manifest. (Exception from HRESULT: 0x80131018) Erreur source: Une exception non gérée s'est produite lors de l'exécution de la demande Web actuelle. Les informations relatives à l'origine et l'emplacement de l'exception peuvent être identifiées en utilisant la trace de la pile d'exception ci-dessous. Trace de la pile: [BadImageFormatException: The module was expected to contain an assembly manifest. (Exception from HRESULT: 0x80131018)] System.Reflection.Assembly._nLoad(AssemblyName fileName, String codeBa

Error while running Ajax Enable website....?

Hi, I just installed and ran a simple sample and got this error below. I'm running using VS 2005. I have installed ASP.NET AJAX Extensions 1.0 and ASP.NET AJAX Control Toolkit. Look like the tool kit version is 3.5 that is not compatible with ASP.NET AJAX EXTENSION 1.0? But I couldn't locate the ASP.NET AJAX CONTROL TOOLKIT version 2.0. Any idea how to corect this error? Thanks Compilation Error Description: An error occurred during the compilation of a resource required to service this request. Please review the following specific error details and modify your source code appropriately. Compiler Error Message: CS1705: Assembly 'AjaxControlToolkit, Version=3.5.40412.0, Culture=neutral, PublicKeyToken=28f01b0e84b6d53e' uses 'System.Web.Extensions, Version=, Culture=neutral, PublicKeyToken=31bf3856ad364e35' which has a higher version than referenced assembly 'System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35'Source Error: [No relevant source lines]Source File:    Line: 0
ASP.NetWindows Application  .NET Framework  C#  VB.Net  ADO.Net  
Sql Server  SharePoint  Silverlight  Others  All   

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend