IIS site to view the garbled text file problem

Modify the web.config file:

<?xml version="1.0" encoding="UTF-8"?>
<configuration>
    <system.webServer>
        <directoryBrowse enabled="true" showFlags="Date, Time, Size, Extension, LongDate" />
        <staticContent>
            <remove fileExtension=".txt" />
            <mimeMap fileExtension=".txt" mimeType="text/plain;charset=utf-8" />
        </staticContent>
    </system.webServer>
</configuration>

Original Address: https://blog.csdn.net/youbl/article/details/78028092

Guess you like

Origin www.cnblogs.com/stgp/p/12036480.html