Caught Exception: System.Configuration.ConfigurationErrorsException: An error occurred loading a con

Discussion in 'ASP .Net' started by Mike, Aug 14, 2007.

  1. Mike

    Mike Guest

    Hi

    I have problem as folow:

    Caught Exception: System.Configuration.ConfigurationErrorsException:
    An error occurred loading a configuration file: Request for the
    permission of type 'System.Security.Permissions.FileIOPermission,
    mscorlib, Version=2.0.0.0, Culture=neutral,
    PublicKeyToken=b77a5c561934e089' failed. (machine.config) --->
    System.Security.SecurityException: Request for the permission of type
    'System.Security.Permissions.FileIOPermission, mscorlib,
    Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089'
    failed.

    I am hosting www.1and1.com server.
    This problem is noticed only on two pages, all others work well

    I tried to use folowing part of code within web configuration, but
    without success...

    <location allowOverride="true" path="~">
    <system.web>

    <trust level="Full" />
    </system.web>

    </location>

    Please help

    Thanks,
    Mike
     
    Mike, Aug 14, 2007
    #1
    1. Advertising

  2. Re: Caught Exception: System.Configuration.ConfigurationErrorsException: An error occurred loading a configuration file: Request for the permission of type 'System.Security.Permissions.FileIOPermission, mscorlib, Version=2.0.0.0, Culture=neutral, Pub

    On Aug 14, 9:16 am, Mike <> wrote:
    > Hi
    >
    > I have problem as folow:
    >
    > Caught Exception: System.Configuration.ConfigurationErrorsException:
    > An error occurred loading a configuration file: Request for the
    > permission of type 'System.Security.Permissions.FileIOPermission,
    > mscorlib, Version=2.0.0.0, Culture=neutral,
    > PublicKeyToken=b77a5c561934e089' failed. (machine.config) --->
    > System.Security.SecurityException: Request for the permission of type
    > 'System.Security.Permissions.FileIOPermission, mscorlib,
    > Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089'
    > failed.
    >
    > I am hosting www.1and1.comserver.
    > This problem is noticed only on two pages, all others work well
    >
    > I tried to use folowing part of code within web configuration, but
    > without success...
    >
    > <location allowOverride="true" path="~">
    > <system.web>
    >
    > <trust level="Full" />
    > </system.web>
    >
    > </location>
    >
    > Please help
    >
    > Thanks,
    > Mike


    What code gives you that exception?
     
    Alexey Smirnov, Aug 14, 2007
    #2
    1. Advertising

  3. Mike

    Mike Guest

    Re: Caught Exception: System.Configuration.ConfigurationErrorsException: An error occurred loading a configuration file: Request for the permission of type 'System.Security.Permissions.FileIOPermission, mscorlib, Version=2.0.0.0, Culture=neutral, Pub

    I am sorry Alexey, I am not sure that I uderstand a question...

    Here is the error in more details:

    Caught Exception: System.Configuration.ConfigurationErrorsException:
    An error occurred loading a configuration file: Request for the
    permission of type 'System.Security.Permissions.FileIOPermission,
    mscorlib, Version=2.0.0.0, Culture=neutral,
    PublicKeyToken=b77a5c561934e089' failed. (machine.config) --->
    System.Security.SecurityException: Request for the permission of type
    'System.Security.Permissions.FileIOPermission, mscorlib,
    Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089'
    failed.
    at System.Security.CodeAccessSecurityEngine.Check(Object demand,
    StackCrawlMark& stackMark, Boolean isPermSet)
    at System.Security.CodeAccessPermission.Demand()
    at System.IO.FileStream.Init(String path, FileMode mode, FileAccess
    access, Int32 rights, Boolean useRights, FileShare share, Int32
    bufferSize, FileOptions options, SECURITY_ATTRIBUTES secAttrs, String
    msgPath, Boolean bFromProxy)
    at System.IO.FileStream..ctor(String path, FileMode mode,
    FileAccess access, FileShare share)
    at
    System.Configuration.Internal.InternalConfigHost.StaticOpenStreamForRead(String
    streamName)
    at
    System.Configuration.Internal.InternalConfigHost.System.Configuration.Internal.IInternalConfigHost.OpenStreamForRead(String
    streamName, Boolean assertPermissions)
    at
    System.Configuration.Internal.InternalConfigHost.System.Configuration.Internal.IInternalConfigHost.OpenStreamForRead(String
    streamName)
    at
    System.Configuration.Internal.DelegatingConfigHost.OpenStreamForRead(String
    streamName)
    at System.Configuration.UpdateConfigHost.OpenStreamForRead(String
    streamName)
    at
    System.Configuration.BaseConfigurationRecord.InitConfigFromFile()
    The action that failed was:
    Demand
    The type of the first permission that failed was:
    System.Security.Permissions.FileIOPermission
    The Zone of the assembly that failed was:
    MyComputer
    --- End of inner exception stack trace ---
    at
    System.Configuration.ConfigurationSchemaErrors.ThrowIfErrors(Boolean
    ignoreLocal)
    at
    System.Configuration.BaseConfigurationRecord.ThrowIfParseErrors(ConfigurationSchemaErrors
    schemaErrors)
    at System.Configuration.Configuration..ctor(String locationSubPath,
    Type typeConfigHost, Object[] hostInitConfigurationParams)
    at
    System.Configuration.Internal.InternalConfigConfigurationFactory.System.Configuration.Internal.IInternalConfigConfigurationFactory.Create(Type
    typeConfigHost, Object[] hostInitConfigurationParams)
    at
    System.Web.Configuration.WebConfigurationHost.OpenConfiguration(WebLevel
    webLevel, ConfigurationFileMap fileMap, VirtualPath path, String site,
    String locationSubPath, String server, String userName, String
    password, IntPtr tokenHandle)
    at
    System.Web.Configuration.WebConfigurationManager.OpenWebConfigurationImpl(WebLevel
    webLevel, ConfigurationFileMap fileMap, String path, String site,
    String locationSubPath, String server, String userName, String
    password, IntPtr userToken)
    at
    System.Web.Configuration.WebConfigurationManager.OpenWebConfiguration(String
    path)
    at SecurityLayer.IsWebConfigProtected(String sectionName)
    at Administration_Admin_Security.Page_Load(Object sender, EventArgs
    e)
    at System.Web.Util.CalliHelper.EventArgFunctionCaller(IntPtr fp,
    Object o, Object t, EventArgs e)
    at System.Web.Util.CalliEventHandlerDelegateProxy.Callback(Object
    sender, EventArgs e)
    at System.Web.UI.Control.OnLoad(EventArgs e)
    at System.Web.UI.Control.LoadRecursive()
    at System.Web.UI.Page.ProcessRequestMain(Boolean
    includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)
    at System.Web.UI.Page.ProcessRequest(Boolean
    includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)
    at System.Web.UI.Page.ProcessRequest()
    at System.Web.UI.Page.ProcessRequestWithNoAssert(HttpContext
    context)
    at System.Web.UI.Page.ProcessRequest(HttpContext context)
    at
    ASP.administration_admin_security_aspx.ProcessRequest(HttpContext
    context)
    at
    System.Web.HttpApplication.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute()
    at System.Web.HttpApplication.ExecuteStep(IExecutionStep step,
    Boolean& completedSynchronously)

    Inner Exception: System.Security.SecurityException: Request for the
    permission of type 'System.Security.Permissions.FileIOPermission,
    mscorlib, Version=2.0.0.0, Culture=neutral,
    PublicKeyToken=b77a5c561934e089' failed.
    at System.Security.CodeAccessSecurityEngine.Check(Object demand,
    StackCrawlMark& stackMark, Boolean isPermSet)
    at System.Security.CodeAccessPermission.Demand()
    at System.IO.FileStream.Init(String path, FileMode mode, FileAccess
    access, Int32 rights, Boolean useRights, FileShare share, Int32
    bufferSize, FileOptions options, SECURITY_ATTRIBUTES secAttrs, String
    msgPath, Boolean bFromProxy)
    at System.IO.FileStream..ctor(String path, FileMode mode,
    FileAccess access, FileShare share)
    at
    System.Configuration.Internal.InternalConfigHost.StaticOpenStreamForRead(String
    streamName)
    at
    System.Configuration.Internal.InternalConfigHost.System.Configuration.Internal.IInternalConfigHost.OpenStreamForRead(String
    streamName, Boolean assertPermissions)
    at
    System.Configuration.Internal.InternalConfigHost.System.Configuration.Internal.IInternalConfigHost.OpenStreamForRead(String
    streamName)
    at
    System.Configuration.Internal.DelegatingConfigHost.OpenStreamForRead(String
    streamName)
    at System.Configuration.UpdateConfigHost.OpenStreamForRead(String
    streamName)
    at
    System.Configuration.BaseConfigurationRecord.InitConfigFromFile()
    The action that failed was:
    Demand
    The type of the first permission that failed was:
    System.Security.Permissions.FileIOPermission
    The Zone of the assembly that failed was:
    MyComputer




    On Tue, 14 Aug 2007 01:03:46 -0700, Alexey Smirnov
    <> wrote:

    >On Aug 14, 9:16 am, Mike <> wrote:
    >> Hi
    >>
    >> I have problem as folow:
    >>
    >> Caught Exception: System.Configuration.ConfigurationErrorsException:
    >> An error occurred loading a configuration file: Request for the
    >> permission of type 'System.Security.Permissions.FileIOPermission,
    >> mscorlib, Version=2.0.0.0, Culture=neutral,
    >> PublicKeyToken=b77a5c561934e089' failed. (machine.config) --->
    >> System.Security.SecurityException: Request for the permission of type
    >> 'System.Security.Permissions.FileIOPermission, mscorlib,
    >> Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089'
    >> failed.
    >>
    >> I am hosting www.1and1.comserver.
    >> This problem is noticed only on two pages, all others work well
    >>
    >> I tried to use folowing part of code within web configuration, but
    >> without success...
    >>
    >> <location allowOverride="true" path="~">
    >> <system.web>
    >>
    >> <trust level="Full" />
    >> </system.web>
    >>
    >> </location>
    >>
    >> Please help
    >>
    >> Thanks,
    >> Mike

    >
    >What code gives you that exception?
     
    Mike, Aug 14, 2007
    #3
  4. Re: Caught Exception: System.Configuration.ConfigurationErrorsException: An error occurred loading a configuration file: Request for the permission of type 'System.Security.Permissions.FileIOPermission, mscorlib, Version=2.0.0.0, Culture=neutral, Pub

    On Aug 14, 10:57 am, Mike <> wrote:
    > I am sorry Alexey, I am not sure that I uderstand a question...
    >
    > Here is the error in more details:
    >
    > Caught Exception: System.Configuration.ConfigurationErrorsException:
    > An error occurred loading a configuration file: Request for the
    > permission of type 'System.Security.Permissions.FileIOPermission,
    > mscorlib, Version=2.0.0.0, Culture=neutral,
    > PublicKeyToken=b77a5c561934e089' failed. (machine.config) --->
    > System.Security.SecurityException: Request for the permission of type
    > 'System.Security.Permissions.FileIOPermission, mscorlib,
    > Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089'
    > failed.


    Sorry, I was not clear about my question. I guess you have an error
    due to lack of privileges. What I want to know is what are you doing
    on two pages where you have this error message?
     
    Alexey Smirnov, Aug 14, 2007
    #4
  5. Mike

    Mike Guest

    Re: Caught Exception: System.Configuration.ConfigurationErrorsException: An error occurred loading a configuration file: Request for the permission of type 'System.Security.Permissions.FileIOPermission, mscorlib, Version=2.0.0.0, Culture=neutral, Pub

    1. On one of these pages I am reading values from appSetting of
    web.config file and update of the same values..

    2. On another one I am encrypting and decrypting web.config file...

    3. On third one I have only a Password recovery control.

    4. and on the last problematic page I am trying to use Create user
    wizard component.

    On these pages I am trying to write something and it is not only
    raeading. In order to resolve this I tried to change security
    permisons on the web.config file (write, modify, read, and read -
    execute) and but it didn't work...

    Thanks

    Mike


    On Tue, 14 Aug 2007 03:05:08 -0700, Alexey Smirnov
    <> wrote:

    >On Aug 14, 10:57 am, Mike <> wrote:
    >> I am sorry Alexey, I am not sure that I uderstand a question...
    >>
    >> Here is the error in more details:
    >>
    >> Caught Exception: System.Configuration.ConfigurationErrorsException:
    >> An error occurred loading a configuration file: Request for the
    >> permission of type 'System.Security.Permissions.FileIOPermission,
    >> mscorlib, Version=2.0.0.0, Culture=neutral,
    >> PublicKeyToken=b77a5c561934e089' failed. (machine.config) --->
    >> System.Security.SecurityException: Request for the permission of type
    >> 'System.Security.Permissions.FileIOPermission, mscorlib,
    >> Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089'
    >> failed.

    >
    >Sorry, I was not clear about my question. I guess you have an error
    >due to lack of privileges. What I want to know is what are you doing
    >on two pages where you have this error message?
     
    Mike, Aug 14, 2007
    #5
  6. Mike

    Mike Guest

    Re: Caught Exception: System.Configuration.ConfigurationErrorsException: An error occurred loading a configuration file: Request for the permission of type 'System.Security.Permissions.FileIOPermission, mscorlib, Version=2.0.0.0, Culture=neutral, Pub

    Anybody knows?

    Please help.

    thanks,
    Mike


    On Tue, 14 Aug 2007 14:41:12 +0200, Mike <> wrote:

    >
    >1. On one of these pages I am reading values from appSetting of
    >web.config file and update of the same values..
    >
    >2. On another one I am encrypting and decrypting web.config file...
    >
    >3. On third one I have only a Password recovery control.
    >
    >4. and on the last problematic page I am trying to use Create user
    >wizard component.
    >
    >On these pages I am trying to write something and it is not only
    >raeading. In order to resolve this I tried to change security
    >permisons on the web.config file (write, modify, read, and read -
    >execute) and but it didn't work...
    >
    >Thanks
    >
    >Mike
    >
    >
    >On Tue, 14 Aug 2007 03:05:08 -0700, Alexey Smirnov
    ><> wrote:
    >
    >>On Aug 14, 10:57 am, Mike <> wrote:
    >>> I am sorry Alexey, I am not sure that I uderstand a question...
    >>>
    >>> Here is the error in more details:
    >>>
    >>> Caught Exception: System.Configuration.ConfigurationErrorsException:
    >>> An error occurred loading a configuration file: Request for the
    >>> permission of type 'System.Security.Permissions.FileIOPermission,
    >>> mscorlib, Version=2.0.0.0, Culture=neutral,
    >>> PublicKeyToken=b77a5c561934e089' failed. (machine.config) --->
    >>> System.Security.SecurityException: Request for the permission of type
    >>> 'System.Security.Permissions.FileIOPermission, mscorlib,
    >>> Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089'
    >>> failed.

    >>
    >>Sorry, I was not clear about my question. I guess you have an error
    >>due to lack of privileges. What I want to know is what are you doing
    >>on two pages where you have this error message?
     
    Mike, Aug 15, 2007
    #6
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Liber
    Replies:
    4
    Views:
    4,924
    Tristan
    Sep 6, 2004
  2. Christopher Robert
    Replies:
    3
    Views:
    6,160
    =?Utf-8?B?V2lsbHlJbkF1cw==?=
    Feb 2, 2006
  3. Michael Schwarz
    Replies:
    4
    Views:
    17,007
    retsnom
    Dec 6, 2010
  4. Replies:
    4
    Views:
    4,494
  5. Matteo Mancini

    Piccolo con problema con il tipo float

    Matteo Mancini, Oct 8, 2007, in forum: Ruby
    Replies:
    3
    Views:
    247
    Jano Svitok
    Oct 8, 2007
Loading...

Share This Page