发送 HTTP 标头后无法重定向

发布于 2024-09-13 00:58:52 字数 307 浏览 5 评论 0原文

我正在使用 MVCContrib 及其 EmailTemplateService 发送 html 电子邮件。 发送电子邮件工作正常,但似乎无法正确处理电子邮件视图。当我尝试重定向到新操作时,出现以下错误:

“发送 HTTP 标头后无法重定向”

有谁知道如何解决此问题。非常感谢

桑德拉

I'm using MVCContrib and its EmailTemplateService to send html email.
Send email works fine but it doesn't seem to dispose email view properly. When I try to redirect to a new Action it gives the following error:

"Cannot redirect after HTTP headers have been sent"

Does anyone know how to fix this problem. Many thanks

Sandra

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

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

发布评论

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

评论(1

烙印 2024-09-20 00:58:52

试试这个:

if (!Response.IsRequestBeingRedirected)
    //do the redirect

Try this:

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