SecurityException thrown on deployment

点点圈 提交于 2019-12-02 05:21:55

It seems like the problem is the "Trust level". You need to specify which trustlevel you require in your web.config for your site. The problem though is that GoDaddy might not allow the trust level that your site requires. One of the trust levels allows/disallows e.g. reflection(e.g. IoC containers use reflection or AutoMapper).

The trust level thing is something Microsoft has stated that they do not support anymore, so any bugfixes etc that makes it unsecure is no longer fixed. So one solution might be to find another webhost is the change to the web.config doesn't fix your problem.

Example config:

<system.web>
  <securityPolicy>
    <trustLevel name="Full" policyFile="internal"/>
  </securityPolicy>
</system.web>

This appears to be an issue with a mismatch between the version of .NET I'm using to build my app and the one provided on the host.

Thank you Microsoft for another error message that seems to tell me nothing about what the underlying issue is.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!