Sasirekha

Hello,

How to Transfer a Dll from one Machine to Another using WCF Services

THanks




Re: Windows Communication Foundation (Indigo) Need Advice!!!

WillRogers

There are may ways to accomplish file transfer using WCF. If the file is significantly large, one approach would be to send the file in smaller chunks. This can be accomplished using the Chunking Channel described in this article:
Of course, your best option may be something outside the realm of WCF such as FTP.




Re: Windows Communication Foundation (Indigo) Need Advice!!!

Scott Seely

A large item in WCF is best transferred using the built-in stream support. This only works for the Net* bindings. If you need to go over the Internet, then the chunked channel is a good choice. To then send the stream, just have an OperationContract that looks like this:

Code Snippet

[OperationContract]

void SendBigItem(Stream stream)

{

// do standard stream 'stuff'

}

A caller, passing a file, would do something like:

Code Snippet

FileStream myStream = new FileStream("c:\filename.extension");

SomeClient client = new SomeClient();

client.SendBigItem(myStream);






Re: Windows Communication Foundation (Indigo) Need Advice!!!

Martin Petersen-Frey - MSFT

One clarification: Some WS* channels support streaming. The basicHttpBinding and the wsHttpBinding with out ReliableMessaging support streaming. You just can't specify Relaible Messaging with it's acks and message numbering. Just set the TransferMode, add a method that accepts a stream object and hand the proxy your file stream.






Re: Windows Communication Foundation (Indigo) Need Advice!!!

Sasirekha

Actaually I pass my dll to client.but it shows Manifest Error.when I passed the Dll as Stream

Thanks






Re: Windows Communication Foundation (Indigo) Need Advice!!!

Sasirekha

Sasirekha wrote:

Actaually I pass my dll to client.but it shows Manifest Error.when I passed the Dll as Stream

Thanks






Re: Windows Communication Foundation (Indigo) Need Advice!!!

Martin Petersen-Frey - MSFT

Do you mean the dll is unusable when you attempt to use it on the receiving machine Or does the call fail with that error Assuming this is a failure when you attempt to use it, have you tried manually copying it to see if it works Have you done a binary comparision between the sent and recieved dlls If you like, you can post the code you're using. The config and the calls would be useful along with how you open the stream on the sending side and save it on the recieving side.






Re: Windows Communication Foundation (Indigo) Need Advice!!!

Sasirekha

Hi,

Actually I tried to copy dll content as Stream by using FileStream .it doen't Work.but Manually i copied bymeans it works well.if i use FTP it also works Good.

Thanks






Re: Windows Communication Foundation (Indigo) Need Advice!!!

Sasirekha

Sasirekha wrote:

Actaually I pass my dll to client.but it shows Manifest Error.when I passed the Dll as Stream

Thanks






Re: Windows Communication Foundation (Indigo) Need Advice!!!

Sasirekha

Hi,

Actually I tried to copy dll content as Stream by using FileStream .it doen't Work.but Manually i copied bymeans it works well.if i use FTP it also works Good.

Thanks






Re: Windows Communication Foundation (Indigo) Need Advice!!!

BenK

Could be the file open of the stream , is it locked You may need to set certain permissions . ftp and copy can be used on in-use files sometimes ....

Regards,

Ben





Re: Windows Communication Foundation (Indigo) Need Advice!!!

Sasirekha

No it is not Locked.it Read the Stream value.but it need the Manifest ID.because the Service run in Another Machine.

thanks