locked
Error in Application RRS feed

  • Question

  • User-1557173817 posted

    Access to the database file is not allowed. [ 1914,File name = C:\Users\user\Documents\HMS\hm\App_Data\StarterSite.sdf,SeCreateFile ]

    Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code. 
    Hello, i just install my application on a server and am getting this error message, what should i do.

    Exception Details: System.Data.SqlServerCe.SqlCeException: Access to the database file is not allowed. [ 1914,File name = C:\Users\user\Documents\HMS\hm\App_Data\StarterSite.sdf,SeCreateFile ]

    Source Error: 

    Line 1:  @{
    Line 2:      WebSecurity.InitializeDatabaseConnection("StarterSite", "UserProfile", "UserId", "Email", autoCreateTables: false);
    Line 3:  
    Line 4:      // To let users of this site log in using their accounts from other sites such as Microsoft, Facebook, Twitter,
    Wednesday, September 23, 2015 7:00 AM

Answers

  • User-735851359 posted

    Yo do not have the WRITE permission to the DATABASE FOLDER !!!

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Friday, September 25, 2015 3:25 AM
  • User-821857111 posted

    As ayanmesut says, you need to give the user account that the application executes under the correct permissions to read and write to the sdf file. The account is most likely the application pool account, which is IIS APPPOOL\Name_Of_Your_App_Pool. If you give that account MODIFY permissions in the App_Data folder, you should resolve the issue.

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Friday, September 25, 2015 3:47 AM

All replies