Warning: file_get_contents(/data/phpspider/zhask/data//catemap/7/wcf/4.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
如何配置WCF服务或IIS来处理大量参数?_Wcf_Asp.net 3.5 - Fatal编程技术网

如何配置WCF服务或IIS来处理大量参数?

如何配置WCF服务或IIS来处理大量参数?,wcf,asp.net-3.5,Wcf,Asp.net 3.5,我使用的是.NET 3.5 framework,有大量参数传递到我的wcf: 是否可以在web.config或IIS中设置任何配置 http://localhost:61819/Services/IRAWorkLoad.svc/GetDLNs?sEcho=1&iColumns=23&sColumns=%2C%2C%2C%2C%2C%2C%2C%2C%2C%2C%2C%2C%2C%2C%2C%2C%2C%2C%2C%2C%2C%2C&iDisplayStart=0&

我使用的是.NET 3.5 framework,有大量参数传递到我的wcf: 是否可以在web.config或IIS中设置任何配置

http://localhost:61819/Services/IRAWorkLoad.svc/GetDLNs?sEcho=1&iColumns=23&sColumns=%2C%2C%2C%2C%2C%2C%2C%2C%2C%2C%2C%2C%2C%2C%2C%2C%2C%2C%2C%2C%2C%2C&iDisplayStart=0&iDisplayLength=100&mDataProp_0=0&sSearch_0=&bRegex_0=false&bSearchable_0=true&bSortable_0=true&mDataProp_1=1&sSearch_1=&bRegex_1=false&bSearchable_1=true&bSortable_1=true&mDataProp_2=2&sSearch_2=&bRegex_2=false&bSearchable_2=true&bSortable_2=true&mDataProp_3=3&sSearch_3=&bRegex_3=false&bSearchable_3=true&bSortable_3=true&mDataProp_4=4&sSearch_4=&bRegex_4=false&bSearchable_4=true&bSortable_4=true&mDataProp_5=5&sSearch_5=&bRegex_5=false&bSearchable_5=true&bSortable_5=true&mDataProp_6=6&sSearch_6=&bRegex_6=false&bSearchable_6=true&bSortable_6=true&mDataProp_7=7&sSearch_7=&bRegex_7=false&bSearchable_7=true&bSortable_7=true&mDataProp_8=8&sSearch_8=&bRegex_8=false&bSearchable_8=true&bSortable_8=true&mDataProp_9=9&sSearch_9=&bRegex_9=false&bSearchable_9=true&bSortable_9=true&mDataProp_10=10&sSearch_10=&bRegex_10=false&bSearchable_10=true&bSortable_10=true&mDataProp_11=11&sSearch_11=&bRegex_11=false&bSearchable_11=true&bSortable_11=true&mDataProp_12=12&sSearch_12=&bRegex_12=false&bSearchable_12=true&bSortable_12=true&mDataProp_13=13&sSearch_13=&bRegex_13=false&bSearchable_13=true&bSortable_13=true&mDataProp_14=14&sSearch_14=&bRegex_14=false&bSearchable_14=true&bSortable_14=true&mDataProp_15=15&sSearch_15=&bRegex_15=false&bSearchable_15=true&bSortable_15=true&mDataProp_16=16&sSearch_16=&bRegex_16=false&bSearchable_16=true&bSortable_16=true&mDataProp_17=17&sSearch_17=&bRegex_17=false&bSearchable_17=true&bSortable_17=true&mDataProp_18=18&sSearch_18=&bRegex_18=false&bSearchable_18=true&bSortable_18=true&mDataProp_19=19&sSearch_19=&bRegex_19=false&bSearchable_19=true&bSortable_19=true&mDataProp_20=20&sSearch_20=&bRegex_20=false&bSearchable_20=true&bSortable_20=true&mDataProp_21=21&sSearch_21=&bRegex_21=false&bSearchable_21=true&bSortable_21=true&mDataProp_22=22&sSearch_22=&bRegex_22=false&bSearchable_22=true&bSortable_22=true&sSearch=&bRegex=false&iSortCol_0=0&sSortDir_0=asc&iSortingCols=1&assignType=1
My web.config:

<system.serviceModel>
    <behaviors>
      <endpointBehaviors>
        <behavior name="Treasury.IRS.HCTC.IRAWorkload.Web.Services.IRAWorkLoadAspNetAjaxBehavior">
          <enableWebScript />
        </behavior>
      </endpointBehaviors>
    </behaviors>
    <serviceHostingEnvironment aspNetCompatibilityEnabled="true" />
    <services>
      <service name="Treasury.IRS.HCTC.IRAWorkload.Web.Services.IRAWorkLoad">
        <endpoint address="" behaviorConfiguration="Treasury.IRS.HCTC.IRAWorkload.Web.Services.IRAWorkLoadAspNetAjaxBehavior"
          binding="webHttpBinding" contract="Treasury.IRS.HCTC.IRAWorkload.Web.Services.IRAWorkLoad" />
      </service>
    </services>
  </system.serviceModel>


您可以为WCF中的大多数内容设置配额,在传递所有这些参数时是否会出现特定错误?这与WCF配置无关,与浏览器和/或web服务器允许的查询字符串的最大长度有关。您的示例查询字符串长2033个字符,因此它可能会工作,但这是可怕的阅读(国际海事组织)。我认为将这些参数放入DTO类型的对象并将对象传递到方法中更有意义。更易于维护和故障排除。我认为这是IIS对参数的限制。你能给我一个示例DTO作为参数列表吗?