This project is read-only.

Server Error in '/' Application.

Topics: Support Request
May 9, 2009 at 3:35 AM

I don't have any trust overrides in web.config.
It is shared hosting enviorment.
IUSER write permission to all the folders. (as confirmed by hosting support)

I am still getting the following error.

Server Error in '/' Application.
--------------------------------------------------------------------------------

Security Exception
Description: The application attempted to perform an operation not allowed by the security policy. To grant this application the required permission please contact your system administrator or change the application's trust level in the configuration file.

Exception Details: System.Security.SecurityException: Request for the permission of type 'System.Security.Permissions.SecurityPermission, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089' failed.

Source Error:


[No relevant source lines]


Source File: App_Web_vi4nf8sj.7.cs Line: 0

Stack Trace:


[SecurityException: Request for the permission of type 'System.Security.Permissions.SecurityPermission, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089' failed.]
System.Security.CodeAccessSecurityEngine.Check(Object demand, StackCrawlMark& stackMark, Boolean isPermSet) +0
System.Security.CodeAccessPermission.Demand() +58
System.Diagnostics.ListenerElementsCollection.GetRuntimeObject() +225
System.Diagnostics.TraceInternal.get_Listeners() +163
System.Diagnostics.TraceInternal.WriteLine(String message, String category) +108
System.Diagnostics.Trace.WriteLine(String message, String category) +4
System.Web.TraceContext.Write(String category, String message, Exception errorInfo, Boolean isWarning, Boolean writeToDiagnostics) +975
System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +6785
System.Web.UI.Page.ProcessRequest(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +242
System.Web.UI.Page.ProcessRequest() +80
System.Web.UI.Page.ProcessRequestWithNoAssert(HttpContext context) +21
System.Web.UI.Page.ProcessRequest(HttpContext context) +49
ASP.default_aspx.ProcessRequest(HttpContext context) in App_Web_vi4nf8sj.7.cs:0
System.Web.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() +181
System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) +75




--------------------------------------------------------------------------------
Version Information: Microsoft .NET Framework Version:2.0.50727.3074; ASP.NET Version:2.0.50727.3074

May 9, 2009 at 10:27 AM
Tracing is enabled.. which is not allowed in medium security.. I need to search a bit on how to disable. I'll get back to you.
May 11, 2009 at 2:23 PM
Make sure the following is added to the web.config

  <system.diagnostics>
    <assert assertuienabled="false"/>
    <trace autoflush="false" indentsize="4">
    </trace>
  </system.diagnostics>