Getting “Request for the permission of type 'System.Web.Aspnethostingpermission, System, Version 2.0.0.0, ” in SSRS 2008
I’m getting the following error while developing a report in SSRS 2008 R2:
Request for the permission of type 'System.Web.Aspnethostingpermission, System, Version 2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089’ failed
When I use the following piece of custom code:
System.Web.HttpContext.Current.Response.Write("< script language='javascript' >alert('From date can’t be more than the To date');< /script >")I have searched across various sites to fix this but no use. Any help in this regard will be appreciated.
Here is the complete custom code:
Function CheckDateParameters(FromDate as Date, ToDate as Date) as Integer
If (FromDate > ToDate) Then
System.Web.HttpContext.Current.Response.Write("< script lang开发者_运维知识库uage='javascript' >alert('From date can’t be more than the To date');< /script >")
End If
End Function
I think code
System.Web.HttpContext.Current.Response.Write("script language='javascript'alert('From date can’t be more than the To date');<\script>")
should be (there was missing brackets):
System.Web.HttpContext.Current.Response.Write("<script language='javascript'>alert('From date can’t be more than the To date');<\script>")
edit: http://forums.whirlpool.net.au/archive/1131887
精彩评论