Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
CODE PROJECT For Those Who Code
  • Home
  • Articles
  • FAQ
Community
  1. Home
  2. Database & SysAdmin
  3. Database
  4. System.Security.SecurityException while accessing report

System.Security.SecurityException while accessing report

Scheduled Pinned Locked Moved Database
helpdatabasesysadminsecurityquestion
2 Posts 1 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • N Offline
    N Offline
    nizamuddin733
    wrote on last edited by
    #1

    I don't no where to post this question please help me I am facing this problem from last two days while opening report from my website i am getting following issue this was working fine on our test server but in client machine we are getting this issue System.Security.SecurityException: Request for the permission of type 'System.Web.AspNetHostingPermission, System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089' failed. i am using vs2005 and sql2005 reporting services i checked on client machine report is opening from report manager and anonymous user chek box is checked and windows auth check box checked we have one user reportadmin he has rights browser also and this user also have rights in reportserver db with resexe role . this id my cod protected void Page_Load(object sender, EventArgs e) { BreadCrumbs.MenuItemID = ModuleID; HdnParameters.Value = Convert.ToString(Session["UserID"]) + "-" + Convert.ToString(Session["ProviderID"]) + "-" + ViewDataAccessType; RVReferralListing.BorderWidth = 0; if (!this.IsPostBack) { int referralID = 0; if (Request.QueryString["ReferralID"] != null) { referralID = Convert.ToInt32(Request.QueryString["ReferralID"]); FillSubReport(referralID); } if (referralID == 0) { PnlSearchBasedControls.Attributes.Add("style", "display:''"); divMainReport.Attributes.Add("style", "display:''"); divSubReport.Attributes.Add("style", "display:none"); } else { PnlSearchBasedControls.Attributes.Add("style", "display:none"); divMainReport.Attributes.Add("style", "display:none"); divSubReport.Attributes.Add("style", "display:''"); } Session["ClientAccessData"] = Convert.ToString(Session["UserID"]) + "-" + Convert.ToString(Session["ProviderID"]) + "-" + ViewDataAccessType; } } private void FillSubReport(int referralID) { RVReferralSubReport.Visible = true; RVReferralSubReport.BorderWidth = 2; Uri ur = new Uri(Convert.ToString(ConfigurationManager.AppSettings["ReportServerUri"])); RVReferralSubReport.ServerReport.ReportPath = Convert.ToString(ConfigurationManager.AppSettings["ReportPath"]) + "/ChldReferralServicesReport"; RVReferralSubReport.ServerRepor

    N 1 Reply Last reply
    0
    • N nizamuddin733

      I don't no where to post this question please help me I am facing this problem from last two days while opening report from my website i am getting following issue this was working fine on our test server but in client machine we are getting this issue System.Security.SecurityException: Request for the permission of type 'System.Web.AspNetHostingPermission, System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089' failed. i am using vs2005 and sql2005 reporting services i checked on client machine report is opening from report manager and anonymous user chek box is checked and windows auth check box checked we have one user reportadmin he has rights browser also and this user also have rights in reportserver db with resexe role . this id my cod protected void Page_Load(object sender, EventArgs e) { BreadCrumbs.MenuItemID = ModuleID; HdnParameters.Value = Convert.ToString(Session["UserID"]) + "-" + Convert.ToString(Session["ProviderID"]) + "-" + ViewDataAccessType; RVReferralListing.BorderWidth = 0; if (!this.IsPostBack) { int referralID = 0; if (Request.QueryString["ReferralID"] != null) { referralID = Convert.ToInt32(Request.QueryString["ReferralID"]); FillSubReport(referralID); } if (referralID == 0) { PnlSearchBasedControls.Attributes.Add("style", "display:''"); divMainReport.Attributes.Add("style", "display:''"); divSubReport.Attributes.Add("style", "display:none"); } else { PnlSearchBasedControls.Attributes.Add("style", "display:none"); divMainReport.Attributes.Add("style", "display:none"); divSubReport.Attributes.Add("style", "display:''"); } Session["ClientAccessData"] = Convert.ToString(Session["UserID"]) + "-" + Convert.ToString(Session["ProviderID"]) + "-" + ViewDataAccessType; } } private void FillSubReport(int referralID) { RVReferralSubReport.Visible = true; RVReferralSubReport.BorderWidth = 2; Uri ur = new Uri(Convert.ToString(ConfigurationManager.AppSettings["ReportServerUri"])); RVReferralSubReport.ServerReport.ReportPath = Convert.ToString(ConfigurationManager.AppSettings["ReportPath"]) + "/ChldReferralServicesReport"; RVReferralSubReport.ServerRepor

      N Offline
      N Offline
      nizamuddin733
      wrote on last edited by
      #2

      I got the solution for above issue Issue is we have a folder name called Reports in application and also we have same name virtual directory in IIS

      1 Reply Last reply
      0
      Reply
      • Reply as topic
      Log in to reply
      • Oldest to Newest
      • Newest to Oldest
      • Most Votes


      • Login

      • Don't have an account? Register

      • Login or register to search.
      • First post
        Last post
      0
      • Categories
      • Recent
      • Tags
      • Popular
      • World
      • Users
      • Groups