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

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

内容简介:确切知道的唯一方法是运行它并找出答案.翻译自: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


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

查看所有标签

猜你喜欢:

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

ActionScript 3.0 Cookbook中文版

ActionScript 3.0 Cookbook中文版

Joey Lott、Adobe Dev Library / 陈建勋 / 电子工业 / 2007-11-01 / 78.00元

本书讨论了在Flash Player里执行的ActionScript3.0语言,采用问题—解法—讨论的形式讲解开发过程中常见问题的实际解法,例如:检测用户的 Flash Player 版本或操作系统;格式化日期和货币类型;接受用户输入及操作文字字符串;在运行时绘制各种形状;访问音频和视频;使用 Flash Remoting 进行远程过程调用;加载、发送和检索 XML 数据等。 全书涵盖客户端......一起来看看 《ActionScript 3.0 Cookbook中文版》 这本书的介绍吧!

正则表达式在线测试
正则表达式在线测试

正则表达式在线测试

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

RGB CMYK 互转工具

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

HSV CMYK互换工具