This is my code:
[
ServiceKnownType(typeof(Bitmap))]
Interface IService
OperationContract
]
Bitmap GetPhoto(int iPhoto_ID);
------------------------------------------
[
KnownType(typeof(Bitmap))]
class Implelentation:IService{
public Bitmap GetPhoto(){
Bitmap bmp= businessLogic.GetPhoto(iPhoto_ID);
return bmp;
}
}
----------------------------
Are there any issues returning bitmaps from wcf service? If so what is the best way? Right now I'm still not able to access my web method from silverlight.
I've tried returning:
1. Bitmap from wcf service: in which case intellisense does not show any of the methods in the xaml.cs and all it says is "Bitmap" for reference.
2. Byte[] from wcf service: same as above
3. BitmapImage: It cannot add the service reference in silverlight
4. MemoryStream: In which case it says that stream is not serialized.