1. Launch the Internet Information Services MMC.
2. Right click on your web site and click properties.
3. In the 'HTTP Headers' tab click 'MIME Types...' button.
4. Add a new MIME type by clicking 'New...' button.
5. In the 'Extension' edit control type (without the quotes) '.tmp'.
6. In the 'MIME type' edit control type (without the quotes) 'temp'.
Or run the following command at command prompt:
%systemdrive%/inetpub/adminscripts/adsutil.vbs set w3svc/1/root/MimeMap .tmp,temp
The above command changes the MIME type for the default web site. For information on changing the MIME types of non-default web sites please refer to "REFERENCES" section.
The above steps will allow .tmp files to be served up by IIS. On a development machine where web project are created this is usually not a security concern.
However if you have .tmp which contain sensitive data which you do not want exposed, you will have to reverse the above 6 steps.
If the mime entry for .tmp file is deleted after creating the project you will receive a http 404 error when you try to reopen the project. So you will haveadd .tmp mime type before you open the project and remove it after opening the project.
本文介绍了在Internet Information Services MMC中设置.tmp文件MIME类型的步骤,还给出了命令行操作方法。指出在开发机上设置通常无安全问题,但含敏感数据的.tmp文件需反向操作。同时提醒删除.tmp的mime条目后重新打开项目会报错,需在打开前后添加和移除该MIME类型。
5253

被折叠的 条评论
为什么被折叠?



