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


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

查看所有标签

猜你喜欢:

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

Node.js:来一打 C++ 扩展

Node.js:来一打 C++ 扩展

死月 / 电子工业出版社 / 2018-6-1 / 109

Node.js 作为近几年新兴的一种编程运行时,托 V8 引擎的福,在作为后端服务时有比较高的运行效率,在很多场景下对于我们的日常开发足够用了。不过,它还为开发者开了一个使用C++ 开发 Node.js 原生扩展的口子,让开发者进行项目开发时有了更多的选择。 《Node.js:来一打 C++ 扩展》以 Chrome V8 的知识作为基础,配合 GYP 的一些内容,将教会大家如何使用 Node......一起来看看 《Node.js:来一打 C++ 扩展》 这本书的介绍吧!

JSON 在线解析
JSON 在线解析

在线 JSON 格式化工具

XML 在线格式化
XML 在线格式化

在线 XML 格式化压缩工具

HEX HSV 转换工具
HEX HSV 转换工具

HEX HSV 互换工具