System.Exception: Class not registered (Exception from HRESULT: 0x80040154) Error for Silverlight webcam.

Dec 27, 2013 at 7:04 AM
Hello Friends,

I have copied the silverlight videochat samplecode from "" to try a simple videochat application but getting the below mentioned error while capturing image.

"System.Exception: Class not registered (Exception from HRESULT: 0x80040154)
at MS.Internal.XcpImports.CheckHResult(UInt32 hr)
at MS.Internal.XcpImports.CaptureGraph_Start(CaptureSource Source)
at System.Windows.Media.CaptureSource.Start()
at SocketCoder_WebCamSender.MainPage.btnActivate_Click(Object sender, RoutedEventArgs e)"

I am using 64 bit Operating System, silverlight-4 , webcam is working properly in skype on same machine.

below is the code block, i am getting the above error on _capture.Start().
Collapse | Copy Code
private void button1_Click(object sender, RoutedEventArgs e)
// Start The Camera
if (_capture != null)
    _capture.VideoCaptureDevice = CaptureDeviceConfiguration.GetDefaultVideoCaptureDevice();
    VideoBrush videoBrush = new VideoBrush();
    rectVideo.Fill = videoBrush;
    if (CaptureDeviceConfiguration.AllowedDeviceAccess || CaptureDeviceConfiguration.RequestDeviceAccess())

I have tried running the application by changing Target Platform to x86 but no success.

Please suggest,