I want to ask you about sending files using WCF. I want to implement service, to send fax and emails. My case looks like that:
I want to ask you how to implement, the server-side part of WCF service? Use buffered upload or streamed upload? Could you give me a link to good example or article?
Any help will be great, Thanks
A WCF service endpoint can accept a byte array of variable sizes so it shouldn't be a problem for a client to send a pdf,word, etc document as a byte[] to the service. The default netTcpBinding settings will need to be adjusted to accomodate the large file sizes.
Your windows service will host your WCF endpoint (eg, SendDocument()).
The service's implementation of this method will use the standard System.Net.Mail.SmtpClient class to send the email. See the MSDN documentation for SmtpClient and especially the MailMessage class, which among other things has an Attachments property you can use.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.