Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6390743
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T03:35:09+00:00 2026-05-25T03:35:09+00:00

am planning to implement Castle windsor in WCF layer, which is an ASP.Net project.

  • 0

am planning to implement Castle windsor in WCF layer, which is an ASP.Net project. When I went through the documentation of Castle windsor it was said that we need to create container only once and dispose it after using it. So am struck at this point in my scenario where I need to create container in WCF. I initially thought of putting that on Application_start in global.asax.vb and dispose it in Application_End but application_end will be called when App pool recycles or iis restart etc.

So second thing came to my mind was Session_start and Session_end. Again session end will work for only Inproc type. Also it might get called only after certain amount of idle time.

Third option is to call in each method to create instance and close it after each method. which is not advisable from what I know.

So could you please suggest which is the best way for this.

Thanks in advance
Sai

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-25T03:35:09+00:00Added an answer on May 25, 2026 at 3:35 am

    You would usually configure your IOC container only once per application lifetime, and doing this in Application_Start() seems perfectly reasonable. Reconfiguring it for each new session or for each request most probably is just doing unnecessary work; also, I suspect this could hurt performance.

    I don’t see anything wrong with Application_Start() / Application_End() approach. If you fear it may leak resources or something like that, then these fears are unjustified.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am planning to implement a basic recommendation system that uses Facebook Connect or
My company is planning to implement a solution in multiple applications that will help
I'm planning to implement an Android application that requires a login screen. If the
I am planning to implement database search through a website - I know there
I am planning to implement logging into a web application that I am currently
I am planning to implement a small standalone program that will make a https
I'm planning to develop an ASP.NET server control to provide asynchronous username availability validation
We are planning to implement a simulator generator program that will generate C# solution.
I was planning to implement a way to extract/update/insert trac's project related data from
I'm planning to implement a recommendation engine, of which details are given here .

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.