Answer the question
In order to leave comments, you need to log in
ASP.NET, VS2011, Publish
There is a need to distribute a small project to several users, without unnecessary movements on their part.
I'm trying to use "Web Deploy Package".
But the result is half-hearted, the installation is simple, but not everything is installed.
The project has a database (EF - it creates itself), when publishing, the option “AttachDbFilename=|DataDirectory|\” is suitable, but the App_Data folder is not published and the database cannot be created. If you create a folder with your hands, then there are not enough rights to create it.
Prompt for other ways to transfer the project to users or good documentation on built-in tools.
Answer the question
In order to leave comments, you need to log in
Can change DataDirectory in connectionString to some Project Folder. With this App_Data there are always such troubles.
As an option, uncheck Exclude files from the App_Data folder when deploying and put some file there, for example temp.txt. The folder should deploy normally.
Send the user the file(s) to say what to run (assuming IIS SQL Express is installed) and the site is deployed to localhost/site.
Now, through the Web Deploy Package, the site is being deployed, but when I try to create a database, I get an error that there is no App_Data folder, and I can’t find how to specify in Publish that it be created.
If you create the folder manually, then the second error is “CREATE FILE encountered operating system error 5 (Access denied.) while attempting to open or create the physical file”. Why there is no access and how to give it - I guess, but the user does not need all this. I need to give it a Next-Next-Ok type installer.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question