silverlight - Response object not usable in WCF? -
i'm creating silverlight-based email system, use wcf read emails, pass data sl app, i've used following codes in test web project save byte array file on client system (email attachments), works fine, when want use them in wcf (myservice.svc.cs), error: "the name 'response' not exist in current context", going wrong here? possible use response object in service?
response.appendheader("content-disposition", string.format("attachment; filename={0}", messages[i].attachments[j].filename)); response.binarywrite(messages[i].attachments[j].filedata);
how can save attachments?
no, typically not use httpresponse object in wcf (though not 100% sure if could use in rest services or not). if want send file client, you'll need implement service operation returns byte array or file stream. post might that.
Comments
Post a Comment