one table is available in Presentation Tier, the other is not

大城市里の小女人 提交于 2019-12-12 02:40:03

问题


I created a VB.Net solution using the N-Tier walkthrough with Northwind. The solution worked.

http://msdn.microsoft.com/en-us/library/bb384570.aspx

I then created a new solution using a different database. In the XSD I can execute the queries and the data appears.

However, the data is not available in the Presentation Tier from these tables using the WCF service.

I have imported the new tables to Northwind, and they don't work in the PresentationTier. I have imported the Northwind tables to my new database, and they DO work in the PresentationTier.

All my code is similar and no errors are thrown. There is data in the new tables.

Is there some table attribute that I need modify so that a table can come through not only in the XSD data set at the DataAccess/DataEntity Tiers, but also through WCF to be available in the Presentation Tier?


回答1:


Okay - the problem seems to be related to how much data is coming in through WCF. I tested different row counts and arrived at 271 as the cutoff.

I changed values in two fields in the SQL Server database to contain more data.

There is apparently a threshold on how much data can be carried by WCF to the PresentationTier.

SOLVED (???) - In PresentationTier, right clicked on App.config.

Selected 'Edit WCF Configuration'. On Bindings - BasicHTTPBinding_IService1 I cahnged the MaxReceivedMessageSize to 65536000, saved and closed.

Double click on PresentationTier - App.config and you can see the new setting -

<system.serviceModel>
    <bindings>
        <basicHttpBinding>
            <binding name="BasicHttpBinding_IService1" maxReceivedMessageSize="65536000" />
        </basicHttpBinding>
    </bindings>


来源:https://stackoverflow.com/questions/19553784/one-table-is-available-in-presentation-tier-the-other-is-not

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!