locked
Streaming bad request error RRS feed

  • Question

  • Hi,

    I'm getting a really strange behavior while trying to upload a xaml definition using streaming.
    The problem is that it works only if I use the fiddler-friendly uri (http:localhost.:3235/coreservice.xamlx) and only if fiddler is open!
    Using the normal address (http://localhost:3235/coreservice.xamlx) the service doesn't work, it doesn't matter if fiddler is open or not.

    This is the server configuration:

    <system.serviceModel>
        <bindings>
          <basicHttpBinding>
            <binding name="httpLargeMessageStream" maxBufferPoolSize="2147483647" maxBufferSize="2147483647" maxReceivedMessageSize="2147483647" transferMode="Streamed" messageEncoding="Mtom">
              <readerQuotas maxArrayLength="2147483647" maxBytesPerRead="2147483647" maxDepth="2147483647" maxNameTableCharCount="2147483647" maxStringContentLength="2147483647"/>
              <security mode="None"/>
            </binding>
          </basicHttpBinding>
    </bindings>
        <services>
          <service name="CoreService">
            <endpoint binding="basicHttpBinding" bindingConfiguration="httpLargeMessageStream" contract="ICoreService"/>
          </service>
        </services>
      </system.serviceModel>

    Client:

      <system.serviceModel>
        <bindings>
          <basicHttpBinding>
            <binding name="httpLargeMessageStream" maxBufferPoolSize="2147483647" maxBufferSize="2147483647" maxReceivedMessageSize="2147483647" transferMode="Streamed" messageEncoding="Mtom">
              <readerQuotas maxArrayLength="2147483647" maxBytesPerRead="2147483647" maxDepth="2147483647" maxNameTableCharCount="2147483647" maxStringContentLength="2147483647"/>
              <security mode="None"/>
            </binding>
          </basicHttpBinding>
          <webHttpBinding>
            <binding>
              <security mode="None"/>
            </binding>
          </webHttpBinding>
        </bindings>
        <client>
          <endpoint address="http://localhost:3235/CoreService.xamlx" binding="basicHttpBinding" bindingConfiguration="httpLargeMessageStream" contract="ICoreService" name="httpLargeMessageStream"/>
        </client>   
      </system.serviceModel>

    I'm using Visual Studio 2010RC on Windows XP, fiddler 2.2.8, and a service created with Workflow 4.0 services.
    I'm also using this class as message:

    [MessageContract]
        public class SubmitWorkflowContext
        {
            [MessageHeader]
            public Guid UnitId { get; set; }
    
            [MessageHeader]
            public Guid WorkflowId { get; set; }
    
            [MessageBodyMember]
            public Stream Stream { get; set; }
        }



    The stream is a serialized workflow and the error is a 400 bad request with this from the svclog: System.Xml.XmlException: The body of the message cannot be read because it is empty

    Thank you
    Monday, March 8, 2010 8:06 AM

Answers

  • Everything works fine on a console host, so this is the old cassini limitation.
    What is strange for me is that it's working when fiddler is open, anyway I solved the main issue and I can go on with my project.
    • Marked as answer by fleed Monday, March 8, 2010 8:54 AM
    Monday, March 8, 2010 8:53 AM