asp.net - 为什么在添加新的响应头时得到 "Platform Not Supported Exception"?

标签 asp.net asp.net-mvc iis

为什么在添加新的响应头时出现“平台不受支持的异常”?我正在使用Visual Studio Web服务器调试网站。

Response.Headers["X-XRDS-Location"] = url

异常消息:

This operation requires IIS integrated pipeline mode.



任何帮助,将不胜感激。

最佳答案

Response.Headers.Add()仅在IIS7集成管道模式下工作。使用Response.AddHeader()代替。此方法适用于所有平台。

关于asp.net - 为什么在添加新的响应头时得到 "Platform Not Supported Exception"?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/833030/

相关文章:

sharepoint - IIS 6 : Set up 2 SSL web apps on the same server on port 443

asp.net - 将 IIS7 url 重写部分移出 web.config 文件

javascript - 将数据从 MVC Controller 传递到 Angular View ,而不在最终 html 中显示数据值

php - 如何让 PHP 与 ADOdb 和 MySQL 一起工作?

asp.net-mvc - 在MVC中将DropDownList添加到kendo网格

asp.net-mvc - ASP.Net MVC 和 Webservices/Ajax - 走哪条路?

asp.net-mvc - IIS劫持CORS Preflight OPTIONS请求

c# - 查询返回匿名类型列表,需要值列表

c# - 行尾有空白

asp.net - 资源不会自动从 Https 加载 - SecuritySwitch