locked
VS2013 and App_Data RRS feed

  • Question

  • User2136700745 posted

    When I was building my ASP.NET 4.0 application with VS2012, I don't believe there was ever a necessity to have the App_Data folder present.  It definitely wasn't included when I published the site.

    Now that I've upgraded to VS2013, I'm getting an "Access denied creating App_Data subdirectory" error.

    So I looked around and found this.  I realize it's for MVC but Step #7 seemed relevant: In the Settings tab, expand File Publish Options, and then select Exclude files from the App_Data folder.

    Unfortunately, even when this is checked, I'm still getting the same error.

    What I think it comes down to is this: I am indeed using SQL Server Express but is "ASPNETDB.MDF" (inside App_Data) absolutely necessary?

    Any ideas to avoid having to have an App_Data folder would be much appreciated!

    Robert

    Tuesday, September 16, 2014 8:21 PM

Answers

  • User-1454326058 posted

    Hi pelalusa,

    How do you get that error? Do you get that error when access your website. (E.g. register a user)

    If that is the case, I think you are using the EF to generate the database, however the current user (by default IIS use the ApplicationPoolIdentity as the identity) hasn’t enough permission to create folder.

    The option of exclude files from the App_Data folder, it will exclude that folder when publish the project.

    Best Regards

    Starain Chen

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Thursday, September 18, 2014 1:45 AM

All replies

  • User-760709272 posted

    You need that if your project uses membership

    http://forums.asp.net/t/1517995.aspx?what+is+ASPNETDB+MDF+what+s+its+importance+

    Wednesday, September 17, 2014 5:04 AM
  • User-1454326058 posted

    Hi pelalusa,

    How do you get that error? Do you get that error when access your website. (E.g. register a user)

    If that is the case, I think you are using the EF to generate the database, however the current user (by default IIS use the ApplicationPoolIdentity as the identity) hasn’t enough permission to create folder.

    The option of exclude files from the App_Data folder, it will exclude that folder when publish the project.

    Best Regards

    Starain Chen

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Thursday, September 18, 2014 1:45 AM