views:

23

answers:

3

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?

Thanks,

Eric-

A: 

Why do you have to bootstrap in the constructor? You bootstrap on application start, not in a constructor of anything. Shows us your code.

epitka
+2  A: 

You will likely want to bootstrap in the Application_Start method of the global.asax.

Phil Sandler
A: 

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.

Eric Brown - Cal