Catastrophic failure (Exception from HRESULT: 0x8000FFFF (E_UNEXPECTED))
-
Hi, I am working on silver light application. In this I converted an image into byte format and saved it in the database. Then I retrieved them from the server and tried to convert it to bitmap and display it in a image control. But during convertion process from byte[] to Bitmap I am getting this exception. "Catastrophic failure (Exception from HRESULT: 0x8000FFFF (E_UNEXPECTED))" List<AdImages> ImgList = new List<AdImages>(); ImgList = e.Result; int i = 0; foreach (AdImages img in ImgList) { try { BitmapImage image = new BitmapImage(); using (MemoryStream stream = new MemoryStream(img.ImgData)) { image.SetSource(stream); // exception raised at this line ImgSQL.Source = image; } Image img2 = new Image(); img2.Source = image; LayoutRoot.Children.Add(img2); posImage(img2, i, ImgList.Count); _images.Add(img2); i++; } catch (Exception ee) { } } If anyone any idea to solve this please reply me. Thanks in advance.
-
Hi, I am working on silver light application. In this I converted an image into byte format and saved it in the database. Then I retrieved them from the server and tried to convert it to bitmap and display it in a image control. But during convertion process from byte[] to Bitmap I am getting this exception. "Catastrophic failure (Exception from HRESULT: 0x8000FFFF (E_UNEXPECTED))" List<AdImages> ImgList = new List<AdImages>(); ImgList = e.Result; int i = 0; foreach (AdImages img in ImgList) { try { BitmapImage image = new BitmapImage(); using (MemoryStream stream = new MemoryStream(img.ImgData)) { image.SetSource(stream); // exception raised at this line ImgSQL.Source = image; } Image img2 = new Image(); img2.Source = image; LayoutRoot.Children.Add(img2); posImage(img2, i, ImgList.Count); _images.Add(img2); i++; } catch (Exception ee) { } } If anyone any idea to solve this please reply me. Thanks in advance.
try with dispatcher.. Dispatcher.BeginInvoke(delegate() { List<AdImages> ImgList = new List<AdImages>(); ImgList = e.Result; int i = 0; foreach (AdImages img in ImgList) { try { BitmapImage image = new BitmapImage(); using (MemoryStream stream = new MemoryStream(img.ImgData)) { image.SetSource(stream); // exception raised at this line ImgSQL.Source = image; } Image img2 = new Image(); img2.Source = image; LayoutRoot.Children.Add(img2); posImage(img2, i, ImgList.Count); _images.Add(img2); i++; } catch (Exception ee) { } } });
-
try with dispatcher.. Dispatcher.BeginInvoke(delegate() { List<AdImages> ImgList = new List<AdImages>(); ImgList = e.Result; int i = 0; foreach (AdImages img in ImgList) { try { BitmapImage image = new BitmapImage(); using (MemoryStream stream = new MemoryStream(img.ImgData)) { image.SetSource(stream); // exception raised at this line ImgSQL.Source = image; } Image img2 = new Image(); img2.Source = image; LayoutRoot.Children.Add(img2); posImage(img2, i, ImgList.Count); _images.Add(img2); i++; } catch (Exception ee) { } } });
-
Hi, I am working on silver light application. In this I converted an image into byte format and saved it in the database. Then I retrieved them from the server and tried to convert it to bitmap and display it in a image control. But during convertion process from byte[] to Bitmap I am getting this exception. "Catastrophic failure (Exception from HRESULT: 0x8000FFFF (E_UNEXPECTED))" List<AdImages> ImgList = new List<AdImages>(); ImgList = e.Result; int i = 0; foreach (AdImages img in ImgList) { try { BitmapImage image = new BitmapImage(); using (MemoryStream stream = new MemoryStream(img.ImgData)) { image.SetSource(stream); // exception raised at this line ImgSQL.Source = image; } Image img2 = new Image(); img2.Source = image; LayoutRoot.Children.Add(img2); posImage(img2, i, ImgList.Count); _images.Add(img2); i++; } catch (Exception ee) { } } If anyone any idea to solve this please reply me. Thanks in advance.
i am facing the same problem in Silverlight 4 , did you resolve the Error ?
Vuyiswa Maseko, Spoted in Daniweb-- Sorry to rant. I hate websites. They are just wierd. They don't behave like normal code. C#/VB.NET/ASP.NET/SQL7/2000/2005/2008 http://www.vuyiswamaseko.com vuyiswa@its.co.za http://www.itsabacus.co.za/itsabacus/