c# – 为中等信任级别编译MVC应用程序

栏目: ASP.NET · 发布时间: 7年前

内容简介:确切知道的唯一方法是运行它并找出答案.翻译自:https://stackoverflow.com/questions/14676964/compiling-mvc-application-for-medium-trust-level
我正在尝试将ASP.NET MVC4站点部署到HostGator共享 Windows

主机.当他们的技术支持告诉我必须编译我的应用程序以获得中等安全性时,我遇到了一些麻烦.

据我所知,设置应用程序的信任级别的唯一方法是设置<trust level =“Medium”>在machine.config或web.config中.假设这个我错了,是否有另一种方法来编译我的中等信任应用程序?

基于我最初的假设,以及我在 this page 上找到的信息,我将信任级别添加到了我的web.config:

By default, Web applications run with full trust and have  unrestricted permissions. To modify code access security trust levels  in ASP.NET, you have to set a switch in the Machine.config file or the  application-level Web.config file and configure the application as a  partial-trust application. I put the trust level in my web.config and  get this error message form the host:
Parser Error Message: This configuration section cannot be used at  this path. This happens when the site administrator has locked access  to this section using from an  inherited configuration file.

然而HostGator仍然坚持我编译中等信任,有没有人对我这个主题有任何建议?

确切知道的唯一方法是运行它并找出答案.

翻译自:https://stackoverflow.com/questions/14676964/compiling-mvc-application-for-medium-trust-level


以上就是本文的全部内容,希望对大家的学习有所帮助,也希望大家多多支持 码农网

查看所有标签

猜你喜欢:

本站部分资源来源于网络,本站转载出于传递更多信息之目的,版权归原作者或者来源机构所有,如转载稿涉及版权问题,请联系我们

从Python开始学编程

从Python开始学编程

Vamei / 电子工业出版社 / 2016-11-24 / CNY 49.00

改编自Vamei博客的《Python快速教程》。本书以Python为样本,不仅介绍了编程的基本概念,还着重讲解编程语言的主流范式:面向过程、面向对象、面向函数。读者不仅可以轻松学会Python,以后再学习其他编程语言时也会更加容易。一起来看看 《从Python开始学编程》 这本书的介绍吧!

JSON 在线解析
JSON 在线解析

在线 JSON 格式化工具

SHA 加密
SHA 加密

SHA 加密工具

HSV CMYK 转换工具
HSV CMYK 转换工具

HSV CMYK互换工具