相关疑难解决方法(0)

在ASP.NET中获取HTTP Referrer

我在寻找获得浏览器的快捷,方便和可靠的方式HTTP推荐ASP.Net(C# ).我知道HTTP推荐本身是不可靠的,但我确实希望得到引荐,如果它的可靠方法存在.

c# asp.net http-referer http http-headers

98
推荐指数
6
解决办法
17万
查看次数

asp.net,url重写模块和web.config

我在IIS7(Vista)上使用带有.NET 3.5的ASP.net和Microsoft的URL重写模块.

这意味着,我有一个

<system.webServer>
    <rewrite>...</rewrite>
    ...
</system.webServer>
Run Code Online (Sandbox Code Playgroud)

web.config中的部分,但我得到一个警告,在system.webServer中,不允许使用元素"rewrite".

如何配置我的系统允许(甚至可能有Intellisense)在web.config的重写部分?

谢谢Christoph

asp.net url rewrite module web-config

31
推荐指数
1
解决办法
3万
查看次数

获取浏览器中显示的当前 URL

目前我正在尝试获取浏览器中显示的当前 URL。

如果我使用

Request.Path 
Run Code Online (Sandbox Code Playgroud)

我得到https://this.website.com:443/Default.aspx,这在技术上是正确的。

但是浏览器本身显示的 URL 是https://this.website.com/

使用任何请求选项仍将显示 Default.aspx。

我需要最终检测浏览器中的 url 是否为https://this.website.comhttp://this.website.com/Default.aspx,然后重定向到 Default.aspx(如果不存在)。

顺便说一句,更复杂的是我的 web.config 中的 https 重定向。

c# asp.net url request

3
推荐指数
1
解决办法
1万
查看次数

标签 统计

asp.net ×3

c# ×2

url ×2

http ×1

http-headers ×1

http-referer ×1

module ×1

request ×1

rewrite ×1

web-config ×1