473,598 Members | 2,916 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

asp.net audio recording error

2 New Member
I'm an ASP.NET newbie. I'm trying to write an audio-recording code in an ASP.Net page. I created a windows User Control that has the buttons and codes for this (it calls the winmm.dll in system32 and passes commands to it for the recording)

It works in a windows form. However, I keep getting the following error message when I click the Record button in an ASP.net page:

See the end of this message for details on invoking
just-in-time (JIT) debugging instead of this dialog box.

************** Exception Text **************
System.Security .SecurityExcept ion: System.Security .Permissions.Se curityPermissio n
at MyAudioControls .Record.btnReco rd_Click(Object sender, EventArgs e)
at System.Windows. Forms.Control.O nClick(EventArg s e)
at System.Windows. Forms.Button.On Click(EventArgs e)
at System.Windows. Forms.Button.On MouseUp(MouseEv entArgs mevent)
at System.Windows. Forms.Control.W mMouseUp(Messag e& m, MouseButtons button, Int32 clicks)
at System.Windows. Forms.Control.W ndProc(Message& m)
at System.Windows. Forms.ButtonBas e.WndProc(Messa ge& m)
at System.Windows. Forms.Button.Wn dProc(Message& m)
at System.Windows. Forms.Control.C ontrolNativeWin dow.OnMessage(M essage& m)
at System.Windows. Forms.Control.C ontrolNativeWin dow.WndProc(Mes sage& m)
at System.Windows. Forms.NativeWin dow.Callback(In tPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
The type of the first permission that failed was:
System.Security .Permissions.Se curityPermissio n
The Zone of the assembly that failed was:
MyComputer



...Please help...
Dec 4 '07 #1
2 1836
Shashi Sadasivan
1,435 Recognized Expert Top Contributor
are you trying to create a voice recording application in asp .net?

this would (may) not work, as you would be accesing the dll of the server, and creating the form in the server rather than the client.
and there will be issues when someone over the network/internet access the site as their authentication will be using the dll located in the server.
its like internet users are accessing the dll in the server.

You cannot convert a windows form based application (unless somene can correct me there), especially when the form interacts with the client

try to use a messageBox in your asp .net application and see for yourself what happens when you access the website from an external site (the messagebox will apper on the server rather than the client)
Dec 4 '07 #2
tiffxi
2 New Member
I see... so is recording audio from an asp page not possible? or is there some other way that I do this?

thank you for you reply :)
Dec 4 '07 #3

Sign in to post your reply or Sign up for a free account.

Similar topics

6
5541
by: Sugapablo | last post by:
I had an idea for something that I can't find any evidence if it exists, or if it can be done. I assume it can be done. What I'd like to be able to do, is to allow people who come to my website, click a button on the page to begin submitting an audio stream to the server. Basically, once the "record" button was hit by the client, an audio stream would be generated by the client's microphone and would be sent over port 80 (just like...
1
3021
by: Noah | last post by:
I need to record raw 8-bit mono audio from a generic sound card on MS-Windows. I need to do something like this: sound_device = open audio device buffer = sound_device.read ('1 second, 8 bit, mono, 8 KHz') process buffer If possible I would also like to experiment with sampling the raw audio in my own loop. For example, something like this: open audio device while 1:
0
1508
by: Michael Lee | last post by:
I have written a simple application that uses the MCI functions to record audio to a file. It works fine with PCM audio (tried both 44.1kHz/16bit/stereo and 8kHz/8bit/mono). However, when I try to use mu-law, I get a MCIERR_OUTOFRANGE error when sending the MCI_SET command. Here is what I did: ----- start code snippet ----- MCI_WAVE_SET_PARMS wavset; ZeroMemory(&wavset, sizeof(MCI_WAVE_SET_PARMS));
5
1570
by: ACaunter | last post by:
Hi all, I am in desperate need of being able to have the users of my asp.net site to be able to make a recording from their computer mic, and save that audio on my server.. the user should be able to play back the recording with fast forward, rewind, and pause features... If you can provide any free code that could do this for me, i will always have a kind spot in my heart for you thank you so much
1
1526
by: ACaunter | last post by:
Hi all, Have been getting no luck lately, but there must be a way i can recording audio from the website and save it.. It's no problem on applications (VB.Net), and I know other have done it before on the Websites - ASP.Net (I think by writing it in C++ or vb6 or something - and then embeded the object or something... ). Can anyone explain to me how i can do this, or provide some code if possible?? thanks all
1
2386
by: zhangzhi | last post by:
HI£º i have a big problem about audio recording. my boss wanna a application of audio monitor, and he wanna it will detect voice and start recording automatically, avoiding recording silences. thanks for giving me a little clue, and Great U for sending me a copy of code of C#. or I will be Fired in a week.
2
3679
by: Navpreet Singh | last post by:
Hello Sir The code given below is the vxml code in which i can record my voice but when i want to try to save the recorded file using php script the error occours. The php code is also given below. Please sort out thi problem. Thank you. record.xml <?xml version='1.0'?>
1
3589
by: fevos | last post by:
hi i look at this article in msdn Recording and Playing Sound with the Waveform Audio Interface and download the P/Invoke Library Sample that record using wave in and wave out . how do i get the data from buffer (Waveform Audio Interface) (wave in) while recording and play it using c# or vb (wave out) , thanks
1
2431
by: waqasahmed996 | last post by:
Hi to all, i want to ask that is audio recording is possible in flash. actually i want to make recording from browser. is that possible in flash. if yes please give me some help or send me some useful links. let me know if i am not clear in my question thanks in advance
0
7981
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
7894
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
8392
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
6711
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
5847
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5437
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
1
2410
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
1
1500
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
1245
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.