.Net Web.Config文件常用配置

1.跨域访问配置

<system.webServer>
<httpProtocol>
<customHeaders>
<add name="Access-Control-Allow-Credentials" value="true"/>
<add name="Access-Control-Allow-Origin" value="http://192.168.4.30" />
<add name="Access-Control-Allow-Headers" value="token" />
<add name="Access-Control-Allow-Methods" value="GET, POST, PUT, DELETE, OPTIONS" />
</customHeaders>
</httpProtocol>
</system.webServer>

2.文件路径包含空格、+导致文件无法访问


<system.webServer>
<security>
<requestFiltering allowDoubleEscaping="true"></requestFiltering>
</security>
</system.webServer>

3.System.UnauthorizedAccessException: 对路径“C:\\Windows\\SysWOW64\\inetsrvlogs”的访问被拒绝
<system.Web>
<identity impersonate="true" />
<system.Web>

posted on 2020-08-17 14:28  CeleryCabbage  阅读(260)  评论(0编辑  收藏  举报

导航