0

我必须将任何大小的图像上传到天蓝色云服务。在本地,我已经在相应的配置文件中进行了更改并成功上传到服务,也到 blob。然后我发布了服务。现在我在将图像上传到此服务时遇到错误。

"errorMessage":"远程服务器返回错误:(400) Bad Request。" 这是我收到的错误消息。我已经在服务的 web.config 中进行了这些更改,然后我能够成功上传。然后我发布了服务。但是对于这个服务,我无法上传大尺寸(大于 200*200)

 <system.web>
    <compilation debug="true" targetFramework="4.0" />
    <httpRuntime executionTimeout="4800" maxRequestLength="2147483647"/>
  </system.web>
  <system.serviceModel>
    <serviceHostingEnvironment  aspNetCompatibilityEnabled="true">
    </serviceHostingEnvironment>
    <standardEndpoints>
      <webHttpEndpoint>
        <!--<standardEndpoint name="" helpEnabled="true" crossDomainScriptAccessEnabled="true" faultExceptionEnabled="true" >
        </standardEndpoint>-->
        <standardEndpoint name="" maxReceivedMessageSize="2147483647" helpEnabled="true" crossDomainScriptAccessEnabled="true" faultExceptionEnabled="true" >
        </standardEndpoint>
      </webHttpEndpoint>
    </standardEndpoints>
    <bindings>
      <basicHttpBinding>
        <binding  transferMode="Streamed" closeTimeout="00:10:00" maxBufferPoolSize="2147483647" maxReceivedMessageSize="2147483647" openTimeout="00:10:00" receiveTimeout="00:10:00" sendTimeout="00:10:00" messageEncoding="Text">
          <readerQuotas maxDepth="2147483647" maxStringContentLength="2147483647" maxBytesPerRead="2147483647" maxNameTableCharCount="2147483647" maxArrayLength="2147483647"/>
        </binding>
      </basicHttpBinding>
    </bindings>
  </system.serviceModel>
  <system.webServer>
    <security>
      <requestFiltering>
        <requestLimits maxAllowedContentLength="2147483647"></requestLimits>
      </requestFiltering>
    </security>
4

0 回答 0