Copied to clipboard

Flag this post as spam?

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


  • Kennie Davis 1 post 21 karma points
    Jul 19, 2012 @ 21:55
    Kennie Davis
    0

    SQL Server CE - There is a file sharing violation. A different process might be using the file

    First, I apologize if this is a duplicate question. I'm new to the forums. I've also posted this question on Stack Overflow (http://stackoverflow.com/questions/11567504/umbraco-sql-server-ce-there-is-a-file-sharing-violation-a-different-process) and am duplicating it here:

    Basically, I've setup Umbraco 4.7.2 to use SQL Server CE. Everything works as expected in my development environment. However, after publishing (via WebMatrix 2) to a GoDaddy 4GH shared hosting account, it's been a completely different story.

    Initially, everything worked as expected. But as soon as others tried to connect to the site, everyone started receiving the following error:

    System.Data.SqlServerCe.SqlCeException: There is a file sharing violation. A different process might be using the file. [ ..\App_Data\Umbraco.sdf ]

    I've done some research and I understand that SQL Server CE doesn't allow multiple connections, but I find it hard to believe that Umbraco would offer SQL Server CE as an option if it wasn't capable of allowing multiple visitors to navigate a site.

    I've tried modifying the connection string per other resources and am not having any luck. Here's my current connection string:

    datalayer=SQLCE4Umbraco.SqlCEHelper,SQLCE4Umbraco;data source=|DataDirectory|\Umbraco.sdf;file mode=read write;persist security info=false;

    I've tried different file modes such as Read Only and Shared Read with no luck. How do you overcome this issue? Is this somehow a problem with the hosting environment or a problem with the connection string? Thanks.

  • jaygreasley 416 posts 403 karma points
    Jul 20, 2012 @ 09:40
    jaygreasley
    1

    Hi,

    Apparently you can get that error if the sdf is on a shared network drive so maybe check with the hosting company.

    For info, I have a vanilla sqlce install and the conn string is as follows:

    <add key="umbracoDbDSN" value="datalayer=SQLCE4Umbraco.SqlCEHelper,SQLCE4Umbraco;data source=|DataDirectory|\Umbraco.sdf" />

    Hope you get it sorted

    /j

  • Brett Spencer 88 posts 260 karma points
    May 29, 2019 @ 17:39
    Brett Spencer
    0

    Apparently you can get that error if the sdf is on a shared network drive so maybe check with the hosting company.

    Agh! Thank you. This happened in local dev with repo on shared server directory.

Please Sign in or register to post replies

Write your reply to:

Draft