asp.net - 如何更改 Asp.Net Core 3.1 web.config 文件中的默认信任设置?
问题描述
我在托管公司提供的服务器上部署了我的 Asp Net Core 3.1 项目。首先,我的项目没有问题,但我的托管公司更改了 IIS 安全选项。完全信任选项转换为中。之后,当我进入我的网站时,我得到500 Internal Server Error。我能做些什么?如何更改默认的 Asp Core Trust 选项?
错误:
HTTP 错误 500.19 - 内部服务器错误
无法访问请求的页面,因为该页面的相关配置数据无效。
<?xml version="1.0" encoding="utf-8"?>
<location path="." allowOverride="true">
<system.web>
<securityPolicy>
<trustLevel name="Full" policyFile="internal" />
<trustLevel name="High" policyFile="web_hightrust.config" />
<trustLevel name="Medium" policyFile="web_mediumtrust.config" />
<trustLevel name="Low" policyFile="web_lowtrust.config" />
<trustLevel name="Minimal"
policyFile="web_minimaltrust.config" />
</securityPolicy>
<trust level="Medium" originUrl="" />
</system.web>
<system.webServer>
<httpErrors errorMode="Detailed" />
<handlers>
<add name="aspNetCore" path="*" verb="*" modules="AspNetCoreModule" resourceType="Unspecified" />
</handlers>
<aspNetCore processPath=".\admin.exe" arguments="" stdoutLogEnabled="false" hostingModel="InProcess" stdoutLogFile=".\logs\stdout">
<environmentVariables>
<environmentVariable name="ASPNETCORE_ENVIRONMENT" value="Development" />
</environmentVariables>
</aspNetCore>
<!-- maxAllowedContentLength = 1GB (the value is in Bytes) -->
<security>
<requestFiltering>
<requestLimits maxAllowedContentLength="1073741824" />
</requestFiltering>
</security>
</system.webServer>
</location>
编辑
你好,我们又见面了。一天后,当我进入网站时,我看到我的问题解决了。为什么?真的,我不知道:)
解决方案
推荐阅读
- sql-server - 系统表 sys.dm_db_xtp_table_memory_stats 导致的数据库属性响应缓慢
- python - Joblib 不在多核上运行
- coq - 作者在 cpdt book 练习中的数据类型是什么意思?
- java - HttpServletRequest 参数映射始终为空
- agm-map - 当我更新在 agm 地图中不起作用的任何多边形 polyPathsChange 方法时
- python-3.x - 将熊猫数据框保存为 csv - python
- angular - 建议和安全规则的分布式计数器/喜欢或投票
- sql - 使用 JOIN 和 GROUP BY 返回结果平均值的 SQL 查询
- python - 为什么这行得通??元类,模型 = 用户
- html - Angular 1.4:进度条无法正常工作