views:

33

answers:

0

hi

I am recording an audio and storing to the application's folder. But it's not working on production server. I am using Microsoft.visualbasic.devices namespace. (www.codeproject.com/Messages/3398947/Re-How-to-Save-the-voice-record-file-in-the-client.aspx) through this code I am recording audios and listening locally but I am unable to record audios on online. It's showing empty file. Please suggest me.

My code is as follows:

protected void btnSaveStop_Click(object sender, EventArgs e)
{
shortPath = Server.MapPath("~/Audios/" + txtTag.Text + ".wav");
formatShortPath = string.Format("save recsound \"{0}\"", shortPath);
mciSendString(string.Format("{0}", formatShortPath), null, 0, 0);
mciSendString("save recsound ", "", 0, 0);
mciSendString("close recsound ", "", 0, 0);
Computer c = new Computer(); c.Audio.Stop();
}