How to create the asp.net web setup project - visual-studio-2010

I have a Asp.net application which I want to make it easy to depoly in client machine by click the .ext or .msi file.
Then I found the "web setup project" in vs.
However I have no idea how to make it.
In my case,my application need .Net 4.
And after the app is deployed I have to modify something in the web.config which I want to gather through the install wizard.
Also I need to do some clean work after deploy(modify some files).
So I wonder if my requirement is possible using "web setup project",and how to make it?

In Visual Studio you can modify files during install only through custom actions. So you will need to write custom code which does what you need. Regarding .NET Framework 4, it can be added as a prerequisite.
If you want an easier solution, you can try a commercial setup authoring tool: http://en.wikipedia.org/wiki/List_of_installation_software
For example, Advanced Installer has a dedicated project type for ASP.NET applications.

Yes,We can make Custom Actions(Framing Connection during installation ,Consuming WCF service for Web App)to .msi file during installation.
If you want to have more clear picture about this refer my articles.
This is to create or change Connection string along with setup creation for Windows Application
http://www.codeproject.com/Tips/446121/Adding-connection-String-During-Installation
In this creating setup file for Web App which consumes WCF service
http://www.codeproject.com/Tips/477202/SetUp-file-Creation-for-Web-Application-which-Cons

Related

Deploying VirtoCommerce.Manager to Azure from Visual Studio

I am working with Virto Commerce server 2.4.561 and I'm having a great deal of difficulty successfully publishing to Azure from Visual Studio. Based on the documentation provided, it's not clear to me what the appropriate method is. Most guidance related to Azure assumes that I am using Git deployment. But in this case I am not. I am coding locally on my dev machine and I would like to be able to use web deployment to deploy directly to Azure from Visual Studio. However, the guidance found here seems to suggest that if you want to do your own deployment, you need to use deploy.cmd. I'm not exactly sure why that is. I can only guess that it has something to do with how the modules need to be packaged up.
I am able to run deploy.cmd and it appears to succeed, but I end up with an artifacts folder with 2,000+ files and folders in it and I am left to use old-school FTP to sync all those files up with the Azure website. Is this how it is meant to be done? I have tried to deploy directly from Visual Studio to Azure, and it appears to succeed, but the site does not behave correctly. Specifically, the custom modules I've built don't load correctly.
What is the right way to do this?
There is a way to publish your custom module directly from Visual Studio, but you still need a working Virto Commerce in Azure beforehand, and the easiest way to set it up is to use the Deploy to Azure button in GitHub.
In the Azure portal create a new virtual application /MyModule with
physical path site\wwwroot\admin\Modules\MyModule. It will be used
for publishing a custom module.
Download the source code from GitHub with the same version as you have published to Azure, add your custom module to the solution and build it.
In Visual Studio right-click on your module project and select Publish.
On the Profile screen select Microsoft Azure Web Apps as a publish target and select your Azure Web App.
On the Connection screen select Web Deploy as a publish method and add /Module to the site name. So your site name should look like this: myvc/MyModule.
On the Preview screen click the Start Preview button and make sure the file list contains only files related to your module and the action is Add for each of them.
When you click the Publish button, Visual Studio will upload all module files to the physical directory configured for the virtual application myvc/MyModule. For subsequent publishing it will upload only modified files.
Update: You should restart the Web App via the Azure portal after publishing in order to load the new version of your code into the application. Thanks to N1njaB0b for reminding.

How to configure Web Deploy 3.5 EncryptWebConfig rule handler?

We are wanting to setup publishing via the Web Deploy method in Visual Studio 2013. I've installed Web Deploy 3.5 on the destination web server and it's deploying properly.
We'd like to also use Web Deploy 3.5's EncryptWebConfig rule handler to encrypt our web.config files post-publish as described here: http://blogs.iis.net/msdeploy/archive/2013/07/09/webdeploy-3-5-rtw.aspx, which gives a command line example. However this is not an option in the "Publish Web" Wizard > Web Deploy Method , nor do I know how to add in that rule through directly modifying the .pubxml PublishProfile... Or is the EncryptWebConfig a rule I setup somehow in IIS on the server?
I was unable to find any further documentation on this rule anywhere...
I had also tweeted a guy who works for the Visual Studio Web team and he came through with this answer:
Add the property <MSDeployEnableWebConfigEncryptRule>true</MSDeployEnableWebConfigEncryptRule> to your .pubxml file
I figured it'd be like this, but previously could not find any references to the proper tag name, MSDeployEnableWebConfigEncryptRule, anywhere.

JuiceUI - sharing across projects

Is there a known way to configure JuiceUI to exist in one Visual Studio Web Application project and reference it from another Web application? We want a centralized location for all of our Web Application to use it instead of having to install the JUiceUI.dll and Scripts folder in every project.
Thanks

Create an web app installation package, that includes "everything"?

Would it be possible, with the tools in VS2010, to create an msi-package that includes everything needed, and installed "on demand" for a mvc 3 app?
It should include IIS, SQL-Server Express, .NET 4, and the mvc3 assemblies.
That would be very handy to have to give users a single install-file, regardless if they use xp, vista or 7. The package should autmatically dectect what's missing, and install that.
You can try use a Web Setup Project.
Add a new project to your solution.
In the "Add New Project" dialog, select Other Project Types->Setup and Deployment->Visual Studio Installer.
Then select Web Setup Project.
In the created setup project, add Project Output... (Content Files) to the Web Application Folder (in File System Editor).
The web setup project includes by default check for IIS and .NET framework. It is possible to add checks for other dependencies.
When building the setup project, it is created the msi, along with a setup.exe that includes some pre-install validation.

WebSetup Installer for configuring IIS settings

I have created a websetup using Visual Studio for deployment of a web application.
How can i get it to setup additional IIS settings ?
Like setting up wildcard, virtual directory, permissions, etc.
Basically stuff you can control using the inetmgr.
I would like to automate the configuration as much as possible.
Users always make mistake!
Thanks!
See my answer to this question. You can create a custom build task that can automate many of the IIS configuration steps you mentioned.
Decided to go with WIX 3.5 installer.

Resources