Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我有一个正在调用 WCF 服务的 .NET MVC 应用程序。我需要在 MVC 应用程序的 HTTP 标头中包含一个 JWT 令牌,并在 WCF 应用程序中解码该令牌。绑定是basicHttpBinding。我将不胜感激任何建议...
假设你在控制器方法里面写:
ControllerContext.HttpContext.Response.AddHeader("name","value")
我终于设法找到了解决方案,并通过 SOAP 标头发送了令牌。
为此,我只需要添加
<headers> <headerName>Value</headerName> </headers>