GoDaddy hosting - How to solve Security Exception

孤街醉人 提交于 2019-12-05 05:33:05

If you use MVC 5 it is because MVC 5 no longer supports partial trust. You can Add this line to web.config file in section to grant full trust to code execution policy:

<system.Web>
...
    <trust level="Full"/>
...
</system.Web>

This can be done by two ways. 1 - Add following code in WebConfig <system.web> <trust level="Full" /> </system.web>

2- Go to Tools > NuGet Package Manager > Manage NuGet Packages for Solution in Visual Studio Find “DotNetCompilerPlatform” and uninstall it if present.

OK I found the solution. I had to change CAS trust level from medium to full in the settings. https://support.godaddy.com/help/article/8999/do-your-hosting-accounts-support-mvc4-and-mcv5-applications?countrysite=uk

thanks friend, in my case I had to do the 3 things, change the web.config so... trust level="Full" processRequestInApplicationTrust="false", , uninstall the "DotNetCompilerPlatform", and change the confidence level CAS on the server

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