问题
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