一张表在 Presentation Tier 中可用,另一张不可用

one table is available in Presentation Tier, the other is not(一张表在 Presentation Tier 中可用,另一张不可用)
本文介绍了一张表在 Presentation Tier 中可用,另一张不可用的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我使用 Northwind 的 N 层演练创建了一个 VB.Net 解决方案.解决方案奏效了.

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

然后我使用不同的数据库创建了一个新的解决方案.在 XSD 中,我可以执行查询并显示数据.

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

但是,使用 WCF 服务的这些表的表示层中的数据不可用.

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

我已将新表导入 Northwind,但它们在 PresentationTier 中不起作用.我已将 Northwind 表导入到我的新数据库中,并且它们确实在 PresentationTier 中工作.

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.

是否有一些表属性需要修改,以便表不仅可以在 DataAccess/DataEntity 层的 XSD 数据集中通过,而且还可以通过 WCF 在表示层中可用?

推荐答案

好的 - 问题似乎与通过 WCF 传入的数据量有关.我测试了不同的行数,结果为 271.

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.

我更改了 SQL Server 数据库中两个字段的值以包含更多数据.

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

对于 WCF 可以将多少数据传送到 PresentationTier,显然存在一个阈值.

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

已解决 (???) - 在 PresentationTier 中,右键单击 App.config.

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

选择了编辑 WCF 配置".关于绑定 - BasicHTTPBinding_IService1 我将 MaxReceivedMessageSize 更改为 65536000,保存并关闭.

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

双击 PresentationTier - App.config 即可看到新设置 -

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>

这篇关于一张表在 Presentation Tier 中可用,另一张不可用的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持编程学习网!

本站部分内容来源互联网,如果有图片或者内容侵犯您的权益请联系我们删除!

相关文档推荐

Execute complex raw SQL query in EF6(在EF6中执行复杂的原始SQL查询)
SSIS: Model design issue causing duplications - can two fact tables be connected?(SSIS:模型设计问题导致重复-两个事实表可以连接吗?)
SQL Server Graph Database - shortest path using multiple edge types(SQL Server图形数据库-使用多种边类型的最短路径)
Invalid column name when using EF Core filtered includes(使用EF核心过滤包括时无效的列名)
How should make faster SQL Server filtering procedure with many parameters(如何让多参数的SQL Server过滤程序更快)
How can I generate an entity–relationship (ER) diagram of a database using Microsoft SQL Server Management Studio?(如何使用Microsoft SQL Server Management Studio生成数据库的实体关系(ER)图?)