locked
ASPNETDB not copied to App-Data directory after publishing RRS feed

  • Question

  • I have a aspnetdb in my app_data folder for users/roles, etc.  When I publish (VS2010) the website, the db does not get copied to the app_data folder even thou it is specified in the Package/Publish SQL properties.   Is it OK to just copy the database from my  local machine to the hosted site. 
    NR
    Saturday, November 5, 2011 6:10 PM

Answers

  • I found what was happening. When I created my MVC app (not an empty one), this aspnetdb was created automatically and placed in the app_data folder.  It was placed there, however, it was excluded from the project.  You can tell because it looks like a ghost file.  You have to right-click the file and select Include in Project.  Now when you publish, the file will be copied over.
    NR
    • Marked as answer by Highlander4 Saturday, November 5, 2011 6:55 PM
    Saturday, November 5, 2011 6:55 PM

All replies

  • I found what was happening. When I created my MVC app (not an empty one), this aspnetdb was created automatically and placed in the app_data folder.  It was placed there, however, it was excluded from the project.  You can tell because it looks like a ghost file.  You have to right-click the file and select Include in Project.  Now when you publish, the file will be copied over.
    NR
    • Marked as answer by Highlander4 Saturday, November 5, 2011 6:55 PM
    Saturday, November 5, 2011 6:55 PM
  • Hi Highlander4,

    Thanks for sharing your experience here.

    Have a nice day.


    Alan Chen[MSFT]
    MSDN Community Support | Feedback to us
    Get or Request Code Sample from Microsoft
    Please remember to mark the replies as answers if they help and unmark them if they provide no help.

    Monday, November 7, 2011 3:07 AM