Quantcast
Channel: Web Deployment Tool (MS Deploy)
Viewing all 565 articles
Browse latest View live

encryptPassword not working for backup

$
0
0

I have configured my server to have web deploy backups turned on and enabled.

I am running

msdeploy.exe -verb:sync -source:package="config-management.zip",encryptPassword="password" -dest:auto,encryptPassword="password",computerName="localhost" -setParamFile:"parameters.xml"

This runs successfully (it deploys the files) but it reports the following

Info: Creating backup of existing site.
Warning: BACKUP_FAILED - Skipping backup because it failed due to an unknown reason. For more information, contact your server administrator.

The event viewer contains:

Error: The property 'password' located at '/appPoolConfig[@appPool=AppPoolName']/add[@name='AppPoolName']/processModel' is marked as secure. You must specify an encryption password to archive this property.
Error count: 1.

And no backup is made. I am supplying the correct encryption password in the sync command. Any ideas whats wrong please?

Thanks


Missing Management Service Delegation icon

Visual Studio 2012 Publish Web Site (Web Deploy Package) with site creation

$
0
0


I have a web project in Visual Studio 2012 and I am able to create a web deployment package. However I am having difficulties using msdeploy with this package to create a new web site on my server.

My server looks like this:

  • dev-srv01
    • Application Pools
      • Default Web Site
    • Sites
      • Default Web Site
        • iisstart.htm

I would like to create a deployment package that would create a site on a different server like this:

  • dev-srv02
    • Application Pools
      • Default Web Site
      • My New Web Site
    • Sites
      • Default Web Site
        • iisstart.htm
      • My New Web Site
        • default.htm

I have read that I could possible use msdeploy with the types appHostConfig and iisApp but I have been unable to piece all this together and create a successfully working script. Is what I am attempting to do even possible?

 

ERROR_EXECUTING_METHOD with sql deploy

$
0
0

I am trying to deploy a website with database schema but keep getting error below.

I have been using web deploy successfully for some time, but only now have tried to use dor deploying schema.

I am using vs 2012 rtm, deploying to windows 2012 server virtual machine on Azure, with SQL 2012.

I have tried windows and sql authentication with no luck.

Anybody have any ideas thanks.

C:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\v11.0\Web\Microsoft.Web.Publishing.targets(4377,5): Error ERROR_EXECUTING_METHOD: Web deployment task failed. (Could not deploy package.

Unable to connect to target server.

Learn more at: http://go.microsoft.com/fwlink/?LinkId=221672#ERROR_EXECUTING_METHOD.)

Web Deploy 3 API - deploy a .NET 4.5 application

$
0
0

We're using the (almost completley undocumented) 'public API' for Web Deploy 3 to create a .zip package of our website and then sync it to a server:

using (var deploymentObject = DeploymentManager.CreateObject(DeploymentWellKnownProvider.Package, packageToDeploy))
{
       deploymentObject.SyncParameters.Load(packageParametersFile); \\ contains some connection string information and nothing more.
       DeploymentSyncOptions syncOptions = new DeploymentSyncOptions();

       syncOptions.WhatIf = false;

       deploymentObject.SyncTo(destinationOptions, syncOptions);
}

This code worked perfectly until we installed .NET 4.5 on our production and build servers and upgraded the project we are deploying to 4.5 also. Now we're getting the following error:

The application pool that you are trying to use has the 'managedRuntimeVersion' property set to 'v4.0'. This application requires 'v4.5'. Learn more at: http://go.microsoft.com/fwlink/?LinkId=221672#ERROR_APPPOOL_VERSION_MISMATCH.

Our server definately has .Net 4.5 installed and the and the IIS web site application pool version is '.NET Framework v4.0.30319' (I know it says v4 but .NET 4.5 is an 'in-place' upgrade and replaces 4.0 DLLs with the new version number .30319).

It is possible to resolve this issue when deploying via MSBuild.exe command line (not by creating a package but by syncing directly to a server) by adding the /p:VisualStudioVersion=11.0 flag (which causes a different web application targets file to be used which somehow allows deployment of a .NET 4.5 application).

Does anyone know why Web Deploy API complains like this and how I can resolve this error in the same way as the MSBuild solution?



Undeploy/delete package, leaving custom files on the server

$
0
0

I have a complex deployment/undeploy scenario - which I can't seem to achieve using msdeploy.

Step 3 is where I'm stuck (in the following scaled-down example):

  1. I deploy a "standard" package, built with VS2012, which creates the app and content just fine.
    • Let's say the app now contains three files (F1-F3), all deployed through the package (version 1).
  2. I allow for custom content to be added to the site, and a file (C1) is added manually to the server
    • Server now contains four files: F1, F2, F3 and C1.
  3. I wish to update my server with a new version of the package (version 2), containing updated versions of F1 and F2. In this scenario, it means F3 should be removed, and C1 should be left as-is.
    • Server should as a result contain 3 files: F1, F2 and C1.

I'm using the deployment API in a custom deployment tool, and the tool knows both versions of the package. I have the possibility to diff the two packages, or verb:delete using version 1 before I verb:sync version 2; if that would somehow help. Any help to accomplish this with the API or using command-line would be greatly appreciated.

The only way I can think of to delete F3, still leaving C1, would be to delete the contents of version 1 of the package, before I do a sync with version 2 (i.e. delete F1-F3, and then sync F1-F2). But I can't figure out how to delete files present in the package (source), from the server (dest:auto), without it also deleting C1. It also deletes the app, sitemanifest etc, which should be left as-is (i.e. I want to delete content only).

Changing tempAgent port in V3 using IP address

$
0
0

Hello,

I've been attempting to use the msdeploy tempAgent setting to deploy to remote machines. I want the listener to run on port 8172 like the Web Handler service would, but it seems that msdeploy will only respect the use of a port if I use the actual computer name and not its IP address. That is,

-dest:auto,computerName='192.168.1.100:8172'

fails, but

-dest:auto,computerName='my.test.machine:8172'

succeeds. Leaving off the quotation marks has no effect. Am I doing something wrong or is this a limitation of the service? Thanks,

- Daniel

Avoid deleting App_Data folder when publishing?

$
0
0

Hi

 

I am using Visual Studio 2012 and WebDeploy 3.0 to deploy my MVC 4 web app to my Windows Server 2008 R2. I have set the option to "Remove additional files at destination", but want to keep the App_Data folder and all its content intact, since this is where the database and all other user content is stored. At the same time, I want the application files to be "cleaned up" when I make changes to the application, so the option to "Remove additional files at destination" should apply to everything except the App_Data folder

 

How do I achieve this?

 

Thanks in advance!


Web Management Service not started on remote server

$
0
0

I'm having issues deploying to a server that I own and manage. I can't get any machine to deploy to it.

The service is started, and I can deploy to other servers. I'm using WebMatrix, the port is open verified via telnet. 

I guess I'm not really sure what else to add, as I've setup the service exactly as the walkthrough says to. Using IP, hostname, or http://server/MsDeployAgentService for the location, doesnt seem to matter. Just errors on verification.

Any help or ideas would be greatly appreciated.

MSDeploy newbie question

$
0
0

hi

I want to find out if the following requirement is possible with msdeploy.

1. create a single deployment package for all environment and the user will have the option to pick which environment at deployment time, at which time the proper web.config file will be applied. I know there in vs, one can create different build type for different environment with config file transfer and all that, but I really want to know how easy it is to create one single deployment file.

2. include IIS app pool and setting, will create the apppool if it does not exists already and apply settings.

3. set permission to folder

any pointers will be appreciated.

Kevin

how to force web deploy to rebuild the project in Release configuration?

$
0
0
Hello, When I publish, I notice that I forgot sometimes to switch the configuration to Release and to rebuild everything before. Is there a way to force that whenever I publish?

Breakpoint error

$
0
0

I've used the deployment tool 3.0 quite frequently of late to migrate our websites from IIS 6 servers to IIS 7.5.  I'm getting a strange error now on my next server.  When I run any msdeploy -sync operation I get a popup with the title "msdeploy.exe - EXCEPTION" and the text "Breakpoint A breakpoint has been reached."  I can only click "OK."  Even a "-verb:dump" command gives me this error.  I can run "msdeploy /?" without error.  I do see an error in the system log with an ID of 26, but that seems to be a fairly generic error.

When I try to run the sync command in reverse from the older webserver, I get an error telling me the remote service isn't running, but it is.  I tried creating a package on the old server but I also get the breakpoint error when I try to import the package on the new server.  I can't seem to find any information on this by searching the web.

Some further info:  I've tried uninstalling and reinstalling but it doesn't help.  I finally tried using Web Deploy 2.1 and it worked but I'd rather have the latest version.

machineConfig32 sync adding xmlns attribute to binding redirect

$
0
0

Trying to sync machine config files which have some binding redirects in them acrossed a web farm and it is working. Kind of. When it syncs the machine.config files the first one that it has to change or update it adds xmlns="" attribute to the assembly identity and binding redirect xml tags, and then every binding redirect after that one. Well of course that breaks the binding redirect. I don't want this in there, how can I avoid this since I have the xmlns already in the assemblyBinding tag for all binding redirects?

Manually removing the xmlns="" fixes the issue of course, or adding the "urn:schemas-microsoft-com:asm.v1" also works, but I'd rather not have the msdeploy executable adding stuff to my other web servers that is not even in the machine config file I'm syncing to. I don't know why it thinks its needed or adding it in. Any help is appreciated. Thanks!

How to specify an msdeploy command over multiple lines in a batch file?

$
0
0

How to specify an msdeploy command over multiple lines in a batch file?

I 'm calling msdeploy in a .cmd file and for improving readibiliy it would make sense to split the command over multiple lines.

Web Deploy 3.0 - Access is Denied / Will my Custom Manifest work

$
0
0

Hello fellow IIS Admins:

I am new to Web Deploy 3.0 and have an issue which someone may able to remedy:

I am trying to migrate a web site from a server to another sever using a custom manifest file.

Have ran this command as an Administrator (with ports 80 and 8172 - open on the destination machine and port 80 open on the source machine)  Tried opening 8172 on source server and the web deploy sevices on both machines are started and automatic and running as Network Service account.

Source Machine Windows 2003, IIS 6.0 32-bit 

Destination Machine Windows 2008 R2 64 bit with IIS 7.0

When I run this commad, Web Deploy says Access is Denied.  I am positive I have Admin sys privilages on both machines and all the pre-requ's are installed and configured rightly. P drive is showing on both machines in Windows Explorer. Have looked on Web Deploy forums for help.

msdeploy -whatif -verbose -verb:sync -source:manifest=p:\Custom.xml -dest:manifest=p:\Custom01.xml,computerName=Server02 > webdeploysync.log

<TestMigration>

<appHostConfig path="Dev_Mig_Home_Server01_to_Server02" />

authType=<"NTLM">

<enable:Auto/>

<enableLink:AppPool/>

<enableLink:AppPoolExtension/>

<dirPath path="C:\MyExtraFiles" />

<source:contentPath="'\\Server01\E$\intranet\blah.blah.local,includeAcls=true'" />

<dest:contentPath="'\\Server02\E$\websites,computerName=Server02,username=blah\Username,password=password'" />

<appPoolEnable32Bit="True" />

<gacAssembly path="'System.Web, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'" />

<comObject path="Microsoft.ApplicationHost.AdminManager" />

<source:regvalue="HKLM/Software/CustomTool/tracing/enabled -dest :regvalue=HKLM/Wow6432Node/CustomTool/tracing/enabled" />

<regKey path="HKLM\Software\ODBC" />

<source:regKey="'HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Inetmgr'" -dest:webServer,computerName=Server02 -skip:skipAction=Delete,objectName=regKey /> 

<UseRealAbo="False" />

</TestMigration>

I have a number of questions:

  1. With "Access is Denied" - what permissions or Group Policy is stopping me from running my msdeploy cmd?
  2. Does my Manifest look ok and will it work?
  3. Do I need to migrate the registry keys? I think I do; but seek an expert's second opinion.
  4. My web config for this site has SQL Server connection string - do I need to full specifiy the  dbFullSQL Provider plus relevant sub-Providers or does my manifest cater for my web.config file setting with the relevant Provider?
  5. I have no destination manifest file, only whats set in my cmd line string. Do I need to create a empty xml file called custom01.xml?

I hope someone can cast their expert eyes over what I have done and give me some positive feed back.  In the meantime, I shall carry on with the example commands on IIS.net and technet and see what happens.

Regards,

Spainish Waiter

 


WebDeploy from TeamBuild fails with http 504

$
0
0

Hi

I have a simple VS2012 mvc website. I have built a deployment package for this to deploy to the local instance of IIS 8. I am able to publish this manually from Visual Studio (right click the project and hit publish) and it works great.

I created a TFS 2012 build for the project. This successfully compiled and executed my unit tests. My next step was to enhance the build so that it also deployed the website - this is where I've run into problems.

I added the following as "MSBuild Arguments": /p:DeployOnBuild=True /p:DeployTarget=MsDeployPublish /p:DeployIisAppPath="Default Web Site/TrainingCompany" /p:MsDeployServiceUrl=http://dev2012 /p:username=username /p:password=password

Following a build I get the following in the msbuild log file:

Could not complete the request to remote agent URL 'http://dev2012:8172/msdeploy.axd?site=Default Web Site'.
The operation has timed out
at Microsoft.Web.Deployment.AgentClientProvider.GetHttpResponse(HttpWebRequest request)
at Microsoft.Web.Deployment.AgentClientProvider.PerformHeadRequestHelper(Boolean getVersionInfo, Version& maximumSupportedVersion, Version& minimumSupportedVersion)
at Microsoft.Web.Deployment.AgentClientProvider..ctor(DeploymentProviderContext providerContext, DeploymentBaseContext baseContext, String serverVersion)
at Microsoft.Web.Deployment.DeploymentManager.CreateObjectPrivate(DeploymentProviderContext providerContext, DeploymentBaseOptions baseOptions, DeploymentObject sourceObject, String serverVersion)
at Microsoft.Web.Deployment.DeploymentManager.CreateDestinationObject(DeploymentProviderOptions providerOptions, DeploymentBaseOptions baseOptions, DeploymentObject sourceObject, String serverVersion)
at Microsoft.Web.Deployment.DeploymentObject.SyncTo(DeploymentProviderOptions providerOptions, DeploymentBaseOptions baseOptions, DeploymentSyncOptions syncOptions)
at System.Dynamic.UpdateDelegates.UpdateAndExecuteVoid4[T0,T1,T2,T3](CallSite site, T0 arg0, T1 arg1, T2 arg2, T3 arg3)
at Microsoft.Web.Publishing.Tasks.VSMSDeployObject.SyncTo(VSMSDeployObject destObject, Object syncOptions, IVSMSDeployHost _host)
at System.Dynamic.UpdateDelegates.UpdateAndExecuteVoid4[T0,T1,T2,T3](CallSite site, T0 arg0, T1 arg1, T2 arg2, T3 arg3)
at Microsoft.Web.Publishing.Tasks.BaseMSDeployDriver.InvokeMSdeploySync()
at Microsoft.Web.Publishing.Tasks.BaseMSDeployDriver.SyncThruMSDeploy()
at Microsoft.Web.Publishing.Tasks.VSMSDeploy.Execute()

From fiddler I've tried executing the following request - my guess is I should get something back but I just get a 504 timeout:

http://dev2012:8172/msdeploy.axd

Could anyone please advise what I may be doing wrong or what extra steps I can take to troubleshoot?

Thanks,

Rob.

Web.config Attribute Not Being Updated.

$
0
0

I have a web.config that looks like this: 

<?xml version="1.0"?><configuration><appSettings><add key="fileLoggerMaxFileAgeInDays" value="" /></appSettings></configuration>

My parameters file looks like this: 

<?xml version="1.0" encoding="utf-8" ?><parameters><parameter name="fileLoggerMaxFileAgeInDays" defaultValue="10"><parameterEntry kind="XmlFile" scope="web\.config$" match="/configuration/appSettings/add[@key='fileLoggerMaxFileAgeInDays']/value/text()" /></parameter></parameters>

However when I try to update the attribute value in the web.config by importing through IIS I get the following error message: 

Parameter entry 'fileLoggerMaxFileAgeInDays/1' could not be applied to 'Web.Config'. Deployment will continue with the original data. Details:
No matches were found for the search string '/configuration/appSettings/add[@key='fileLoggerMaxFileAgeInDays']/value/text()' (type 'XmlFile').

Anyone have ideas why this isn't working? The XPath above seems to be the recommended way to update web.config appsettings but isn't working for me.




Foreign key constraints when using ScriptDropsFirst=true

$
0
0

I am trying to use msdeploy through our CI server to transfer local database to remote using dbFullSql provider

It works the first time when the remote db is blank but subsequent times it fails.

I have tried using ScriptDropsFirst=true but due to having foreign key constraints this doesnt work.

Has anyone got any ideas what the proper syntax is to get this working?

Thanks,

Adrian

msdeploy and AppPool running under domain user

$
0
0

Hi!

I'm using the CompanyApp.deploy.cmd to for remote deployment of a web application package (/t:Package). The AppPool runs under a domain user (because of kerberos), not under Network Service Account.

I am using a local Administrator for deployment.

When building on our CI server I call:

CompanyApp.deploy.cmd
/Y
/M:IP
/U:Administrator
/P:******
-enableRule:DoNotDeleteRule



following error occurs:

27-Mrz-2013 14:41:28 SetParameters from:
27-Mrz-2013 14:41:28 "C:\b\SH-SDS09-DEP2\CompanyApp\CompanyApp.SetParameters.xml"
27-Mrz-2013 14:41:28 You can change IIS Application Name, Physical path, connectionString
27-Mrz-2013 14:41:28 or other deploy parameters in the above file.
27-Mrz-2013 14:41:28 -------------------------------------------------------
27-Mrz-2013 14:41:28 Start executing msdeploy.exe
27-Mrz-2013 14:41:28 -------------------------------------------------------
27-Mrz-2013 14:41:28 "C:\Program Files (x86)\IIS\Microsoft Web Deploy V3\msdeploy.exe" -source:package='C:\b\SH-SDS09-DEP2\CompanyApp\CompanyApp.zip' -dest:auto,computerName="IP",userName="Administrator",password="********",includeAcls="False" -verb:sync -disableLink:AppPoolExtension -disableLink:ContentExtension -disableLink:CertificateExtension -setParamFile:"C:\b\SH-SDS09-DEP2\CompanyApp\CompanyApp.SetParameters.xml" -enableRule:DoNotDeleteRule -setParam:...
27-Mrz-2013 14:41:29 Info: Using ID '475e8a8f-94a4-4cda-8e4c-a281bbc75145' for connections to the remote server.
27-Mrz-2013 14:41:29 Info: Adding ACL's for path (Default Web Site/CompanyApp)
27-Mrz-2013 14:41:29 Error: (3/27/2013 2:41:29 PM) An error occurred when the request was processed on the remote computer.
27-Mrz-2013 14:41:29 Error: The account 'COMPANYDOMAIN\service_user' does not appear to be valid. The account was obtained from this location: 'system.applicationHost/applicationPools/CompanyAppPool'.
27-Mrz-2013 14:41:29 Error: Some or all identity references could not be translated.
27-Mrz-2013 14:41:29 Error count: 1.


When the AppPool runs under Network Service Account remote deployment is successful.

Which constellation leads to successful deployment here?

Sync Issues

$
0
0

Hi,

I am a web deploy newbie trying to sync 2 windows server 2012 web servers (VM's on windows azure) which has created a cloud service. All websites on iis plug into a SQL Azure Database which does not need to be included in webdeploy.

Ive run the following script

Import-AzurePublishSettingsFile '3-Month Free Trial-1-11-2013-credentials.publishsettings'

Import-Module 'C:\Program Files (x86)\Microsoft SDKs\Windows Azure\PowerShell\Azure\Azure.psd1'

$publishingServer = (gc env:computername).toLower()

$serviceName = 'myserviceweb03'

Get-AzureVM -ServiceName $serviceName | foreach {

     if ($_.Name.toLower() -ne $publishingServer) {
           $target = $_.Name + ":8080"
           $source = $publishingServer + ":8080"
           $exe = "C:\Program Files\IIS\Microsoft Web Deploy V3\msdeploy.exe"
           [Array]$params = "-verb:sync", "-source:contentPath=C:\Inetpub\wwwroot,computerName=$source", "-dest:contentPath=C:\Inetpub\wwwroot,computerName=$target";& $exe $params;
              }
                }

when running this I get the following error message

PS C:\SyncScript> C:\SyncScript\sync.ps1

Info: Using ID '1e66bbb5-xxxxx-xxxxx-a9d8-xxxxxxxxxxxxxxxx' for connections to the remote server.

msdeploy.exe : Error Code: ERROR_DESTINATION_NOT_REACHABLE

At C:\SyncScript\sync.ps1:17 char:12

+            & $exe $params;

+            ~~~~~~~~~~~~~~

    + CategoryInfo          : NotSpecified: (Error Code: ERR...N_NOT_REACHABLE:String) [], RemoteException

    + FullyQualifiedErrorId : NativeCommandError

More Information: Could not connect to the remote computer ("xxxxxweb03"). On the remote computer, make sure that

Web Deploy is installed and that the required process ("Web Deployment Agent Service") is started.  Learn more at:

http://go.microsoft.com/fwlink/?LinkId=221672#ERROR_DESTINATION_NOT_REACHABLE.

Error: Unable to connect to the remote server

Error: No connection could be made because the target machine actively refused it 10.0.0.5:8080

Error count: 1.

PS C:\SyncScript> 

 

As a matter of interest 10.0.0.5 is the source server.

Ive disabled the firewall (just for test purposes) & there is also an endpoint on this server for port 8080. I checked the management service on iis & checked allow remote management & restarted the service.

Id be happy to manually enter target & source servers to make things a little easier.

Any ideas where i might be going wrong.

Thanks in advance

Viewing all 565 articles
Browse latest View live


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>