Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Bo Damgaard Mortensen 719 posts 1207 karma points
    Jan 03, 2012 @ 13:54
    Bo Damgaard Mortensen
    0

    MSSQL CE File Access Violation

    Hi all,

    I'm trying to host a small website with a MSSQL CE database, but I'm running into some trouble with a mssql reader exception: File Access Violation when publishing nodes. The error occurs totally random. The website is built with WebMatrix.

    Has anyone ever encountered this and found a solution to it? :-)

    Thanks in advance.

    - Bo

  • Bo Damgaard Mortensen 719 posts 1207 karma points
    Jan 03, 2012 @ 13:58
    Bo Damgaard Mortensen
    0

    The error says: There is a file sharing violation. A different process might be using the file. [..... /Umbraco.sdf]

  • Damiaan 442 posts 1302 karma points MVP 6x c-trib
    Jan 03, 2012 @ 14:43
    Damiaan
    0

    Hi Bo

    Is the file writable by the web server process?

    What is your connectionstring?  

    Are you trying to open it with some sort of Query analyzer which locks the database exclusively?

    Regards

  • Bo Damgaard Mortensen 719 posts 1207 karma points
    Jan 03, 2012 @ 14:49
    Bo Damgaard Mortensen
    0

    Hi Damiaan,

    Thanks a lot for your reply! Greatly appreciated!

    The appropriate read/write permissions should be alright - I've doublechecked that with my host.

    My connectionstring looks like this: <add key="umbracoDbDSN" value="datalayer=SQLCE4Umbraco.SqlCEHelper,SQLCE4Umbraco;data source=|DataDirectory|\Umbraco.sdf" />

    About query analyzer, I don't think so, no. It's just weird that it appears totally random. I never experienced the problem on my localhost though.

    So, still: any clue will be more than helpful !

    Thanks again.

    - Bo

  • Sebastiaan Janssen 5060 posts 15522 karma points MVP admin hq
    Jan 03, 2012 @ 17:25
    Sebastiaan Janssen
    0

    Hmm, how are you republishing? Right-click and republish all + children? Or right-click and republish entire site (/umbraco/dialogs/republish.aspx?xml=true)? in the last case, you MIGHT be running into this bug, but I can't be sure: http://umbraco.codeplex.com/workitem/30650

  • Bo Damgaard Mortensen 719 posts 1207 karma points
    Jan 03, 2012 @ 21:59
    Bo Damgaard Mortensen
    0

    Hi Sebastiaan,

    Thanks for your post! :-)

    Actually, I am not using either, just hitting the Save/Publish button and it appears randomly. After a app pool restart the node which I clicked disappears from the backend, but still lives in the database/xmlcache.

    After one day's struggle I finally tossed the towel and switched to a MySQL database (client don't want to pay for a MSSQL base) and everything is running smoothly now.

    Still trying to figure out why it crashed like it did - after all, we should be able to use SQL CE for smaller websolutions, yeah? :-)

    - Bo

  • Ayo Adesina 445 posts 1059 karma points
    Apr 17, 2012 @ 18:02
    Ayo Adesina
    0

    I have exactly the same problem as you....and still have not solved it... it is random...

    I would love to know why this is....just put a spport ticket with my hosting provider hopefully they will shed more light....

    When I had a dedicated server it was fine...never had this issue, but now I have moved to shared hosting SQL CE is not having a very good time....:-(

    I will get there in the end!

  • andles 44 posts 64 karma points
    May 21, 2012 @ 08:33
    andles
    0

    Adding "File Mode=Read Write" to the connection string should sort it.

  • andles 44 posts 64 karma points
    May 21, 2012 @ 08:43
    andles
    0

    You may also find that you will see this error if you have the connection open (as a data source) in Visual Studio at the same time your site is trying to access it (locally). VS puts a lock on it...

Please Sign in or register to post replies

Write your reply to:

Draft