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(Obj ect 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.GetAssembli esForAppLevel()
at System.Web.Compilation.BuildManager.GetType(String typeName, Boolean
throwOnError, Boolean ignoreCase)
at System.Web.UI.WebControls.ObjectDataSourceView.Get Type(String
typeName)
at
System.Web.UI.WebControls.ObjectDataSourceView.Exe cuteSelect(DataSourceSelectArguments
arguments)
at System.Web.UI.WebControls.ListControl.OnDataBindin g(EventArgs e)
at System.Web.UI.WebControls.ListControl.PerformSelec t()
at System.Web.UI.WebControls.BaseDataBoundControl.Dat aBind()
at System.Web.UI.WebControls.BaseDataBoundControl.Ens ureDataBound()
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(Http Context context)
at System.Web.UI.Page.ProcessRequest(HttpContext context)
at ASP.client_client_waiting_aspx.ProcessRequest(Http Context context) in
c:\windows\Microsoft.NET\Framework\v2.0.50727\Temp orary ASP.NET
Files\pro\5933c039\9943c336\App_Web_ow7vcou3.1.cs: line 0
at
System.Web.HttpApplication.CallHandlerExecutionSte p.System.Web.HttpApplication.IExecutionStep.Execut e()
at System.Web.HttpApplication.ExecuteStep(IExecutionS tep 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