ASP.NET Core 预览图片PDF
1、站点下新建一个应用程序,设置物理路径指向文件夹位置
2、设置HTTP响应标头
3、设置web.config文件
<?xml version="1.0" encoding="UTF-8"?> <configuration> <system.webServer> <httpProtocol> <customHeaders> <add name="content-disposition" value="inline" /> </customHeaders> </httpProtocol> <handlers> <remove name="aspNetCore" /> </handlers> </system.webServer> </configuration>