Click here to Skip to main content
15,908,901 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
hi i want to run 3 thread in my website but i don't where put the thread run?
for example where run thread?:
RouteConfig
or
WebApiConfig
or
FilterConfig
or
global file
please help me

i want these threads always run.
Posted
Comments
Richard MacCutchan 4-Jan-15 8:30am    
It largely depends on what each thread is required to do.
mosi98 4-Jan-15 9:31am    
i want always running and check the user state
Richard MacCutchan 4-Jan-15 9:35am    
Which really does not tell us anything. Please read http://www.codeproject.com/KB/FAQs/QuickAnswersFAQ.aspx, edit your question, and add full details of what your code is supposed to do, or what error you are having.

It sounds as a wildly wrong approach to me. "Running a thread" cannot be a goal. It could be only a techniques used to reach some goals.

So, the question hardly can make any sense. Moreover, using threads in a Web project, due to the very nature of Web technology, makes no to little sense in almost all cases. Remember that the whole lifetime of your code behind lies between some HTTP request and HTTP response.

And, finally, the "options" you are asking about mention some data files. There is no such thing as "put a thread in a file". The whole notion makes no sense.

—SA
 
Share this answer
 
Suppose you want to send some email using code or a text message to his/her mobile phone or want to save something in the database.then use the thread in web otherwise it is of no use.
Thread.Start() use this.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900