none
WCF, Streamed, uploading from client files greater than 48K results in (400) Bad Request.

    Question

  • Downloading large files is not a problem.  Uploading small files less than 48k works ok.

    Larger than 48K results in "The remote server returned an unexpected response: (400) Bad Request.

    This looks like a default limit set but can not seem to figure out where.  Any and all help is appreciated.

     

    The call:

     

    FileStream aStream = File.OpenRead(localFile);

    // stream is ok here....

    rs = StreamClient.UploadStreamToTmpFile(aStream);

     

     

    Server App.config has:

     

    <basicHttpBinding>

    <binding name="HttpStreaming" maxReceivedMessageSize="67108864"

    maxBufferPoolSize="67108864"

    maxBufferSize="67108864"

    sendTimeout="00:15:00"

    transferMode="Streamed"/>

    </basicHttpBinding>

     

     

    Client App.config has:

     

    <binding name="BasicHttpBinding_IStreamingAccess" maxReceivedMessageSize="67108864"

    sendTimeout="00:15:00"

    maxBufferSize="67108864"

    maxBufferPoolSize="67108864"

    transferMode="Streamed">

    </binding>

     

     

    Stack trace:

     

    Server stack trace: \r\n
       at System.ServiceModel.Channels.HttpChannelUtilities.ValidateRequestReplyResponse(HttpWebRequest request, HttpWebResponse response, HttpChannelFactory factory, WebException responseException)\r\n
      at System.ServiceModel.Channels.HttpChannelFactory.HttpRequestChannel.HttpChannelRequest.WaitForReply(TimeSpan timeout)\r\n 
     at System.ServiceModel.Channels.RequestChannel.Request(Message message, TimeSpan timeout)\r\n 
     at System.ServiceModel.Dispatcher.RequestChannelBinder.Request(Message message, TimeSpan timeout)\r\n 
     at System.ServiceModel.Channels.ServiceChannel.Call(String action, Boolean oneway, ProxyOperationRuntime operation, Object[] ins, Object[] outs, TimeSpan timeout)\r\n 
     at System.ServiceModel.Channels.ServiceChannel.Call(String action, Boolean oneway, ProxyOperationRuntime operation, Object[] ins, Object[] outs)\r\n 
     at System.ServiceModel.Channels.ServiceChannelProxy.InvokeService(IMethodCallMessage methodCall, ProxyOperationRuntime operation)\r\n   
     at System.ServiceModel.Channels.ServiceChannelProxy.Invoke(IMessage message)\r\n\r\n
    Exception rethrown at [0]: \r\n  
     at System.Runtime.Remoting.Proxies.RealProxy.HandleReturnMessage(IMessage reqMsg, IMessage retMsg)\r\n 
     at System.Runtime.Remoting.Proxies.RealProxy.PrivateInvoke(MessageData& msgData, Int32 type)\r\n 
     at ETI.RemoteFileAccess.IStreamingAccess.UploadStreamToTmpFile(Stream stream)\r\n 
     at ETI.RemoteFileAccess.StreamingClientAPI.UploadStreamToTmpFile(Stream stream) in D:\\feViews\\sanchez_view_misc\\solution\\ETIRemoteFileAccess\\EtiRemoteFileClient\\generatedClient.cs:line 164\r\n

    Thursday, May 01, 2008 7:02 PM

Answers

All replies