甚至可能在.Net 4中使用ReportViewer? (legacyCasModel =" true"导致问题) [英] ReportViewer in .Net 4 even possible? (legacyCasModel="true" causes problems)

查看:66
本文介绍了甚至可能在.Net 4中使用ReportViewer? (legacyCasModel =" true"导致问题)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我试图将一个简单的报告放在一个.aspx页面中的ReportViewer控件中,该页面是MVC 3 / ASP.Net 4.0站点的一部分。


任何表达式I在报告中没有工作(他们只是在字段中显示"#ERROR"),经过一些挖掘,我遇到一个帖子告诉我,为了让表达式与.Net中的新安全模型一起工作4,我必须在我的web.config中设置
跟随:


< trust legacyCasModel =" true" level =" Full" />


我做到了,果然报告工作得很好。一个简单的修复,快乐!


 


不幸的是,我现在在使用动态数据类型的所有MVC视图上获得以下内容(几乎就是所有这些!):


  动态操作只能在同质的AppDomain中执行。




这个错误显然是由于我对web.config中信任更改的更改造成的,因为如果我删除该行,那么视图将重新开始工作。


这是否基本上意味着,在这个时间点,在.Net 4.0网站中使用报表控件是不可能的,我我需要在一个单独的.Net 3.5应用程序上运行我的报告,(或者一个单独的.net 4.0应用程序,它不使用动态类型 - 即
a网站,它不使用MVC中的任何wiz-bang内容)?


问题:

是否有人在.aspx页面中使用包含MVC3 / ASP.Net一部分表达式的报表4.0申请?

如果是这样,你能描述一下你用来使它运作的技巧吗?


我最近提醒他们为什么称它为"最前沿"。 EF和MVC非常酷,但Linq to SQL,webforms和asp.net 3.5总是那么痛苦!


谢谢,

CList

解决方案

你好,


你有没有为此找到解决方法?尝试在Azure中运行带有.NET4 / MVC3的ReportViewer时遇到同样的问题。


谢谢,


Brendan


&NBSP;


I tried to put a simple report in a ReportViewer control in a .aspx page that is part of a MVC 3 / ASP.Net 4.0 site.

Any expressions I had in the report didn't work (they just displayed "#ERROR" in the fields), and after some digging I came across a post telling me that in order to get the expressions to work with the new security model in .Net 4, that I had to set the following in my web.config:

<trust legacyCasModel="true" level="Full"/>

I did that and sure enough the report worked just great. An easy fix, joy!

 

Unfortunately, I now get the following on all of my MVC views which use dynamic data types (which is pretty much all of them!):

 Dynamic operations can only be performed in homogenous AppDomain.


And this error is obviously caused by my change to the change to the trust in the web.config, because if I remove that line then the views go back to working again.

Does this basically mean that, at this point in time, using reports controls in .Net 4.0 websites is impossible and I need to run my reports out on a separate .Net 3.5 application, (or a separate .net 4.0 application that uses no dynamic types  - i.e. a site that does not use any of the wiz-bang stuff in MVC)?

The Question:
Has anyone been using reports with expressions in .aspx pages that are part of a MVC3 / ASP.Net 4.0 application?
If so, can you describe the tricks you used to get it working?

I am reminded lately why they call it "the bleeding edge". EF and MVC is very cool, but Linq to SQL, webforms, and asp.net 3.5 was always so much less painful!

Thanks,
CList

解决方案

Hi there,

Did you ever find a workaround for this? I have the same issue trying to run ReportViewer with .NET4/MVC3 in Azure.

Thanks,

Brendan

 


这篇关于甚至可能在.Net 4中使用ReportViewer? (legacyCasModel =&quot; true&quot;导致问题)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆