Web Deployment Projects - Remote IIS Server - asp.net

Background
In the spirit of continuous integration, I'm trying to automate our deployment process using a Web Deployment Project. Mostly, this has been painless. Most options were baked in and those that weren't were easy to add through the MSBuild XML interface.
However, I cannot seem to find an option for deploying to a remote IIS Server. This seems strange to me because I obviously don't want all my builds to run on my production/staging server.
The Question
How can I set up my Web Deployment project to create/overwrite an IIS Virtual Directory on a remote machine?
Notes
I am using Visual Studio 2008 and .net 3.0.
[Edit]
As suggested by x0n below, I could use MS Deploy for this. I would rather use a Web Deployment Project though, especially since we already have those set up. :)

Your best bet is to take a look at MS Deploy which is available as a stand-alone package right now at RC level. It ships with a Go-Live license, which means it will be compatible with the version shipping with Visual Studio 2010. Some info:
http://blogs.iis.net/msdeploy/default.aspx
It's a great tool - will sync remote servers, farms etc picking up missing metabase info, com objects, registry, .net components in bin or gac, databases - the whole hog. It also ships with an interactive shell and powershell cmdlets.
-Oisin

Related

Web Deployment tools for Visual Studio 2013

I am responsible for supporting a relatively complex Website project written with .NET 3.5.
Previously I was using Web Deployment Project with Visual Studio 2010 to deploy this website but at the moment I have only access to Visual Studio 2013.
As far as I know, there is no longer such a tool to be used for deployment in Visual Studio 2013 and I do want to compile the code before deploying to the production server. As mentioned earlier, the project is a bit complex and this would not be easy to be converted to a Web Application.
Any idea?
Unless I missed it, unsure what the issue is - in VS2013, Publish is what you are looking for (either WebSite or Application).
What exactly do you mean by "none of the (vs 2013 publish) options worked"? What is/was the issue?
In one of your comments, you state you want to "pre-compile" (aka "don't want to upload .cs source files) and that's a setting in Publish.
You can Publish to your local file system: "Custom" -> File System:
This extension still exists for Visual Studio 2013: http://www.iis.net/downloads/microsoft/web-deploy
Little bit confused with the question because you are keep referring about website rather web application.
If you are looking to convert web site to web app then you need to follow this: http://msdn.microsoft.com/en-us/library/vstudio/aa983476(v=vs.100).aspx
Otherwise, if you are referring about the deployment project. Yes, it is no longer available.
I'd a very similar situation like you and Since 2013 I have stopped using any deployment project, instead I have started using Publish that creates a deployment package for you on a Network , FTP, Local Drive or even on Azure.
Here is a nice guide from Microsoft
http://msdn.microsoft.com/en-us/library/dd465323(v=vs.110).aspx
If you still want to go for Deployment Project, then you would need to go for "Installshield" limited edition,which is free (http://samirvaidya.blogspot.com.au/2013/11/how-to-enable-installshield-le-for.html).
http://msdn.microsoft.com/en-us/library/2kt85ked(v=vs.110).aspx

Can I use Web Config Transform when publishing to azure with Visual Studio 2012?

I have three enviroments for my asp .Net mvc application Local, Development and production. This means i need three webconfig files. The transformation seems to work fine with local and development deployment through a build server but not when deploying to production. It works when i manually publish the site from visual studio 2012.
Does it have something to do with the servicConfigurations for the different enviroments?
If you're going to Azure, then you can use publishing profiles. The trick is to chain your config files with your environment settings in Visual Studio.
There's an overview of publishing profiles here:
http://msdn.microsoft.com/en-us/library/ff398069.aspx
And Scott Hanselman walks through a number of scenarios with chained config files here:
http://www.hanselman.com/blog/TinyHappyFeatures3PublishingImprovementsChainedConfigTransformsAndDeployingASPNETAppsFromTheCommandLine.aspx
With those two pieces, there is enough info there to not only manually get the configs transforming, but also to work those into CI.
Hope this helps, cheers.

Deploy from Visual Studio 2010 stopped working after upgrade to Web Deployment Tool 2.1

I have a web site project that has been existing for a while - it has been ASP.NET MVC2 based up until right now. .Net 4, Visual Studio 2010 Sp1, deployed to IIS 7.5 running on Win2008 R2.
I have four separate deployment profiles - "alpha", "test", "staging" and "live". Yes, I could probably have come up with better names, but they should hopefully convey what they are for.
It was recently decided to upgrade to MVC3 to take advantage of new awesomeness like Razor, global filter attributes, and start using NuGet etc. So I went on an upgrade binge with the Web Platform Installer. One of the things I updated was the Web Deployment Tool - both my developer machine (where the MVC3 upgrade happens) and the web server got this new version of the tool installed.
Since then, I have not been able to do deployments. I have gone back to earlier versions of my project (thanks to git for allowing me to painlessly go back to any previous version) and tried to deploy them, and they don't work either.
Whenever I try to do a deployment from Visual Studio I get the following error:
Web deployment task failed.((23.05.2011 11:18:24) An error occurred when the request was processed on the remote computer.)
(23.05.2011 11:18:24) An error occurred when the request was processed on the remote computer.
Unable to cast object of type 'Microsoft.Web.Deployment.DeploymentSyncOptions' to type 'Microsoft.Web.Deployment.DeploymentSyncOptions'.
I can see why that cast would be hard. ;)
But seriously - how can we get deployment from Visual Studio to work again? In the future we will do this using our CI server, and install a deployment package using MsBuild automatically on the correct web server depending on the git branch that was updated, but that is some time in the future.
I have full access to both machines so any other information need can hopefully be gathered.
You might be having beta version of web deploy on your box if you have ever installed web platform installer v2 beta. YOu can check that by
gacutil -l Microsoft.web.deployment.
If you see any 7.5.0.0 version then you have a beta version. Uninstall this version. You need to check and change this on both the client as well as the server.
Owais is right - this is very likely because you have a pre-release version installed. Rune can you please check and let me know?

Do a Windows application ifself contain the .NET framework?

I have a Windows application which contain a deployer.
Does the deployer itself contain a copy of the .NET framework?
Or do we have to explicitily install it?
When I check in the solution explorer, it shows the .NET framework under the deployer project under detected dependencies?
My Windows application connects to the Internet to validate for a registered user. Do I need to configure some port (or something like that) while I am installing it? Also how do I check which port my application uses to connect to the Internet?
Regarding #1, just as Xstahef said, you need to prerequisite the .NET framework.
You could put the .NET redistributable in your installer, and if you detect that the .NET runtime is not installed then prompt the user to run and install the .NET distributable contained in your installer (that's what we did some time ago, InstallShield provided this functionality for us). But this may not be recommendable: the .NET runtime has grown a lot in size (depending of the version you need to have in your client's machine), and many customers (at least the educated customers) won't trust installing the runtime from your installer. Besides, you may need to check with the legal department in your company before including a third-party component in your installation.
It depends on your deploy project (Visual Studio, InstallShield?). But commonly, you need to force the .NET installation (prerequisite option). By default, .NET is not contained in the deployment projects.
Here, it depends on the way you want to connect the Internet.
.NET runs in a VM, so you would need to require the framework be installed in order to actually run it. Much like you need to have Flash or Java for those respective mediums. Microsoft has redistributable packages for the .NET framework. So you could probably incorporate them into your installer. If you're targeting 1.1 or 2.0 most people probably won't need it.
So long as you are not trying to get in to the client machine then you shouldn't need anything special like UPnP to [attempt to] open a port if they are behind a NAT router.
Xenocode does allow to running such an application on an absolutely clean PC.

What do I need to install to compile Silverlight 2.0 applications on my build server

What's the minimum that I need to have installed on my Build Server (in addition to the standard .Net 3.5 stuff) to allow it to compile Silverlight 2.0 applications?
I have a Silverlight application that seems to be building correctly, but is not playing nicely with a related Web Application project - see this related question that I asked earlier: Silverlight xap file not being copied to ClientBin on Build Server
AFAIK you need Microsoft Silverlight 2 SDK to install on the build server.
HTH
Your build server should be pretty much an exact replication of your development machine as far as plug-ins, assemblies, run-times, SDK's etc.
You build server will be building your app via MSBuild.
In your particular case I suspect that you need to install the Silverlight Toolkit. This will give you the SL development runtime and the appropriate project build requisites for your XAP files to build and be deployed properly.

Resources