A
A
Alexander Sulimov2012-09-18 10:07:37
ASP.NET
Alexander Sulimov, 2012-09-18 10:07:37

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

3 answer(s)
F
FanKiLL, 2012-09-18
@FanKiLL

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.

A
Alexandr Sulimov, 2012-09-18
@AlexandrDP

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.

R
Razaz, 2012-10-04
@Razaz

There are 2 ways to copy AppData:
1. Push a placeholder into it and uncheck the clean appdata checkbox in the publish settings.
2. IMHO the most correct option: Make MSDeploy (Visual Studio) not delete App_Data folder but delete everything else

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question