locked
Frequent concurrency errors RRS feed

  • Question

  • Visual Studio 2012 Lightswitch application in VB

    I have come across an odd situation where the deployed application receives frequent data concurrency errors but the development machine never recieves any.

    A typical senario is... the user enters a new record and upon clicking the Save button the system may (not always) throw a concurrency error even though it's a new record.

    This is a single user working on a single screen with no one else on the system and yet the system throws a data concurrency error.

    I cannot duplicate the problem in the development environment even if I use the exact same database.

    I should mention that all the user needs to do is click on the accept changes button on the data concurrency screen and the record is saved just fine, but you should see the looks I get from the user when I tell him to just accept the changes.

    Any ideas?  

    Tuesday, November 12, 2013 1:44 AM

All replies

  • Hi,

    "I have come across an odd situation where the deployed application receives frequent data concurrency errors but the development machine never recieves any."

    If you deploy your application in IIS, I'd like to suggest you to refer Eric Erhardt's blog to learn how to diagnose problems in a deployed 3-Tier LightSwitch application. Once you have enabled diagnostics, you can now inspect the information that is being logged in your application. 

    Diagnosing Problems in a Deployed 3-Tier LightSwitch Application (Eric Erhardt)

    You will also find helpful posts on our team blog, and training videos on the developer center.

    http://msdn.microsoft.com/en-us/library/vstudio/gg481778.aspx

    http://blogs.msdn.com/b/lightswitch/archive/tags/deployment/

    At the same time there are list of LS deploy issues that you should take into consideration before your deployment,

    # List of LS deploy issues                  

    Regards                                                


    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click HERE to participate the survey.

    Friday, November 15, 2013 11:36 AM
  • Are you updating dates in the Inserting() or Updating() methods?  This will cause the type of concurrency errors you are experiencing if the date fields in the database are not of type DateTime2.  Other things can cause that but that would be my first guess.
    • Proposed as answer by Angie Xu Wednesday, November 20, 2013 2:33 AM
    • Unproposed as answer by Angie Xu Friday, December 20, 2013 7:26 AM
    Friday, November 15, 2013 4:21 PM
  • The jury is still out.  I have not yet been able to resolve the concurrency issues by following the suggestions above.  That doesn't mean the answer isn't buried in there someplace... it only means that I have not found it yet.

    Regardless, I am very grateful for your efforts.     

    Wednesday, November 20, 2013 9:47 AM
  • Hi Jyuma

    Thanks for your feedback.

    It's recommended to refer the methods that I mentioned above to troubleshoot this issue, it will give some hints for you. If you can't reproduce this issue on your side, I'd like to suggest you to check your deployment procedures, or you could also have a try re-deploy your LightSwitch again, perhaps it can fix it.

    Best regards

    Angie


    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click HERE to participate the survey.

    Monday, November 25, 2013 7:09 AM