467,890 Members | 1,806 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 467,890 developers. It's quick & easy.

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, PublicK

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
Aug 14 '07 #1
  • viewed: 11691
Share:
3 Replies
On Aug 14, 9:16 am, Mike <ablyp...@yahoo.comwrote:
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?

Aug 14 '07 #2
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(Obj ect 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.S taticOpenStreamForRead(String
streamName)
at
System.Configuration.Internal.InternalConfigHost.S ystem.Configuration.Internal.IInternalConfigHost.O penStreamForRead(String
streamName, Boolean assertPermissions)
at
System.Configuration.Internal.InternalConfigHost.S ystem.Configuration.Internal.IInternalConfigHost.O penStreamForRead(String
streamName)
at
System.Configuration.Internal.DelegatingConfigHost .OpenStreamForRead(String
streamName)
at System.Configuration.UpdateConfigHost.OpenStreamFo rRead(String
streamName)
at
System.Configuration.BaseConfigurationRecord.InitC onfigFromFile()
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.Thr owIfErrors(Boolean
ignoreLocal)
at
System.Configuration.BaseConfigurationRecord.Throw IfParseErrors(ConfigurationSchemaErrors
schemaErrors)
at System.Configuration.Configuration..ctor(String locationSubPath,
Type typeConfigHost, Object[] hostInitConfigurationParams)
at
System.Configuration.Internal.InternalConfigConfig urationFactory.System.Configuration.Internal.IInte rnalConfigConfigurationFactory.Create(Type
typeConfigHost, Object[] hostInitConfigurationParams)
at
System.Web.Configuration.WebConfigurationHost.Open Configuration(WebLevel
webLevel, ConfigurationFileMap fileMap, VirtualPath path, String site,
String locationSubPath, String server, String userName, String
password, IntPtr tokenHandle)
at
System.Web.Configuration.WebConfigurationManager.O penWebConfigurationImpl(WebLevel
webLevel, ConfigurationFileMap fileMap, String path, String site,
String locationSubPath, String server, String userName, String
password, IntPtr userToken)
at
System.Web.Configuration.WebConfigurationManager.O penWebConfiguration(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.Cal lback(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(Http Context
context)
at System.Web.UI.Page.ProcessRequest(HttpContext context)
at
ASP.administration_admin_security_aspx.ProcessRequ est(HttpContext
context)
at
System.Web.HttpApplication.CallHandlerExecutionSte p.System.Web.HttpApplication.IExecutionStep.Execut e()
at System.Web.HttpApplication.ExecuteStep(IExecutionS tep 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(Obj ect 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.S taticOpenStreamForRead(String
streamName)
at
System.Configuration.Internal.InternalConfigHost.S ystem.Configuration.Internal.IInternalConfigHost.O penStreamForRead(String
streamName, Boolean assertPermissions)
at
System.Configuration.Internal.InternalConfigHost.S ystem.Configuration.Internal.IInternalConfigHost.O penStreamForRead(String
streamName)
at
System.Configuration.Internal.DelegatingConfigHost .OpenStreamForRead(String
streamName)
at System.Configuration.UpdateConfigHost.OpenStreamFo rRead(String
streamName)
at
System.Configuration.BaseConfigurationRecord.InitC onfigFromFile()
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
<al************@gmail.comwrote:
>On Aug 14, 9:16 am, Mike <ablyp...@yahoo.comwrote:
>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?
Aug 14 '07 #3
On Aug 14, 10:57 am, Mike <ablyp...@yahoo.comwrote:
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?

Aug 14 '07 #4

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

3 posts views Thread by Sai Pavan | last post: by
2 posts views Thread by Squeeze | last post: by
reply views Thread by MrMoon | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.