All our apps have been converted to use strucutre map, and our libraries were converted also.
I'm trying to convert one of our asp.net webservices.
If I understand, correctly, I'll have to bootstrap the structuremap stuff in the constructor of the web service.
But the constructor gets called with each web method called, so Each request is going to bootstrap strucutre map, and have a 20 seconds delay whilte it's scans and bootstraps.
Is there a way to get around this?
Than开发者_如何学JAVAks,
Eric-
You will likely want to bootstrap in the Application_Start method of the global.asax.
Why do you have to bootstrap in the constructor? You bootstrap on application start, not in a constructor of anything. Shows us your code.
I get it now, the webService Didn't have an Global.axas/*.cs so I thought I had to bootstrap elsewhere, but I'd forgotten you can just add one to a web service.
I bet that'll fix it.
精彩评论