While accessing localhost gives an error unable to read the security policy file for trust level 'wss_custom'

enter image description here

2 Answers 2


Looks like SharePoint is unable to read the wss_custom security policy. You have to check the Web.config files on all web front end make sure that the trust level is set properly.

i.e. something like this

<trustLevel name="WSS_Custom" policyFile="C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\12\config\wss_custom.config" />

On this path, make sure you have correct wss_custom.config file and lastly it is properly registered.

Check the more detail here: http://techsolutions-at-desk.blogspot.com/2011/08/how-to-create-new-custom-trust-level.html

  • I could not access your link
    Jan 28, 2019 at 16:07
  • what error you are getting? but did you check if your custom config file is in place and correct
    – Waqas Sarwar MVP
    Jan 28, 2019 at 16:11
  • I have 2 WFE servers and i dont see wss_custom.config
    Jan 28, 2019 at 16:23
  • that is problem, if you setup custom policy then this file should be there. or revert it to back.
    – Waqas Sarwar MVP
    Jan 28, 2019 at 17:04
  • An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code
    Jan 28, 2019 at 19:07

enter image description here

Source Error:

An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.

Stack Trace:

[HttpException (0x80004005): Unable to read the security policy file for trust level 'WSS_Custom'.]
System.Web.HttpRuntime.SetTrustLevel(TrustSection trustSection, SecurityPolicySection securityPolicySection) +11467590
System.Web.HttpRuntime.HostingInit(HostingEnvironmentFlags hostingFlags) +11481518

[HttpException (0x80004005): Unable to read the security policy file for trust level 'WSS_Custom'.]
System.Web.HttpRuntime.FirstRequestInit(HttpContext context) +11432982 System.Web.HttpRuntime.EnsureFirstRequestInit(HttpContext context) +88 System.Web.HttpRuntime.ProcessRequestNotificationPrivate(IIS7WorkerRequest wr, HttpContext context) +4408276

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.