Shirley Sun

I have WCF web service that needs to do upload/download large amount of data, thus I think streaming should be my friend. I need to support transport authentication (windows integrated, etc). However I found only streamedResponse is supported. I can't streamed request which kill the uploading scenario. Got error: "HTTP request streaming cannot be used in conjunction with HTTP authentication"

Can anyone explain me why Is there any work around for this

By the way, my web service needs to be ASP.Net Compatible, so things like reliable session won't work.

Thanks!



Re: Windows Communication Foundation (Indigo) streaming request is disabled for transport authentication

James Osborne - MSFT

You can't do transport auth. with streaming. If you have to use HTTP request streaming, you'll have to run without security.

The way security works is:

WCF Client makes an http request to the Server.

The Server responds with something saying, "You aren't authorized, send me a basic/digest/etc credential."

The Client gets that response and resends it's message with the credentials tacked on.

Now the Server gets the message, verifies the credentials, and continues.

But Request Streaming isn't designed to work with that security pattern. If it did, it would be really slow, since the Client would send the entire stream, get the message from the Server that it wasn't authorized, then it would have to resend the entire stream with credentials.

You might find the Custom Chunking Channel sample that clemensv wrote helpful, though. http://wcf.netfx3.com/files/folders/protocol_channels/entry3545.aspx It shows a way of sending large messages when security is needed.

HTH,

James





Re: Windows Communication Foundation (Indigo) streaming request is disabled for transport authentication

Shirley Sun

Thanks for the explaination. That makes a lot of sense.

I've briefly looked at the chunking channel sample. It seems requires reliable session. As I said earlier, since I am in ASPNetCompatible mode, and the application can be recycled as well as farm case, the reliable session seems not working in those cases.

Do I have any other choices

Thanks!

Shirley