System.Security.SecurityException when clicking a linkbutton

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • confused1234
    New Member
    • Sep 2007
    • 23

    #1

    System.Security.SecurityException when clicking a linkbutton

    I get the error at the bottom of this post when i click on a linkbutton,
    Code:
     javascript:__doPostBack('ctl00$Main$btnchangeemail','')
    The problem is intermitant, sometimes it works and sometimes it errors,

    The page is running in an iframe if this makes a difference.

    ANY IDEAS???

    Thanks

    Code:
    Security Exception 
    Description: The application attempted to perform an operation not allowed by the security policy.  To grant this application the required permission please contact your system administrator or change the application's trust level in the configuration file. 
    
    Exception Details: System.Security.SecurityException: Request for the permission of type 'System.Security.Permissions.FileIOPermission, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089' failed.
    
    Source Error: 
    
    
    [No relevant source lines]
     
    
    Source File: App_Web_3lkoj9s5.28.cs    Line: 0 
    
    Stack Trace: 
    
    
    [SecurityException: Request for the permission of type 'System.Security.Permissions.FileIOPermission, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089' failed.]
       System.Security.CodeAccessSecurityEngine.Check(Object demand, StackCrawlMark& stackMark, Boolean isPermSet) +0
       System.Security.CodeAccessPermission.Demand() +59
       System.IO.Path.GetFullPath(String path) +98
       System.Web.Util.FileUtil.IsSuspiciousPhysicalPath(String physicalPath, Boolean& pathTooLong) +50
       System.Web.Util.FileUtil.IsSuspiciousPhysicalPath(String physicalPath) +23
       System.Web.CachedPathData.GetConfigPathData(String configPath) +465
       System.Web.CachedPathData.GetConfigPathData(String configPath) +243
       System.Web.Compilation.CompilationUtil.GetAssembliesForAppLevel() +193
       System.Web.Compilation.BuildManager.GetType(String typeName, Boolean throwOnError, Boolean ignoreCase) +297
       System.Web.UI.Page.get_IsPartialRenderingSupported() +71
       System.Web.UI.WebControls.BaseValidator.RegisterValidatorCommonScript() +21
       System.Web.UI.WebControls.BaseValidator.OnPreRender(EventArgs e) +70
       System.Web.UI.Control.PreRenderRecursiveInternal() +77
       System.Web.UI.Control.PreRenderRecursiveInternal() +161
       System.Web.UI.Control.PreRenderRecursiveInternal() +161
       System.Web.UI.Control.PreRenderRecursiveInternal() +161
       System.Web.UI.Control.PreRenderRecursiveInternal() +161
       System.Web.UI.Control.PreRenderRecursiveInternal() +161
       System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +6978
       System.Web.UI.Page.ProcessRequest(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +213
       System.Web.UI.Page.ProcessRequest() +86
       System.Web.UI.Page.ProcessRequestWithNoAssert(HttpContext context) +18
       System.Web.UI.Page.ProcessRequest(HttpContext context) +49
       ASP._myaccount_aspx.ProcessRequest(HttpContext context) in App_Web_3lkoj9s5.28.cs:0
       System.Web.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() +303
       System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) +64
  • confused1234
    New Member
    • Sep 2007
    • 23

    #2
    anyone? thanks. ............... ...........

    Comment

    • radcaesar
      Recognized Expert Contributor
      • Sep 2006
      • 759

      #3
      What you do in that button click.

      It seems that you referenced some custom assembly in that button click which don't have enough permission. Grant permission to that assembly and all will set.

      Until you explain what you had done in that click, this is what my suggestion is.

      :)

      Comment

      • confused1234
        New Member
        • Sep 2007
        • 23

        #4
        Originally posted by radcaesar
        What you do in that button click.

        It seems that you referenced some custom assembly in that button click which don't have enough permission. Grant permission to that assembly and all will set.

        Until you explain what you had done in that click, this is what my suggestion is.

        :)
        I didn't make the assembly so i was guessing it was generated automatically, if so surely it should have correct permission, also the problem is on and off...
        How would i go about setting the assembly;s permission?
        Thanks mate

        Comment

        • confused1234
          New Member
          • Sep 2007
          • 23

          #5
          anyone , please help me!

          Comment

          Working...