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 when accessing db from dll

Security exception when accessing db from dll

Scheduled Pinned Locked Moved ASP.NET
databasehelpcsharpasp-netmysql
1 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.
  • S Offline
    S Offline
    spazzman
    wrote on last edited by
    #1

    Hi. I've got an asp.net application being hosted on some commercial hosting server. In my project I have a dll (also my code) that contains all my database accessing routines. My database is part of the same hosting domain. When I try to access the database using the dll, I get this 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 failed. --------------------------------------------- If I copy the database accessing code from the dll to an aspx page in my project, it works fine. Clearly I'm not allowed to access the db using this dll. The hosting site uses medium-level .Net security privelages, if that helps. Does anyone know a way around this problem? I tried making my Dll strongly named, but that made it even worse - a strongly named dll can't even be linked to without throwing an exception. I've had the same problem with Bytefx.net's strongly-named MySQL database accessing dll - merely linking to that dll throws an exception. Any help would be greatly appreciated. - Shukri

    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