locked
I keep getting "file sharing violation" with any page that accesses the db RRS feed

  • Question

  • User1526116210 posted

    The full message is:

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

    This only happens when I have it hosted on my Azure site and not locally and the source error only tells me to add

    <configuration>
       <system.web>
           <compilation debug="true"/>
       </system.web>
    </configuration>

    Which I've already done but it still doesn't tell me anything useful.

    How should I go about fixing this?

    Sunday, September 14, 2014 8:45 AM

Answers

  • User-166373564 posted

    Hi mhcodner,

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

    According to the error message above, it's recommended to take a look at the analysis of this issue below.

    SQL Server CE code failing?

    We need use SQL Server (Express, Professional or any other version) to access your database and connect to it using SQL Native Client, OleDB or any other Data Connector instead of SQLServerCE.  This issue is related to your connection string after you deploy your asp.net application to Azure.

    Please let me know if there is anything that I can do to help.

    Best regards,

    Angie 

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Monday, September 15, 2014 2:14 AM