转换为 标签在浏览器中变成图像文件?" />

ASP.NET 和 IIS 如何将 转换为 标签在浏览器中变成图像文件?

发布于 2024-10-13 19:30:20 字数 232 浏览 10 评论 0 原文

ASP.NET 和 IIS 如何将 标记转换为浏览器中的图像文件?

我假设它根据路径找到文件并呈现 FileStream。我没有看到在 web.config 中注册任何处理程序,并且我的 IIS6 配置没有任何有关 .jpg、.gif、.png 等扩展名的内容。

编辑: 另外,这个过程如何定制?

How does ASP.NET and IIS transform an <img src="localresource.jpg"> tag turn into an image file in the browser?

I am assuming that it locates the file based on the path and renders a FileStream. I don't see any handlers registered in web.config and my IIS6 configuration doesn't have anything about .jpg, .gif, .png, etc. extensions.

Edit:
Also, how can this process be customized?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

香草可樂 2024-10-20 19:30:20

浏览器发送对 /path/to/page/localresource.jpg 的请求。

IIS 找到该文件,在其默认 MIME 类型映射中查找 .jpg 的 MIME 类型,然后提供该文件。
ASP.Net 和 .Net 框架都不涉及。 (除非你将它们设置为)

The browser sends a request for /path/to/page/localresource.jpg.

IIS finds the file, looks up the MIME type for .jpg in its default MIME-type mapping, and serves the file.
Neither ASP.Net nor the .Net framework are involved. (unless you set them to be)

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文