在之前的版本中,所有这些设置都可以通过像下面这样的代码在Web.Config文件中添加和调整:
然而,在ASP.NET vNext中,Web.Config已不再存在,那么如何调整此类设置呢?我在网上搜索了StackOverflow和ASP.NET Github仓库,但没有找到任何相关的信息 - 有任何想法吗?
<staticContent>
<mimeMap fileExtension=".webp" mimeType="image/webp" />
<!-- Caching -->
<clientCache cacheControlMode="UseMaxAge" cacheControlMaxAge="96:00:00" />
</staticContent>
<httpCompression directory="%SystemDrive%\inetpub\temp\IIS Temporary Compressed Files">
<scheme name="gzip" dll="%Windir%\system32\inetsrv\gzip.dll" />
<dynamicTypes>
<add mimeType="text/*" enabled="true" />
<add mimeType="message/*" enabled="true" />
<add mimeType="application/javascript" enabled="true" />
<add mimeType="*/*" enabled="false" />
</dynamicTypes>
<staticTypes>
<add mimeType="text/*" enabled="true" />
<add mimeType="message/*" enabled="true" />
<add mimeType="application/javascript" enabled="true" />
<add mimeType="*/*" enabled="false" />
</staticTypes>
</httpCompression>
<urlCompression doStaticCompression="true" doDynamicCompression="true"/>
然而,在ASP.NET vNext中,Web.Config已不再存在,那么如何调整此类设置呢?我在网上搜索了StackOverflow和ASP.NET Github仓库,但没有找到任何相关的信息 - 有任何想法吗?