Request for the permission of type 'System.Security.Permissions.FileIOPermission

Discussion in 'Microsoft Development' started by pictoric, Oct 24, 2007.

  1. pictoric

    pictoric Guppy

    I'm not sure if this is a trust issue or not, but I have a page that only pulls information from a database and it is generating this error. Never seen this error. The page has an asp:calendar control and doesn't do much of anything fancy.. Any suggestions?

    An error occurred loading a configuration file: Request for the permission of type 'System.Security.Permissions.FileIOPermission, mscorlib, Version=, Culture=neutral, PublicKeyToken=b77a5c561934e089' failed. (machine.config)
  2. Stephen

    Stephen US Operations Staff Member

    that means yu are using either and absolute path, or trying to access a file outside of the application directory.
  3. pictoric

    pictoric Guppy

    Actually it was none of those. You can't access the web.config appsettings using: System.Web.Configuration.WebConfigurationManager on medium trust. I changed it to System.Configuration.ConfigurationManager after a couple hours of researching and it is fine now.
  4. antic

    antic Perch

    pictoric, glad you found the solution and thanks for posting it, very useful info.
  5. I think you do nice job by littel changes in your code.
    but i cant understand what you r trying to say. pls describe in detail i face the same problem as u realize before

Share This Page

JodoHost - 26,000 hosting end-users in 100 countries
Plesk Web Hosting
VPS Hosting
H-Sphere Web Hosting
Other Services