locked
Thread safety in multiuser application RRS feed

  • Question

  • Hi,

    I am trying to make a multiuser application in wpf C#. How can I prevent users from accesing same data from the database?

     

    Thanks

    Jo

    Tuesday, September 20, 2011 2:27 PM

Answers

All replies

  • You'll need to handle this yourself.

     

    Typically, this would be handled via a "middle tier" - the WPF applications would all connect to a service somewhere to get access to the data.  That service could handle synchronization between users as needed.

     


    Reed Copsey, Jr. - http://reedcopsey.com
    If a post answers your question, please click "Mark As Answer" on that post and "Mark as Helpful".
    Tuesday, September 20, 2011 4:01 PM
  • Hi,

    Could you please give me a bit more idea about the middle tier implementation?

    Thanks

    Jo

    Wednesday, September 21, 2011 10:36 AM
  • Hi,

    Could you please give me a bit more idea about the middle tier implementation?

    Thanks

    Jo

    The most common, current way to do this would be to write a WCF service.  The clients would connect to the service, and the service would get the data and serve it back to the clients.

     

     


    Reed Copsey, Jr. - http://reedcopsey.com
    If a post answers your question, please click "Mark As Answer" on that post and "Mark as Helpful".
    • Proposed as answer by truptivd Friday, September 23, 2011 7:09 AM
    Wednesday, September 21, 2011 3:53 PM
  • Hi s251984,

    Thank you for your post.

    What Reed said is greate, also here is a thread about detail mutiuser application creating for your reference:

    http://social.msdn.microsoft.com/Forums/en-US/wpf/thread/25bf5023-9e22-40ee-a81d-fd7453c58d93/

    Links about Middle tier for your reference:

    http://msdn.microsoft.com/en-us/library/ee707348(v=vs.91).aspx

     

    If you have any additional questions, please feel free to let me know.

    Have a nice day.


    Annabella Luo [MSFT]
    MSDN Community Support | Feedback to us
    Get or Request Code Sample from Microsoft
    Please remember to mark the replies as answers if they help and unmark them if they provide no help.

    • Proposed as answer by truptivd Friday, September 23, 2011 7:09 AM
    • Marked as answer by s251984 Saturday, September 24, 2011 8:44 PM
    Friday, September 23, 2011 6:24 AM