【问题标题】:Getting “Request for the permission of type 'System.Web.Aspnethostingpermission, System, Version 2.0.0.0, ” in SSRS 2008在 SSRS 2008 中获取“请求类型 'System.Web.Aspnethostingpermission, System, Version 2.0.0.0, 的权限”
【发布时间】:2011-06-20 21:59:03
【问题描述】:

在 SSRS 2008 R2 中开发报告时出现以下错误:

请求类型的许可 'System.Web.Aspnethostingpermission, 系统,版本 2.0.0.0, 文化=中性, PublicKeyToken=b77a5c561934e089' 失败

当我使用以下一段自定义代码时:

 System.Web.HttpContext.Current.Response.Write("alert('From date cannot be more than the To date');")
我已经搜索了各个站点以解决此问题,但没有用。在这方面的任何帮助将不胜感激。

这是完整的自定义代码:

Function CheckDateParameters(FromDate as Date, ToDate as Date) as Integer

If (FromDate > ToDate)  Then

System.Web.HttpContext.Current.Response.Write("< script language='javascript' >alert('From date can’t be more than the To date');< /script >") 

End If

End Function

【问题讨论】:

    标签: javascript validation ssrs-2008 custom-code


    【解决方案1】:

    我想代码

    System.Web.HttpContext.Current.Response.Write("script language='javascript'alert('From date can’t be more than the To date');<\script>")
    

    应该是(缺少括号):

    System.Web.HttpContext.Current.Response.Write("<script language='javascript'>alert('From date can’t be more than the To date');<\script>")
    

    编辑: http://forums.whirlpool.net.au/archive/1131887

    【讨论】:

    • 是的,我知道我故意错过了那些括号,因为我无法在提出问题时给出这些括号......
    猜你喜欢
    • 2012-11-16
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2010-12-30
    • 2011-02-15
    • 2012-08-13
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多