【问题标题】:server.transfer between applicationsserver.transfer 在应用程序之间
【发布时间】:2013-01-02 18:07:07
【问题描述】:

我在 1 个解决方案下有 3 个应用程序,结构如下,

WebSoln,

  • WebApp > Default.aspx
  • SSOApp > SSO.aspx(仅包含重定向到 Default.aspx)
  • TestApp > Test.aspx 页面

我已将 TestApp 设置为启动项目,现在我需要以下流程。当我单击 Test.aspx 页面中的提交按钮时,它应该转到 SSOApp > SSO.aspx,而这又应该重定向到 WebApp 下的 Default.aspx 页面。

如何在应用程序之间传输,我正在尝试使用 Server.Transfer,我不确定应该使用哪个 URL。能否请您给我一个可以帮助我在应用程序之间转移的 URL。

【问题讨论】:

    标签: asp.net web-applications webforms response.redirect server.transfer


    【解决方案1】:

    Server.Transfer 仅适用于同一应用程序。您应该使用Response.Redirect 方法在另一个应用程序中重定向页面。

    Why we cant use Server.Transfer() to redirect on another server

    Will Server.Transfer work across AppDomains/Web Applications?

    假设您在同一个 iis 中有两个应用程序。

    例如:Response.Redirect("http://server/otherapp/default.aspx");

    【讨论】:

    猜你喜欢
    • 1970-01-01
    • 2011-08-12
    • 2016-05-17
    • 2012-09-07
    • 1970-01-01
    • 1970-01-01
    • 2011-10-10
    • 2014-01-12
    • 2020-06-08
    相关资源
    最近更新 更多