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


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

查看所有标签

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

创业小败局

创业小败局

创业家、i黑马 / 时代华文书局 / 2014-8-1 / 42.00元

让别人的失败,成为你的成功之母! 《创业小败局》由徐小平、何伯权等六位经验丰富的业界大佬,从《创业家》五年来跟踪的数千个创业案例中,精心挑选而来。21个最具代表性的失败案例,每个案例都代表了一种最常见的失败规律,也基本上覆盖了当下中国创业浪潮中,最容易遭遇的创业陷阱。失 败是有规律的。有时候创业者的选择和 行为,必然会导致失败,但当事人却因为缺乏经验而没有察觉。比如在错误心态下引入错误的合伙......一起来看看 《创业小败局》 这本书的介绍吧!

RGB HSV 转换
RGB HSV 转换

RGB HSV 互转工具

RGB CMYK 转换工具
RGB CMYK 转换工具

RGB CMYK 互转工具

HEX CMYK 转换工具
HEX CMYK 转换工具

HEX CMYK 互转工具