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
  1. Home
  2. Web Development
  3. ASP.NET
  4. Security Exception

Security Exception

Scheduled Pinned Locked Moved ASP.NET
helpdatabasesysadmindata-structuressecurity
3 Posts 2 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.
  • D Offline
    D Offline
    deepaks3
    wrote on last edited by
    #1

    Hi Friends, I have made a SQL DB Wrapper for my project. It is working perfect on my machine dure to local settings.But I am using a shared server on wich it is giving the following error : Source Error: An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below. Stack Trace: [SecurityException: Request for the permission of type 'System.Security.Permissions.EnvironmentPermission, 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.Environment.GetEnvironmentVariable(String variable) +66 Something.DataProvider.SQLDBFactory..ctor(Provider strProvider) +108 Something.DataProvider.SQLDBAccess.ExecuteDataset(IDbConnection cnn, CommandType enumCommandType, String strCommandTxt, IDataParameter[] objCommandParameters) +126 Something.DataProvider.BaseDataProcess.SP_ExecuteDataSet(String text, IDataParameter[] param) +119 ..... .... Please help me to resolve the problem. Thanks in Advance.

    Deepak Surana

    C 1 Reply Last reply
    0
    • D deepaks3

      Hi Friends, I have made a SQL DB Wrapper for my project. It is working perfect on my machine dure to local settings.But I am using a shared server on wich it is giving the following error : Source Error: An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below. Stack Trace: [SecurityException: Request for the permission of type 'System.Security.Permissions.EnvironmentPermission, 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.Environment.GetEnvironmentVariable(String variable) +66 Something.DataProvider.SQLDBFactory..ctor(Provider strProvider) +108 Something.DataProvider.SQLDBAccess.ExecuteDataset(IDbConnection cnn, CommandType enumCommandType, String strCommandTxt, IDataParameter[] objCommandParameters) +126 Something.DataProvider.BaseDataProcess.SP_ExecuteDataSet(String text, IDataParameter[] param) +119 ..... .... Please help me to resolve the problem. Thanks in Advance.

      Deepak Surana

      C Offline
      C Offline
      CharlyBrownx3
      wrote on last edited by
      #2

      Hello, Have you check that the database login has the appropriate permissions?

      D 1 Reply Last reply
      0
      • C CharlyBrownx3

        Hello, Have you check that the database login has the appropriate permissions?

        D Offline
        D Offline
        deepaks3
        wrote on last edited by
        #3

        Yes i have checked the DB login id and pass. Its a .Net error as far as i know, wichi is coming beacuse of some security permissions of the dll's

        Deepak Surana

        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