How to get endpoint address in UserNamePasswordValidator in .NET 3.5?
Asked Answered
V

0

6

I need to acccess endpoint address in custom UserNamePasswordValidator in .NET 3.5.

I am settting

<serviceHostingEnvironment aspNetCompatibilityEnabled="true" />

and

[AspNetCompatibilityRequirements(RequirementsMode = AspNetCompatibilityRequirementsMode.Required)]

but HttpContext.Current is null in UserNamePasswordValidator. I host service in IIS 7.5. I tried also .NET 4.0 and it works but I need to a find solution in 3.5.

Is there any workaround?

Vogele answered 2/10, 2012 at 9:28 Comment(3)
Did you try using the OperationContext instead, the WCF way.Elm
OperationContext is also null in UserNamePasswordValidator.Aveyron
Same problem remains in 2017.Safety

© 2022 - 2024 — McMap. All rights reserved.