Create directory in web deploy package? - asp.net

I have an ASP.NET WebForms application which I would like to publish to a Web Deploy package and deploy using the deploy.cmd script generated as part of the Web Deploy package. This basically works fine but I have one problem.
My application generates image files which are stored in a temporary directory as part of the web site (basically a subdirectory of the IIS site's physical location called temp). However, whenever I deploy my site using the deploy.cmd script, this directoty is deleted. Instead, I would like the deploy script to make sure the directory is present and that the IIS user has access to it. Is this possible to do with Web Deploy out of the box?

Related

Azure DevOps WebForms Deploy Without Down Time

We currently have a legacy asp.net WebForms application that we deploy to AWS using Azure DevOps. The primary task is IIS Web App Deploy.
Everything is working well, except that deployments take the site offline albeit for a few minutes. During this time a holding page is displayed. I would like to remove the need to take the site offline. Ideally I would like the following flow:
deploy the code to a folder. Initial thought is to name this folder by datetime (yyMMddHHmmss)
once deployed update the physical path of the site to point to the new folder
I don't think I will be able to use the IIS Web App Deploy task to do this... It appears to use the Website Name to determine the target folder.
My questions are:
where is the best place to set the output folder name, during build or deployment?
once the folder has been created, how can I deploy to it?
Mark

ASP.NET Web Forms Application Folder not deployed to AWS Elastic Beanstalk Application

The ASP.NET Web Forms Application that I've designed, contains a folder where the excel sheets that I require for the web reside. I've deployed the Web Application to AWS using the AWS Toolkit in the VS 2017, and could successfully get the application running over the Web. But, when I did something on the web (like Upload) which makes use of that folder, it resulted in exceptions and when I look at them through Log files later, I discovered that the Folders weren't even uploaded in the deploy process. Is there any way I could get the folder deployed as well?
Please ensure that the folder is included in your project before publishing. In Solution explorer, click on the Show All Files icon
And once the folder is displayed in the Solution Explorer, right click the folder and then Include in Project

Does web.config transformations works with Build\Release?

To deploy a website on production or UAT server, I perform following steps.
1)Build my website in build\release mode.
2)Copy the files manually and paste it on the production server.
I want to apply web.config transformations when website is bulid in release mode. Is it possible?
or is there any other way to change the value of connection string automatically when website is deployed on server.
I am not using webpublish or web packages methods for deployment.
You can use web publish to file system which is exactly as copy paste. You can publish to a folder in your machine and copy to server from there. After you run the publish, the files can be also found in obj\release\Package\PackageTmp

How can I deploy a new web application to a subdirectory of an IIS site and not have to click "Convert To Application"?

I'm trying to write an automated deployment application that runs on one box but deploys to a remote QA server. Basically each time a branch is created in source control my automated deployment tool will deploy the application. Right now the code all deploys but IIS doesn't like the nested web.config files unless I use the "Convert to Application" function.
Notice in the below screenshot that for the Test-Site which was just created for the new "Test-Site" branch that the folders "Analyze", "Investigate", "Measure" and "Score" aren't applications like the RevECurrent and RevENew have above for those folders. Without actually clicking "Convert To Application" for each folder how do I make the web.config files not generate errors whenever I deploy a new subdirectory like "Test-Site"?
Check the System.Web.Administration namespace, it will allow you to interact with IIS. I have used it to add/remove bindings, add sites, etc... I would assume it would let you create application folders under a Web Site as well.

ASP.NET Web Deploy - Large Folders

I have an ASP.NET application that has two very large folders within the application on the production side: One for images and another for App_Themes. They grow dynamically from user input and customization. There are similar folders in my dev application, which have only some sample data for testing.
I am using web deploy through Visual Studio 2010 to publish my site to the production server. I have changed my .csproj file settings to exclude these two folders from deployment and have also checked the "leave extra files on destination" checkbox. However, the publishing still takes a long time. I think the reason is related to web deploy checking all the files in the images folder and the App_Themes folder on the server.
Is there a solution that would solve the publishing problem? I would like to continue using web deploy because it is really practical compared to other methods of publishing. The server is running IIS 6.
You can publish the way you're doing it, but into a local directory. It should be quick that way. Then set up a robocopy job ( http://en.wikipedia.org/wiki/Robocopy ) to sync the local publish directory with the web server. Robocopy can be fired off via a .bat file (I bet you can even chain it somehow to the completion of the publish) and is very configurable allowing you to specify files or directories to omit.

Resources