开发者

Structure map with a ASP.Net webservice

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.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜