@sixthplanets: thank you for help. I have gone through all this article and after that i have modified my web.config and app.config a bit.
i.e.: i have changed my
transferMode="Buffered" to transferMode="Streamed"
and this throws an error for bad request 400
here i am sharing my WCF function with you
public CAIS_FileAttachmentInfoBO downloadfile(long FileID)
var objAttachment_DAL = objEntity_DAL.FileAttachment1
.Where(us => us.FileID== FileID)
.Select(us => new
{
us.FileID,
us.FileMIME,
us.FileName,
us.FileStream
})
.FirstOrDefault();
CAIS_FileAttachmentInfoBO objFileAttachmentBO =
new CAIS_FileAttachmentInfoBO();
if (objAttachment_DAL != null && objAttachment_DAL.FileID > 0)
{
objFileAttachmentBO.FileName = objAttachment_DAL.FileName;
objFileAttachmentBO.FileStream = objAttachment_DAL.FileStream;
objFileAttachmentBO.Is_Password = false;
objFileAttachmentBO.Password = "";
objFileAttachmentBO.FileID = objAttachment_DAL.FileID;
}
return objFileAttachmentBO;
here "CAIS_FileAttachmentInfoBO" is my class which has the 5 data field as used in function.
I don't think that the problem with my function
thank you. :)