0

We are trying to inject the current http context (so we can get authentication info, e.g the forms authentication etc...)from our asp.net mvc web site into our service constructors. Our services are WCF and we are using Castle Windsor at the client and service layers. Is it possible to do this entirely from configuration? Does any one know the best way to go about this?

EDIT: our services layer will run on a different physical tier to the web site

tereško
  • 58,060
  • 25
  • 98
  • 150
Craig Bruce
  • 674
  • 1
  • 8
  • 18
  • If the wcf runs on same server and same web application yoh do not need to pass it as it is available as well as httpcontext.current. If you are in another webapp or another server i think you should pass only what you need like user info or other small objects but not the whole context – Davide Piras Sep 26 '11 at 06:34
  • Sorry I should have stated that our services layer will run on a different physical tier to the web layer, seperated by a firewall. This is why we need 2 levels of security. – Craig Bruce Sep 26 '11 at 06:37
  • So, you're trying to access the HttpContext of the Web tier from the Service tier, with the tiers separated by a firewall? – rbellamy Sep 29 '11 at 15:30

1 Answers1

0

I think you can use something like HttpContextBase/HttpContextWrapper as dicusssed here : Castle.Windsor and HttpContextWrapper

Community
  • 1
  • 1