如何在.NET 3.5中的UserNamePasswordValidator中获取端点地址?

jlp*_*jlp 6 wcf .net-3.5

我需要在.NET 3.5中的自定义UserNamePasswordValidator中访问端点地址.

我正在安排

<serviceHostingEnvironment aspNetCompatibilityEnabled="true" />
Run Code Online (Sandbox Code Playgroud)

[AspNetCompatibilityRequirements(RequirementsMode = AspNetCompatibilityRequirementsMode.Required)]
Run Code Online (Sandbox Code Playgroud)

但是UserNamePasswordValidator中的HttpContext.Current为null.我在IIS 7.5中托管服务.我也尝试过.NET 4.0,但是我需要在3.5中找到解决方案.

有没有解决方法?