views:

678

answers:

1

Hi

I'd like to use the netTcpBinding for my WCF application which is currently hosted in IIS7, which means configuring it to use WAS instead. This is fairly straight forward however, my application previously made use of the Application_Start event in the global.asax file. I do not require access to the httpContext(which I understand access has been removed in IIS7), however I would still like to hook into the start or init methods?

Does an equivalent exist when hosting an application in WAS as apposed to IIS7?

Using classic mode is not an option(again I'm not interested in the httpcontext and this only appears to work if using an http binding) - and I've seen an example of putting a static class instide the app_code folder which looks like a horrible hack.

+3  A: 

I believe AppInitialize() is the method you're looking for. Here's an article on using it to initialise Castle Windsor in a WAS hosted WCF service:

Castle Windsor and non-HTTP Protocol WCF Services

Kev
Thanks for the respone. I had come across that, but it looks rather "hacky" to put it lightly ... I really didn't think I'd have to rely on the app_code folder .... is there really not other suitable replacement?
Mike Tours