I have method which create background thread to make some action. In this background thread I create object. But this object while creating in runtime give me an exception :
See the answer on this question: How to run something in the STA thread?
When you define your thread, set the ApartmentState to STA:
thread.SetApartmentState(ApartmentState.STA);
This should do the trick!