A
alf
I have an app that was running in my local server using full trust, now I
moved it to hosting company wish run in Medium trust.
Then I get a Security exception (details below)
Then I configured my local server to run in Medium level, trying to catch
the problem in the app. The problem is that the behavior is random !!
sometime all pages run succesfully, but some time I get the exception in any
page.
I'm trying to find a way to debug the app, no break is done in the app
running in debug mode, only a exception is throw when I "throw all"
exceptions but the code showed is in assembly mode.. no way to know wich
line of my code generate the exception.
any idea or suggestion where to find ???
Thanks a lot.
Type: System.Security.SecurityException
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.Path.GetFullPath(String path)
at System.Web.Util.FileUtil.IsSuspiciousPhysicalPath(String physicalPath,
Boolean& pathTooLong)
at System.Web.Util.FileUtil.IsSuspiciousPhysicalPath(String physicalPath)
at System.Web.CachedPathData.GetConfigPathData(String configPath)
at System.Web.CachedPathData.GetConfigPathData(String configPath)
at System.Web.Compilation.CompilationUtil.GetAssembliesForAppLevel()
at System.Web.Compilation.BuildManager.GetType(String typeName, Boolean
throwOnError, Boolean ignoreCase)
at System.Web.UI.WebControls.ObjectDataSourceView.GetType(String
typeName)
at
System.Web.UI.WebControls.ObjectDataSourceView.ExecuteSelect(DataSourceSelectArguments
arguments)
at System.Web.UI.WebControls.ListControl.OnDataBinding(EventArgs e)
at System.Web.UI.WebControls.ListControl.PerformSelect()
at System.Web.UI.WebControls.BaseDataBoundControl.DataBind()
at System.Web.UI.WebControls.BaseDataBoundControl.EnsureDataBound()
at System.Web.UI.WebControls.ListControl.OnPreRender(EventArgs e)
at System.Web.UI.Control.PreRenderRecursiveInternal()
at System.Web.UI.Control.PreRenderRecursiveInternal()
at System.Web.UI.Control.PreRenderRecursiveInternal()
at System.Web.UI.Control.PreRenderRecursiveInternal()
at System.Web.UI.Control.PreRenderRecursiveInternal()
at System.Web.UI.Control.PreRenderRecursiveInternal()
at System.Web.UI.Control.PreRenderRecursiveInternal()
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.client_client_waiting_aspx.ProcessRequest(HttpContext context) in
c:\windows\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET
Files\pro\5933c039\9943c336\App_Web_ow7vcou3.1.cs:line 0
at
System.Web.HttpApplication.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute()
at System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean&
completedSynchronously)
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
moved it to hosting company wish run in Medium trust.
Then I get a Security exception (details below)
Then I configured my local server to run in Medium level, trying to catch
the problem in the app. The problem is that the behavior is random !!
sometime all pages run succesfully, but some time I get the exception in any
page.
I'm trying to find a way to debug the app, no break is done in the app
running in debug mode, only a exception is throw when I "throw all"
exceptions but the code showed is in assembly mode.. no way to know wich
line of my code generate the exception.
any idea or suggestion where to find ???
Thanks a lot.
Type: System.Security.SecurityException
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.Path.GetFullPath(String path)
at System.Web.Util.FileUtil.IsSuspiciousPhysicalPath(String physicalPath,
Boolean& pathTooLong)
at System.Web.Util.FileUtil.IsSuspiciousPhysicalPath(String physicalPath)
at System.Web.CachedPathData.GetConfigPathData(String configPath)
at System.Web.CachedPathData.GetConfigPathData(String configPath)
at System.Web.Compilation.CompilationUtil.GetAssembliesForAppLevel()
at System.Web.Compilation.BuildManager.GetType(String typeName, Boolean
throwOnError, Boolean ignoreCase)
at System.Web.UI.WebControls.ObjectDataSourceView.GetType(String
typeName)
at
System.Web.UI.WebControls.ObjectDataSourceView.ExecuteSelect(DataSourceSelectArguments
arguments)
at System.Web.UI.WebControls.ListControl.OnDataBinding(EventArgs e)
at System.Web.UI.WebControls.ListControl.PerformSelect()
at System.Web.UI.WebControls.BaseDataBoundControl.DataBind()
at System.Web.UI.WebControls.BaseDataBoundControl.EnsureDataBound()
at System.Web.UI.WebControls.ListControl.OnPreRender(EventArgs e)
at System.Web.UI.Control.PreRenderRecursiveInternal()
at System.Web.UI.Control.PreRenderRecursiveInternal()
at System.Web.UI.Control.PreRenderRecursiveInternal()
at System.Web.UI.Control.PreRenderRecursiveInternal()
at System.Web.UI.Control.PreRenderRecursiveInternal()
at System.Web.UI.Control.PreRenderRecursiveInternal()
at System.Web.UI.Control.PreRenderRecursiveInternal()
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.client_client_waiting_aspx.ProcessRequest(HttpContext context) in
c:\windows\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET
Files\pro\5933c039\9943c336\App_Web_ow7vcou3.1.cs:line 0
at
System.Web.HttpApplication.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute()
at System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean&
completedSynchronously)
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