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

Web Deploy 3.0 service crash

$
0
0

Hi,

I've been fighting WebDeploy 3.0 for a few days because Web Deploy Service (MsDepSvc.exe) randomly crashes. I've managed to recreate this behavior by executing the following run command 10-15 times on a row:

msdeploy.exe -verb:sync -source:runCommand="ipconfig" -dest:auto,computerName="remoteServer",userName="domain\user",password="password"

By duplicating this command in a .bat file about 20 times, I've managed to consistently replicate this crash. In addition we've seen this behaviour very frequently in our continuous deployment process, where this issue was originally discovered, but at different intervals and times.

Note: By adding back Web Deploy 2.0 on the servers, the problem goes away.

On the server running MsDepSvc the follwing relevant entries are found in the event log:

1) Entry from WebDeploy: 

System.ArgumentException: Invalid token for impersonation - it cannot be duplicated.
at System.Security.Principal.WindowsIdentity.CreateFromToken(IntPtr userToken)
at System.Security.Principal.WindowsIdentity..ctor(IntPtr userToken, String authType, Int32 isAuthenticated)
at System.Security.SecurityContext.CreateCopy()
at System.Threading.ExecutionContext.CreateCopy()
at System.Threading._IOCompletionCallback.PerformIOCompletionCallback(UInt32 errorCode, UInt32 numBytes, NativeOverlapped* pOVERLAP)

2) Entry from .NET runtime:

Application: MsDepSvc.exe
Framework Version: v4.0.30319
Description: The process was terminated due to an unhandled exception.
Exception Info: System.ArgumentException
Stack:
at System.Security.Principal.WindowsIdentity.CreateFromToken(IntPtr)
at System.Security.Principal.WindowsIdentity..ctor(IntPtr, System.String, Int32)
at System.Security.SecurityContext.CreateCopy()
at System.Threading.ExecutionContext.CreateCopy()
at System.Threading._IOCompletionCallback.PerformIOCompletionCallback(UInt32, UInt32, System.Threading.NativeOverlapped*)

Note: We use WebDeploy 3.0 from the source/client. The command works perfectly with WebDeploy 2.0 on the server, so for now we've been forced to use 2.0 until this problem is solved in 3.0. 

Would be very interested to hear if others are able to replicate this, cause we have these errors on 10s of servers in 2 different environments/domains.

Thanks,

Jon Arild Tørresdal


II6 migration to IIS7 Question

$
0
0

I want to create a package file of my webserver and the documentation that I found for doing so is:

msdeploy -verb:sync -source:metakey=lm/w3svc/1-dest:package=c:\Site1.zip>WebDeployPackage.log

The command works, but only packages the default website that is located on the C drive. I need to also package a website that is located on a different drive.How do I specify the path of the source?

 

Default website is located at:  C:\Inetpub\wwwroot

My Main site is located on a different drive: E:\Inetpub\wwwroot

Thank for your help!

Wdeploy v3 Parameterization XMLFile

$
0
0

Hello, 

I am trying to take advantage of this new feature to give an XML parameter a Default Value from another xml file (in the package being deployed). 
 
I understood that the DefaultValue path is a relative path to wherever Web Deploy is running on the destination.
And indeed, if I take this example : 

<parameters><parameter name="MyTestParam" description="Test Param" defaultValue="\default.config:://add[@key='test']"><parameterEntry kind="XmlFile" scope="web\.config" match="//add[@key='test']" /></parameter></parameters>

http://forums.iis.net/t/1192891.aspx/1

it works if default.config is located at the root folder of the destination (c:\).

I still don't understand how to get the default value from a file in a package being deployed as shown in this example:

<parametername="Replacement Param"defaultValue="\web.config:://connectionStrings"><parameterEntrykind="XMLFILE"scope="web\.config$"match="//connectionStrings"/></parameter>

http://www.iis.net/learn/publish/using-web-deploy/parameterization-improvements-in-web-deploy-v3#author-info
<div></div> <div>What path should be given to the DefaultValue to point to the package itself?</div> <div>Any help would be greatly appreciated</div>

Bri


-useChecksum and -whatif BUG?

$
0
0
When I use -useChecksum in combination with -whatif (non-verbose), the log will still show *all* files with different time stamps changing. However, if you deploy live non-whatif it will only deploy the files with difference in checksum. We are still using msdeploy v1.1. Our developers use the -whatif option a lot via our homegrown msdeploy web interface and the whatif will create some confusion. Is there a parameter I am missing or is this a bug? Any feedback is appreciated.

object 'ftpServer' cannot be added to object 'site'

$
0
0
When I deploy a package to the same machine I get no errors. But deployment on a remote machine results in an error. Command:msdeploy.exe -verb:sync - source:package=C:\demo.zip -dest:apphostconfig="centraladmin.localhost", computerName=pc01 - whatif Error:Error: (8-6-201 16:31:54) An error occurred whenthe request was prrocessed on then remote computer. Error: Child object 'ftpServer' cannot be added to object 'site'. The 'site' provider may not support this deployment.

Error count: 1

 

There is no FTP server on the source of target machine.  

Env for source and remote machine:

Windows 7Latest msdeploy tool.Net 4.0Visual Studio 2010Admin rights

 

.net versions

$
0
0

Hi 

I want to migrate from IIS6 on Server 2003 to IIS7 on Server 2008 R2. I installed everything fine from the MS Web Platform Installer on my 2k8 R2 box (it isn't in my DMZ yet) but had some issues getting the installer to run so had to update to .net3.5 on my 2003 box. I then had to download the ms deploy, the one on my 2008 box is v3 that came automatically, the one on the 2003 box i had to download manually is v2. I managed to export my stuff from IIS6 but when i run the command with whatif bit in from here

http://www.iis.net/learn/publish/using-web-deploy/migrate-a-web-site-from-iis-60-to-iis-7-or-above

I get 

C:\Program Files (x86)\IIS\Microsoft Web Deploy V3>msdeploy -verb:sync -source:p

ackage=c:\Site1.zip -dest:metakey=lm/w3svc/1 -whatif > WebDeploySync.log
Error Code: ERROR_FRAMEWORK_VERSIONS_DO_NOT_MATCH
More Information: The versions of the .NET Framework Configuration Provider (roo
tWebConfig32) are different on the source (2.0.50727.1433) and destination (4.0)
. Learn more at: http://go.microsoft.com/fwlink/?LinkId=221672#ERROR_FRAMEWORK_
VERSIONS_DO_NOT_MATCH.
Error count: 1.

Can someone advise me how I get around this please 

Many thanks 

James 

How to hide password from MSDeploy command

$
0
0

I'd like to know is there anyway to hide the password from MSDeploy command.

I am using something like

 computername=x.x.x.x,userName=user1,password=password

 

It is clear text in my script and log file,  we are required to change it asap. any help will be greatly appreciated. 

Using NTLM with WebDeploy 2.1 results in HTTP 401.2

$
0
0
I’m working with a client who is using Web Deploy to publish an internal web server. When running msdeploy.exe with basic authentication we are able to deploy: msdeploy.exe -source:package=WebSite.zip -dest:auto,wmsvc=web2,IncludeAcls="False",Username=”Domain\TFSBuild”,Password=”*****”,AuthType="Basic" -verb:sync -disableLink:AppPoolExtension -disableLink:Cont entExtension -disableLink:CertificateExtension -allowUntrusted -retryAttempts=2 The next step is to remove the credentials from the deployment process so we can avoid baking in the username and password to the Team Build 2010 build definition: msdeploy.exe -source:package=WebSite.zip -dest:auto,wmsvc=web2,IncludeAcls="False", AuthType="NTLM" -verb:sync -disableLink:AppPoolExtension -disableLink:Cont entExtension -disableLink:CertificateExtension -allowUntrusted -retryAttempts=2 When we change the AuthType parameter to NTLM we get the following error: Error: Remote agent (URL https://web2:8172/msdeploy.axd) could not be contacted. Make sure the remote agent service is installed and started on the target computer. Error: An unsupported response was received. The response header 'MSDeploy.Response' was '' but 'v1' was expected. Error: The remote server returned an error: (401) Unauthorized. Error count: 1. The server web logs show a single 401.2 error: 2011-12-12 16:25:05 172.24.6.16 POST /msdeploy.axd - 8172 - 172.24.6.14 - 401 2 5 15 I would expect to see something like a denied error followed by another request that has the NTLM token attached that results in a web log entry with the username attached. We have tried: • Verified the user exists in the IIS Manager Permissions at the site and application level • Made the user is a local administrator on the machine • Ensured the WindowsAuthenticationEnabled registry key is set for the management service • Ensured that delegation rules exist and that administrators are allowed to bypass the rules • Watched Process Monitor for any hints on file system access denied errors Any thoughts on next steps to troubleshoot why NTLM authentication isn’t working?

Recovering Files Deleted by Web Deploy

$
0
0

I just deployed an ASP.NET MVC application to IIS 7 running on Win 7 Professional. I wanted to make sure some old files got deleted with the update, so I unchecked "Leave extra files on destination (do not delete)". I protected and backed up the App_Data folder, but to my disgrace I forgot about a HUGE folder of important uploads! I just did not think it through.. On top of that the system backup had failed and is now unable to restore. Please give me some hope :/ These uploads are customer order history. It is worth hundreds of dollars to recover these files. They would have to be manually uploaded again one at a time if I cannot retrieve the uploads folder. They are not in the recycle bin.

------ Publish started: Project: ProjectName, Configuration: Release Any CPU ------
Transformed Web.config using Web.Release.config into obj\Release\TransformWebConfig\transformed\Web.config.
Copying all files to temporary location below for package/publish: obj\Release\Package\PackageTmp.
Start Web Deploy Publish the Application/package to http://servername-pc/MSDEPLOYAGENTSERVICE ...
Deleting filePath (Default Web Site/HTS\ ...... ....Deleting filePath (Default Web Site/HTS\Uploads\ffbca9e6-7d0b-4445-9769-cd8b2c78a1d3-Display05.jpg). Deleting filePath (Default Web Site/HTS\Uploads\ffe0c243-e11f-4401-b80f-192affd78b57-layout.jpg). Deleting filePath (Default Web Site/HTS\Uploads\Thumbs.db).Deleting dirPath (Default Web Site/HTS\Uploads).

How do I prevent MSDeploy skip from trying to delete parent directories

$
0
0
Using the skip directive for MSDeploy sync I can specify Directories and paths to ignore from the sync operation. However when I set a rule to skip a sub-folder although it correctly skips the sub-folder and contents it tries to delete the parent folder and fails because the directory is not empty. Do I really have to specify a skip directive for each level in the path hierarchy or is there a trick to this? The sync is being called by CCNet in an exec block and in this case I want to skip everything in the Desktop\Docs directory -verb:sync -source:contentPath="$(ProjectsDirectory)$(projectName)$(ProjectsWorkingDirectory)\Website\" -dest:contentPath="C:\WWWRoot\$(websiteFolder)" -skip:objectName=dirPath,absolutePath="\\Desktop\\Docs" When I use this the \Desktop\Docs folder (and contents) are skipped however MSDeploy then tries to delete \Desktop and fails because the folder is not empty. I would have thought that the whole path would be skipped. I tried to use -skip:Directory="\Desktop\Docs" and that behaves the same way. So how do I get MS Deploy to skip entire paths through the hierarchy?

Newbie: Site Migration with Web Deploy ERRORS

$
0
0

Hi

I am a newbie to IIS and I am trying to migrate a site from IIS 7.5 to another IIS 7.5 using Web Deploy.

I followed these steps:

1. msdeploy -verb:sync  -source:apphostconfig="My Site Name" -dest:package=c:\site1.zip

 2. msdeploy -verb:sync -source:package=c:\site1.zip -dest:apphostconfig="My Site Name" -whatif > msdeploysync.log

When I look into  msdeploysync.log, I get the following errors at the top of the log file:

 Info: Adding MSDeploy.appHostConfig (MSDeploy.appHostConfig).
Info: Adding appHostConfig (My Site Name).
Info: Filename:
Error: Cannot add duplicate collection entry of type 'site' with unique key attributes 'name, id' respectively set to 'My Site Name, 10'

 Retrying operation 'Add' on object appHostConfig (My Site Name). Attempt 1 of 5.
Info: Updating site (MSDeploy.appHostConfig/appHostConfig[@path='My Site Name']/site[@name='My Site Name']).
Info: Adding child binding (MSDeploy.appHostConfig/appHostConfig[@path='My Site Name']/site[@name='My Site Name']/bindings/binding).
Info: Adding child binding (MSDeploy.appHostConfig/appHostConfig[@path='My Site Name']/site[@name='My Site Name']/bindings/binding).
Info: Adding child binding (MSDeploy.appHostConfig/appHostConfig[@path='My Site Name']/site[@name='My Site Name']/bindings/binding).
Info: Adding child binding (MSDeploy.appHostConfig/appHostConfig[@path='My Site Name']/site[@name='My Site Name']/bindings/binding).
Info: Adding child binding (MSDeploy.appHostConfig/appHostConfig[@path='My Site Name']/site[@name='My Site Name']/bindings/binding).
Info: Adding child binding (MSDeploy.appHostConfig/appHostConfig[@path='My Site Name']/site[@name='My Site Name']/bindings/binding).
Info: Adding child binding (MSDeploy.appHostConfig/appHostConfig[@path='My Site Name']/site[@name='My Site Name']/bindings/binding).
Info: Updating traceFailedRequestsLogging (MSDeploy.appHostConfig/appHostConfig[@path='My Site Name']/site[@name='My Site Name']/traceFailedRequestsLogging).
Info: Adding child application (MSDeploy.appHostConfig/appHostConfig[@path='My Site Name']/site[@name='My Site Name']/application[@path='/']).
Info: Adding child virtualDirectory (MSDeploy.appHostConfig/appHostConfig[@path='My Site Name']/site[@name='My Site Name']/application[@path='/']/virtualDirectory[@path='/']).

 Please let me know how to fix this.

Thanks.

G

 

 

WebDeploy for ASP.NET Website

$
0
0

Hi all,

I am contemplating idea of using WebDeploy for deploying ASP.net websites. I am going through various articles but most of those are about deploying ASP.Net Web Application and not website.

When I right-click on Web Application project, I get lot of options to configure through WebDeploy but same is not in the case of Website.

I am sure WebDeploy can be used to deploy websites but I am confused about where to start. Do I have to use WebDeploy command line API's through MSBuild? What is it? Can someone please let me know the standard procedure?

Thanks,

allowuntrusted is being ignored

$
0
0

Hi,

I have a machine running fresh installation of Win2008 R2 which holds a webapp on IIS. I try to use msdeploy command line tool to publish a deployment package to this machine, but i keep on getting error regarding certificate. 
I am using -allowuntrusted, but it still keeps on giving the same error.

I've been trying different things (like changing msdeploy port on iis, installing certificate on the other machine, reinstall iis roles, tons of other) for 2 days now with absolutely no luck.

This is what I run:

msdeploy.exe -verb:sync -source:package="Web.zip" -dest:auto,ComputerName="https://machineA:8173/msdeploy.axd?site=app.com",UserName="AdminUser",Password="SecurePassword,AuthType="Basic" -allowUntrusted

 

If anybody has any idea, suggestions, anything - please share, because I have no more ideas what can I do!

P.s. To make things more interesting, this is what I get when I run the same command on the IIS-containing machine (even after changing dest to sync):

Error: A '-dest' argument must be specified with the 'sync' verb.
Error count: 1.



 Kind regards,
Elena 

Unable to install office developper tools for visual studio 2012 offline

$
0
0

Hello,

 

I am using the following process to install Office Developer tools for visual studio 2012 offline because the computer on which I want to install it is not connected to internet.

http://jamestsai.net/Blog/post/Offline-install-of-Office-Developer-Tools-for-Visual-Studio-2012.aspx

The download part works fine.

But when I try to run the command line instruction to install it on the target computer, I receive the following error :

The software that you obtain using the Web Plaform Installer Command Line Tool is licensed to you by its owner.  Microso ft grants you no rights for third party software.

Unexpected exception occurred

Un élément installer doit contenir un élément iisComponent enfant, un élément installCommands ou un élément msDeploy. Li gne 26530, position 8.

Sorry the final error message is in french because I working on a french OS.

I use the same process to try to install workflow manager but I receive the same error.

Anybody can help me ?

Thanks in advance.

How to skip bindings using WD3.0 GUI?

$
0
0

As I export a server config using the Web Deploy GUI, what parameters ought I skip, those that hold the bindings? I'd like skip those and then export the rest with a password.

I got a recommendation that when creating additional servers in a web farm that one can avoid machine key issues if one uses the web deploy GUI to export a server configuration with a password.  Since I'm not building hundreds of web servers, maybe only a few, this seems to work, so I'd like to continue with the GUI for now--it works. Mostly.

On importing a config built from the master, the master server bindings are carried into the new server, and it's a bit of a pain to reset on 10+ bindings that used to be okay.

Does anyone know which parameter holds the bindings, without messing with the machine keys?

 

 


Set commandTimeout in MSDeploy when using auto provider

$
0
0

I'm using MS Deploy 2.1 to deploy a Web App, along with some SQL scripts to set up the database. The deployment package is configured in Visual Studio 2010, to contain both the SQL Scripts and the web app.

To deploy, we are using MSDeploy with the "auto" provider.

The catch is that one of the SQL scripts is timing out. If we were using the dbFullSql provider we could specify a commandTimeout. (I have tested this, with the 'problem' script on its own, and it works fine.) But I can't find any way to specify an SQL Command Timeout when using the "auto" provider. Can it be done?

John

John Rusk, http://dotnet.AgileKiwi.com - .NET and Agility

Deployment issue of a web application with msdeploy

$
0
0

I have a web application and I am trying to deploy it on a webserver using MSDeploy.exe (Web Deploy 2)

I have tried 4 scenarios:
1. Through VS2010 Publish method with following settings:

Publish Method: Web Deploy
Service Url: https://<<MyServerName>>:8172/MsDeploy.axd
Site/application: <<MyWebSiteName>>
Allow untrusted: checked
Username: <<MyUsername>>
Password: <<MyPassword>>
This method works just fine. On <<MyServerName>> machine I have Web Management Service running; I have a website <<MyWebSiteName>> and <<MyUserName>> is an IIS Manager for it.

2. Through VS2010 Publish method with following settings:

Publish Method: Web Deploy
Service Url: https://<<MyServerName>>:8172/MsDeploy.axd
Site/application: <<MyWebSiteName>>/<<MyWebAppName>>
Allow untrusted: checked
Username: <<MyUsername>>
Password: <<MyPassword>>
This method works just fine.

3. Through MSDeploy.exe command line (within a Powershell script)

$Source = "contentPath='....\_PublishedWebsites\MyWebApp'"
$Destination = "contentPath=MyWebSiteName,computerName='https://fc-wapps-trial:8172/MsDeploy.axd?Site=WebSiteTest',Username=MyUsername,Password=MyPassword,AuthType=basic,IncludeAcls=False"
MSDeploy -verb:sync -source:$Source -dest:$Destination -allowUntrusted
This method also works fine.

4. Through MSDeploy.exe command line (within a Powershell script)

$Source = "contentPath='....\_PublishedWebsites\MyWebApp'"
$Destination = "iisApp=MyWebSiteName/MyWebAppName,computerName='https://fc-wapps-trial:8172/MsDeploy.axd?Site=WebSiteTest/MyWebAppName',Username=MyUsername,Password=MyPassword,AuthType=basic,IncludeAcls=False"
MSDeploy -verb:sync -source:$Source -dest:$Destination -allowUntrusted

This method doesn't work. I am getting the following error.
Error Code: ERROR_USER_UNAUTHORIZED
More Information: Connected to the destination computer ("MyServerName") using the Web Management Service, but could not authorize. Make sure that you are using the correct user name and password, that the site you are connecting to exists, and that the credentials represent a user who has permissions to access the site.
Error: The remote server returned an error: (401) Unauthorized.

I was looking at what is the actuall MSDeploy command that the method 2 uses and I got something like:

msdeploy.exe
-source:manifest='...\MyWebApp.SourceManifest.xml'
-dest:auto,ComputerName='https://MyServerName:8172/MsDeploy.axd?site=WebSiteTest',UserName='MyUsername',Password='MyPassword',IncludeAcls='False',AuthType='Basic'
-verb:sync
-disableLink:AppPoolExtension
-disableLink:ContentExtension
-disableLink:CertificateExtension
-skip:objectname='dirPath',absolutepath='...\App_Data$'
-setParam:kind='ProviderPath',scope='IisApp',match='^...\\PackageTmp$',value=WebSiteTest/WebAppTest
-setParam:kind='ProviderPath',scope='setAcl',match='^..\\PackageTmp$',value=WebSiteTest/WebAppTest
-allowUntrusted
-retryAttempts=2

Now this doesn't seem to be anything close to what I am using in method 4.

So my questions are:
- What I am doing wrong?
- How can I deploy a web application as a website application in IIS7 using MSDeploy.exe command

Thanks in advance for your help
Iulian

WebDeploy cant deploy site

$
0
0

Hi,

I've created a package from site and try to 'Import server or site package' to another IIS

but getting the following exception:

" The selected package contains applications, which cannot be install the package within the site "

It appears that WebDeploy cant package a site and will work only under existing site

if i do the restore under Default Web Site or other WebSite i've already created it works but creating the package site under the current

Does dbDACFx provider support SqlCommandVariable parameters?

$
0
0

Hi

I have been playing around with the dbDACFx provider to deploy databases based on the output from my SSDT project (a dacpac file), instead of using the $(IntermediateOutputPath)AutoScripts\MyDb_IncrementalSchemaOnly.dacpac which can be generated for my. 

I have tried to use the Parameters.xml file to set custom deploy parameters but when using the the following xml I am a bit lost:

<parameter name="Service Account" description="Please provide a service account" defaultValue="Test" tags="">
<parameterEntry kind="SqlCommandVariable" scope="<which file to use here?>" match="ServiceAccount" />
</parameter>

What file do I use as scope? As I see it, it makes no sense to use the dacpac file, since it is some binary format. How can I instruct ms deploy to pass the parameters on to the DACFx framework so when it deploys the dacpac the sqlcmdvars have been correctly set?

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?

Viewing all 565 articles
Browse latest View live


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