悲催,弄了半天还是大于8K就不行,wcf的web.config配置如下(新手没分~~~):
<bindings>
<basicHttpBinding>
<binding name="flowbinding"  maxBufferSize="2147483647" maxReceivedMessageSize="2147483647">
<readerQuotas  maxStringContentLength="2147483647" maxArrayLength="2147483647" maxBytesPerRead="2147483647"/>
<security mode="None">
</security>
</binding>
</basicHttpBinding>
</bindings>
<services>
<service name="JPMFlowService.JPMFlowService">
<endpoint address="http://localhost:2449/JPMFlowService.svc" binding="basicHttpBinding" bindingConfiguration="flowbinding"
  contract="JPMFlowService.JPMFlowService"  />
</service>
</services>

解决方案 »

  1.   

    学习了,希望能和楼主多交流,以后常来往
    http://hi.csdn.net/space.html
      

  2.   

    那个8k文件上传下,看第二次能否上传。如还能上传 在webconfig里设置 httpRuntimemaxRequestLength 看下
      

  3.   

    是往wcf传递一个大于8k的字符串,和这个有关系?
      

  4.   

    wcf 如果是在iis中的话有关系。
      

  5.   

    设置了这个也不行,这个默认页是4M,传个字符串才8K。解决方案全说改个wcf端配置就OK,悲催的是改了还是不行。
      

  6.   

    没有用ajax 客户端是一个winform项目,直接调用的服务方法
      

  7.   

    客户端调用代码:
    private void button1_Click(object sender, EventArgs e)
            {
                
                ServiceReference1.JPMFlowServiceClient server = new ServiceReference1.JPMFlowServiceClient();            string flowXML = "";
                StreamReader sr = new StreamReader(@"C:\Documents and Settings\Administrator\桌面\flow.txt", System.Text.Encoding.Default);
                flowXML = sr.ReadToEnd();
                server.UpdateFlow(flowXML);
            }
      

  8.   

    <?xml version="1.0" encoding="utf-8" ?>
    <configuration>
        <system.serviceModel>
            <bindings>
                <basicHttpBinding>
                    <binding name="BasicHttpBinding_IJPMFlowService" closeTimeout="00:01:00"
                        openTimeout="00:01:00" receiveTimeout="00:10:00" sendTimeout="00:01:00"
                        allowCookies="false" bypassProxyOnLocal="false" hostNameComparisonMode="StrongWildcard"
                        maxBufferSize="2147483647" maxBufferPoolSize="524288" maxReceivedMessageSize="2147483647"
                        messageEncoding="Text" textEncoding="utf-8" transferMode="Buffered"
                        useDefaultWebProxy="true">
                        <readerQuotas maxDepth="32" maxStringContentLength="2147483647" maxArrayLength="16384"
                            maxBytesPerRead="4096" maxNameTableCharCount="16384" />
                        <security mode="None">
                            <transport clientCredentialType="None" proxyCredentialType="None"
                                realm="" />
                            <message clientCredentialType="UserName" algorithmSuite="Default" />
                        </security>
                    </binding>
                </basicHttpBinding>
            </bindings>
            <client>
                <endpoint address="http://localhost:2449/JPMFlowService.svc"
                    binding="basicHttpBinding" bindingConfiguration="BasicHttpBinding_IJPMFlowService"
                    contract="ServiceReference1.IJPMFlowService" name="BasicHttpBinding_IJPMFlowService" />
            </client>
        </system.serviceModel>
    </configuration>
      

  9.   

    <?xml version="1.0" encoding="utf-8" ?>
    <configuration>
        <system.serviceModel>
            <bindings>
                <basicHttpBinding>
                    <binding name="BasicHttpBinding_IJPMFlowService" closeTimeout="00:01:00"
                        openTimeout="00:01:00" receiveTimeout="00:10:00" sendTimeout="00:01:00"
                        allowCookies="false" bypassProxyOnLocal="false" hostNameComparisonMode="StrongWildcard"
                        maxBufferSize="2147483647" maxBufferPoolSize="524288" maxReceivedMessageSize="2147483647"
                        messageEncoding="Text" textEncoding="utf-8" transferMode="Buffered"
                        useDefaultWebProxy="true">
                        <readerQuotas maxDepth="32" maxStringContentLength="2147483647" maxArrayLength="16384"
                            maxBytesPerRead="4096" maxNameTableCharCount="16384" />
                        <security mode="None">
                            <transport clientCredentialType="None" proxyCredentialType="None"
                                realm="" />
                            <message clientCredentialType="UserName" algorithmSuite="Default" />
                        </security>
                    </binding>
                </basicHttpBinding>
            </bindings>
            <client>
                <endpoint address="http://localhost:2449/JPMFlowService.svc"
                    binding="basicHttpBinding" bindingConfiguration="BasicHttpBinding_IJPMFlowService"
                    contract="ServiceReference1.IJPMFlowService" name="BasicHttpBinding_IJPMFlowService" />
            </client>
        </system.serviceModel>
    </configuration>