0
我剛剛從一個MVC客戶端引用一個WCF服務與basicHttpBinding的任務從WCF數據,所有工作正常,直到我有時間顯示DropDownMenu具有非常人口信息表格(只是所選字段的文本和值作爲下拉菜單) - 我正在談論5000條記錄 - 。 顯示在dropdownmenu的信息是項目必須的,到目前爲止,我沒有管理,以顯示50條記錄的信息(所以恕我直言,是不是MVC下拉問題),但是當涉及到顯示存儲在表中全程記錄了這消息無法檢索,因爲最大郵件大小配額
正如我提到我使用basicHttpBinding的和所有工作正常,直到得到了錯誤信息,所以我沒有在Web.config一些變化,它看起來像這樣:
<system.web>
<compilation debug="true" targetFramework="4.0" />
</system.web>
<system.serviceModel>
<behaviors>
<serviceBehaviors>
<behavior>
<!-- To avoid disclosing metadata information, set the value below to false before deployment -->
<serviceMetadata httpGetEnabled="true"/>
<!-- To receive exception details in faults for debugging purposes, set the value below to true. Set to false before deployment to avoid disclosing exception information -->
<serviceDebug includeExceptionDetailInFaults="false"/>
</behavior>
</serviceBehaviors>
</behaviors>
<serviceHostingEnvironment multipleSiteBindingsEnabled="true" />
<bindings>
<basicHttpBinding>
<binding name="basicHttp" allowCookies="true" maxBufferPoolSize="2147483647"
maxBufferSize="2147483647" maxReceivedMessageSize="2147483647" >
<readerQuotas maxDepth="2147483647" maxStringContentLength="2147483647"
maxArrayLength="2147483647" maxBytesPerRead="2147483647" maxNameTableCharCount="2147483647" />
</binding>
</basicHttpBinding>
</bindings>
</system.serviceModel>
<system.webServer>
<modules runAllManagedModulesForAllRequests="true"/>
<!--
To browse web app root directory during debugging, set the value below to true.
Set to false before deployment to avoid disclosing web app folder information.
-->
<directoryBrowse enabled="true"/>
</system.webServer>
<connectionStrings>
<add name="SIFP_GFC" connectionString="Dsn=sifp_desarrollo"
providerName="System.Data.Odbc" />
</connectionStrings>
</configuration>
但仍然得到了同樣的問題,你能告訴我爲了正確顯示下拉菜單中的數據,我必須做些什麼?
的*客戶*限制必須相應地增加。另一方面,你甚至不能在下拉菜單中顯示20個項目,而不會變得不可用,更不用說5000.這會導致一個非常糟糕的用戶界面。這就是爲什麼所有的應用程序和網站在這種情況下使用搜索組合。當用戶鍵入2或3個字母時,組合開始詢問以這些字母開頭的項目 –
爲什麼在使用MVC時創建* WCF *服務?您可以從控制器操作返回組合數據。您還可以使用具有搜索功能的可用Jquery組合中的某一個將用戶輸入的內容發送給控制器方法,並檢索需要顯示的內容。您也可以通過Ajax調用以異步方式執行此操作。 –