【问题标题】:How to get the full request URL in asp.net如何在 asp.net 中获取完整的请求 URL
【发布时间】:2016-11-30 21:51:33
【问题描述】:

我们正在使用断开连接的架构。前端是 ExtJs,后端我们使用处理程序 (.ashx)。假设我将 url 指定为“https://appdomain.com/#settings/department/sso”,我如何从后端获取完整的 url 名称。 我尝试使用 HttpContext.Current.Request.Url.AbsoluteUri 但它只返回 “https://appdomain.com”,假设我给“https://appdomain.com/loginpage.aspx” 我们可以使用 HttpContext.Current.Request.Url.AbsoluteUri 轻松检索。 请问有人试过吗?

【问题讨论】:

标签: asp.net url


【解决方案1】:

您无法获取#settings/department/sso 部分。
# 之后的任何内容都不会发送到服务器。

【讨论】:

  • 谢谢亚历克斯。但是当我给 response.redirect("appdomain.com/#settings/department/sso") 它重定向到正确的路径。所以我也应该得到路径 rt?
  • 对不起,我不明白你的评论
  • 对不起,我的意思是-当我给出 response.redirect("appdomain.com/#settings/department/sso") 它重定向到正确的路径。所以我应该从后端 rt 获取路径?
  • 是的,因为您是从服务器端发送的。 # 之后无法从访问过的页面获取任何内容
猜你喜欢
  • 2017-07-09
  • 2013-06-08
  • 2015-10-28
  • 1970-01-01
  • 2015-03-29
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 2012-02-24
相关资源
最近更新 更多