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

Set physical path of app in IIS during deployment

$
0
0

I need to set the physical location of a web app in IIS to an alternate location - for example C:\app\<buildNumber> - when deploying with msdeploy and a package file.  I am attempting the following command but it always results in the app folder being located in %SystemDrive%\inetpub\wwwroot\<AppFolder>.

msDeploy.exe -verb:sync -source:package="C:\temp\publish\MyApp.zip" -dest:auto -setParam:name="IIS Web Application Name",value="Default Web Site/MyApp" -setParam:kind=DestinationVirtualDirectory,scope="Default Web Site/MyApp",value="C:\app\1.1.0"

Any ideas what I'm missing?


How to create a website during publishing

$
0
0

Hi,

It is said that if you need to use web deploy to migrate a website, you have to create a website or web application on the target IIS server. Is it necessary to create a website in advance? Is there any way to create virtual directory or web application during the deployment?

Thanks in advance.

Migrate from IIS 6 to IIS 10

$
0
0

I know...why do we still have Windows Server 2003 running anywhere?  We are moving everything up to Windows Server 2016.  One of the first servers is our internal web server that is still running Windows Server 2003 and IIS 6.  I am a developer, not an operations guy, and I'm looking for input on the best course to do this upgrade from a web applications standpoint.  What, if anything, needs to happen to our web applications?  Do we just need to rebuild the projects with a newer version of .Net, or what?

Thanks in advance for any help!

Web Deploy to Azure Internal ASE Through Reverse Proxy?

$
0
0

Hi everyone, hope you can help me!  I created a Web App within an internal App Service Environment (ASE) in Azure.  By definition, the URI (e.g. http:://MyInternalApp.Apps.MyCompany.com) is only available on the internal company network, not the general internet.  The code is in Visual Studio online.  How to get web deploy working?

It's all good internally.  We have a DNS server in Azure, have the proper certificates for *.scm.apps.mycompany.com.  I created a VM in Azure with Visual Studio on it, and can Web Deploy from there.

Ok!  We need to "punch out" that ".scm." endpoint, because ultimately want to web deploy from Visual Studio Online.  An IIS VM was set up with addresshttps://MyInternalApp.scm.MyApps.MyCompany.com and Reverse proxy over to the Azure Web App.  Works!  The Kudu console comes up after entering the deployment credentials and you can perform console functionality.  Note ONLY the ".scm." endpoint was punched out, not the web site itself - that would of course defeat the purpose of having it only internally accessible.

But..  Visual Studio on my laptop, when going to do a web deploy, the "connection" tab for "Publish" comes up fine, but when you "Validate" the connection, you get a very generic ERROR_CONNECTION_TERMINATED event I can find little information on for my scenario.

QUESTION:  How exactly do I need to set up IIS / Features / Reverse Proxy / Rules / Firewall / Ports / etc to get web deploy to successfully "connect" to the ASE?   Any advice or recommendations are welcome!  Thanks in advance.

Failed to apply migration

$
0
0

Webdeploy failed to apply migration saying problem between lines "1609" and "1616" of a script

Here exactly

IF NOT EXISTS(SELECT * FROM [__EFMigrationsHistory] WHERE [MigrationId] = N'20170331103534_corporate7')
BEGIN
    CREATE UNIQUE INDEX [IX_Persons_CorporatePersonId] ON [Persons] ([CorporatePersonId]) WHERE [CorporatePersonId] IS NOT NULL;
END;

GO

error is - Invalid column name 'CorporatePersonId'

Migration 20170331103534_corporate7 already applied to DB as many other migration after it. I double checked connection string. All point to DB where 20170331103534_corporate7 applied long time ago

Full error

Severity    Code    Description    Project    File    Line    Suppression State
Error        Web deployment task failed. (Ошибка при выполнении сценария базы данных. Ошибка произошла между следующими строками сценария: "1609" и "1616". Дополнительные сведения могут содержаться в подробном журнале. Начало команды следующее:
"IF NOT EXISTS(SELECT * FROM [__EFMigrationsHisto"
 Invalid column name 'CorporatePersonId'. http://go.microsoft.com/fwlink/?LinkId=178587  Дополнительные сведения: http://go.microsoft.com/fwlink/?LinkId=221672#ERROR_SQL_EXECUTION_FAILURE.)
Failed to publish the database. This can happen if the remote database cannot run the script. Try modifying the database scripts, or disabling database publishing in the Package/Publish Web properties page. If the script failed due to database tables already exist, try dropping existing database objects before creating new ones. For more information on doing these options from Visual Studio, see http://go.microsoft.com/fwlink/?LinkId=179181.
Error details:
Ошибка при выполнении сценария базы данных. Ошибка произошла между следующими строками сценария: "1609" и "1616". Дополнительные сведения могут содержаться в подробном журнале. Начало команды следующее:
"IF NOT EXISTS(SELECT * FROM [__EFMigrationsHisto"
 Invalid column name 'CorporatePersonId'. http://go.microsoft.com/fwlink/?LinkId=178587  Дополнительные сведения: http://go.microsoft.com/fwlink/?LinkId=221672#ERROR_SQL_EXECUTION_FAILURE.
Invalid column name 'CorporatePersonId'.
   at System.Data.SqlClient.SqlConnection.OnError(SqlException exception, Boolean breakConnection, Action`1 wrapCloseInAction)
   at System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj, Boolean callerHasConnectionLock, Boolean asyncClose)
   at System.Data.SqlClient.TdsParser.TryRun(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj, Boolean& dataReady)
   at System.Data.SqlClient.SqlCommand.RunExecuteNonQueryTds(String methodName, Boolean async, Int32 timeout, Boolean asyncWrite)
   at System.Data.SqlClient.SqlCommand.InternalExecuteNonQuery(TaskCompletionSource`1 completion, String methodName, Boolean sendToPipe, Int32 timeout, Boolean asyncWrite)
   at System.Data.SqlClient.SqlCommand.ExecuteNonQuery()
   at Microsoft.Web.Deployment.DBStatementInfo.Execute(DbConnection connection, DbTransaction transaction, DeploymentBaseContext baseContext, Int32 timeout)    CETDB        0    

Web deploy can't migrate connect to remote server

$
0
0

Hi,

I'm learning how to migrate website to a remote server, however, when I was trying to deploy the website, it report the error " can't connect the remote server". I should have permission to connect the remote server. So how could I enable the connection with remote server with remote server? or how could I grant permission?

Thanks in advance.

Insert web.config elements at deploy time?

$
0
0

I know how to update existing web.config values using parameters.xml at deployment time. However, there are cases where I need to insert elements/attributes at deployment time. How is this possible?

Deploy Package with MSDeploy

$
0
0

Hi,

I am using MSBuild and MSDeploy to create a deployment package and to deploy the contents of the package to a folder. My existing code works, but it also throws the following error:

Error: A value for the 'setAclUser' setting must be specified when the 'setAcl' provider is used with a physical path.

Does anyone know how to get rid or the error or a better way to accomplish my goal (I obviously must be doing something wrong).

See code below (I'm running it as a batch file).

Thanks

 

CD C:\Development\Code\App\App.Web.Site

"C:\WINDOWS\Microsoft.NET\Framework\v4.0.30319\MSBuild.exe" App.Web.Site.csproj /target:Package /P:Configuration=Dev;PackageLocation="C:\DeployPackage\DEV\App.Web.Site.zip"

"C:\Program Files\IIS\Microsoft Web Deploy\msdeploy.exe" -verb:sync -source:package='C:\DeployPackage\DEV\App.Web.Site.zip' -dest:auto -setParam:"IIS Web Application Name"="C:\DeployedFiles"


MSDeploy - deploy site and runcommand

$
0
0

Hi,

Below command is working as expected for deploying package to IIS with configured parameters in ProjectParameters.xml.

msdeploy.exe
-source:package='e:\deploy\ProjectApp.zip'
-dest:auto,includeAcls='False'
-verb:sync
-setParamFile:"e:\deploy\ProjectParameters.xml" 

In addition to this, would like to run the batch file using runCommand(path: 'e:\deploy\ProjectBatch.bat') along with deployment.
Have tried with source:manifest=ProjectManifest.xml option.

But either source:package or source:manifest shall be used at once.

It would be great  if provided with any best approach to solve this issue.

Thanks,
Saravana.

Visual studio 2017 partial publish failing

$
0
0

Hi

I am using Visual studio professional 2017 Version 15.1(26403.3) Release.

We have one website of .net framework 3.5. When i try to do 'Publish Web App' option using visual studio 2017 to the corresponding deployed site which is on US server i am getting following exception,

Could not connect to the remote computer ("{server IP}") using the specified process ("Web Management Service") because the server did not respond. Make sure that the process ("Web Management Service") is started on the remote computer.  Learn more at: http://go.microsoft.com/fwlink/?LinkId=221672#ERROR_COULD_NOT_CONNECT_TO_REMOTESVC.

To solve this i checked following things but still it's not working,

1. Web Management Service is running on the server and my machine also.

2. Firewalls are off on my machine and server also.

3. Web deployment service is also running on server and my machine.

I checked one more thing that when instead of clicking 'Preview' on publish window if i click direct publish then it works but if i preview the files and select some of them and do publish then it fails(partial publish).

Can you please help on this.

Thanks,

Ashvini

 

Website Publish doesn't have option to do partial publish using Visual Studio 2017

$
0
0

Hi

I am using Visual Studio Professional 2017 - Version 15.1(26403.3) Release. I am having one mvc website using .net framework 4.5 and now i am trying to do publish using Visual studio 2017 it has separate option for Preview which doesn't have facility to select some files and do Publish as we were having in older visual studio versions. I think it can do only whole publish. Is partial publish feature available in Visual Studio 2017? Please confirm.

One more thing i noticed when i do Publish of Web Application instead of Website it has that option to do partial publish.

Thanks,

Ashvini

DefaultAppPool will change after deploy even I am not deploy to this appPool

$
0
0

I need to deploy a package zip build by msbuild , and I set the parameter to deploy to a site let say abcSite and the pool  abcPool , it's pipeline mode is integrate.

And did not using DefaultAppPool, the DefaultAppPool is also use integrate as the pipeline mode.

But After deployment DefaultAppPool will be changed to classic as the pipeline mode, as some website is using DefaultAppPool , so they throw error.

More information:

This is the pubxml for msbuild.

<?xml version="1.0" encoding="utf-8"?><!--
This file is used by the publish/package process of your Web project. You can customize the behavior of this process
by editing this MSBuild file. In order to learn more about this please visit http://go.microsoft.com/fwlink/?LinkID=208121.
--><Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"><PropertyGroup><WebPublishMethod>Package</WebPublishMethod><LastUsedBuildConfiguration>Trunk</LastUsedBuildConfiguration><LastUsedPlatform>Any CPU</LastUsedPlatform><SiteUrlToLaunchAfterPublish /><LaunchSiteAfterPublish>True</LaunchSiteAfterPublish><ExcludeApp_Data>False</ExcludeApp_Data><DesktopBuildPackageLocation>C:\package\abc.Zip</DesktopBuildPackageLocation><PackageAsSingleFile>true</PackageAsSingleFile><DeployIisAppPath>abcSite</DeployIisAppPath></PropertyGroup></Project>

MSBuild command

"C:\Program Files (x86)\MSBuild\14.0\Bin\MSBuild.exe"
/t:Rebuild
/T:Package /P:Configuration=Debug;
PublishProfile="D:\...\xxx.pubxml";AutoParameterizationWebConfigConnectionStrings=false "D:\...\xxx.csproj"

MSDeploy Command

C:\Program Files (x86)\IIS\Microsoft Web Deploy V3\msdeploy.exe
-source:package='C:\package\abc.Zip'
-dest:auto,computerName='dev07',includeAcls='False'
-verb:sync 
-disableLink:AppPoolExtension -disableLink:ContentExtension -disableLink:CertificateExtension -setParam:name='IIS Web Application Name',value='abcSite' -setParam:name='IIS Web Application Pool Name',value='abcPool' -setParam:name='IisVirtualDirectoryPhysicalPath',value='C:\abc'

I want to ask how to fix it?

Cannot create a file when that file already exists. (Exception from HRESULT: 0x800700B7)

$
0
0

Getting this message when trying to migrate to another server. I've read the other posts on here regarding this message but cant seem to work this out. Moving from Server 2008 to 2016, web deploy 3.6 on both. Can anyone help with this error?

MSWebDeploy not syncing IIS authentication credentials

$
0
0

Hi I'm trying to sync an application from to a site on a different system, and I'm noticing that the authentication credentials aren't syncing.  After running the command below, I check the destination in IIS manager -> Authentication -> Anonymous Authentication -> Edit and I see the default IUSR account.   I expected to see the same Active Directory service account that is on the primary server.   Is there something I am missing from my command line below?   Both source and destination IIS servers are Windows 2012 R2. 

(On the source server in the apphost config I do see the username and encrypted password under the location for the application. But, on the destination server there isn't any entries for location in the apphost config file.)

"C:\Program Files\IIS\Microsoft Web Deploy V3\msdeploy"  -verb:sync -source:iisApp="Default Web Site  Public/apps\MyApp",computername=IISSvr1 -dest:iisApp="Applications/MyApp" -allowUntrusted

Web Deploy 3.6 - Socket error (10054) and timeout error

$
0
0

We're using Web Deploy v3.6 to deploy the updates of our web application to the server.

Recently, socket error (10054) started to appear in some of the servers runningWindows Server 2012.

The endpoints are reachable, physical connectivity is there, runs on default port 80.

Have ensured that the invoking user is in the Administrators group also.

Have given the response from the command prompt and what is logged in the event viewer below (for security reasons, removed the user name and FQDN of the computer from the event viewer log)

We're totally stuck and could not proceed further.

Requesting the community to provide your feedback to resolve the issue.

Any troubleshooting tip would be highly appreciated.

Response in command prompt:

C:\Program Files\IIS\Microsoft Web Deploy V3>msdeploy.exe -verb:sync -source:runCommand="sc query WMSvc" -dest:auto,computerName=BAVNAPPNMV01
Info: Using ID '28fdf547-6794-42f6-a421-000f4312eba1' for connections to the remote server.
Warning: Retrying the sync because a socket error (10054) occurred.
Retrying operation 'Serialization' on object MSDeploy.runCommand (sourcePath). Attempt 1 of 25.
Info: Using ID '0d907bfd-1789-4be1-8823-51eb866ef79b' for connections to the remote server.
Warning: Retrying the sync because a socket error (10054) occurred.
Retrying operation 'Serialization' on object MSDeploy.runCommand (sourcePath). Attempt 2 of 25.
Info: Using ID 'eff2456b-d25a-4ee9-9169-6afe0435101b' for connections to the remote server.
Warning: Retrying the sync because a socket error (10054) occurred.
Retrying operation 'Serialization' on object MSDeploy.runCommand (sourcePath). Attempt 3 of 25.
Info: Using ID 'a249271f-ca45-48b5-818a-3a4bbc695ffb' for connections to the remote server.
Warning: Retrying the sync because a socket error (10054) occurred.
Retrying operation 'Serialization' on object MSDeploy.runCommand (sourcePath). Attempt 4 of 25.
^C

Aborted the command as the default retry interval is 25 and it failed in almost all the previous retries with the same error.

Error logged in Event Viewer:

Log Name:      Microsoft Web Deploy
Source:        Web Deploy
Date:          7/19/2017 9:12:16 AM
Event ID:      1
Task Category: None
Level:         Error
Keywords:      Classic
User:          user name removed for posting this query
Computer:      BAVNAPPNMV01
Description:
Request ID 9e26fcc4-9ec3-4d7e-b271-94b24223f4fa timed out while waiting for a subsequent request and will be removed from the stream table.
Event Xml:
<Event xmlns="http://schemas.microsoft.com/win/2004/08/events/event">
  <System>
    <Provider Name="Web Deploy" />
    <EventID Qualifiers="0">1</EventID>
    <Level>2</Level>
    <Task>0</Task>
    <Keywords>0x80000000000000</Keywords>
    <TimeCreated SystemTime="2017-07-19T03:42:16.000000000Z" />
    <EventRecordID>2331</EventRecordID>
    <Channel>Microsoft Web Deploy</Channel>
    <Computer>BAVNAPPNMV01</Computer>
    <Security UserID="S-1-5-21-708577975-3734375098-1905409693-1013" />
  </System>
  <EventData>
    <Data>Request ID 9e26fcc4-9ec3-4d7e-b271-94b24223f4fa timed out while waiting for a subsequent request and will be removed from the stream table.</Data>
  </EventData>
</Event>


Web Deploy Error: "virtual directory not being configured as an application in IIS"

$
0
0

Hi all,

I am trying to use Visual Studio Publish on my Dev machine to deploy a Web Site to a separate IIS Test Server using Web Deploy and I am getting the following error which I do not understand:

Error  It is an error to use a section registered as allowDefinition='MachineToApplication' beyond application level.  This error can be caused by a virtual directory not being configured as an application in IIS. TeraTastic D:\Clancy\A_TeraTastic\Dev\TT15\TeraTastic\obj\Debug\AspnetCompileMerge\Source\app_data\nugetbackup\20170306-224002\web.config 146 

Below I have listed the offending section of the referenced web.config file with offending line 146 marked with: "<<<<<  ERROR LINE 146 <<<<<<<<"


    <httpRuntime targetFramework="4.5.1" fcnMode="Single" maxRequestLength="51200"/>
    <pages>
      <namespaces>
        <add namespace="ClientDependency.Core"/>
      <add namespace="ClientDependency.Core.Mvc"/></namespaces>
    </pages>
    <httpModules>
      <add name="ClientDependencyModule" type="ClientDependency.Core.Module.ClientDependencyModule, ClientDependency.Core"/>
    <add name="ImageProcessorModule" type="ImageProcessor.Web.HttpModules.ImageProcessingModule, ImageProcessor.Web"/>
    <add name="UmbracoModule" type="Umbraco.Web.UmbracoModule,umbraco"/>
    </httpModules>
    <httpHandlers>
      <add verb="GET" path="DependencyHandler.axd" type="ClientDependency.Core.CompositeFiles.CompositeDependencyHandler, ClientDependency.Core "/>
    </httpHandlers>
    <siteMap>                  <<<<<<<<<<<<<<<<<<<<<<  ERROR LINE 146 <<<<<<<<<<<<<<<<<<<<<<
      <providers>
        <remove name="MySqlSiteMapProvider"/>
      </providers>
    </siteMap>
  </system.web>

Any assistance to understand and resolve this error would be very much appreciated.

Thanks

Terry Clancy

ClanceZ

Using WMSvc and MSDeploy with UNC Shares

$
0
0

I'm trying to get deployment working to a load balanced IIS pair using an SMB share for application storage. I'm either missing something or what I'm trying to do doesn't work the way it does.

Setup is deployment is coming from a CI server (Teamcity if it matters) using MSDeploy through the WMSvc. Everything seems to work great until it try's to write the files to the share. Then I get access denied.

The deployment handler is configured to "run as" with a domain account that has access to the share. But it doesn't seem to be used when watching procmon during a deploy it is passing through the build agent account from the CI server. Which is fine its a domain account but does that mean I need to setup Kerberos delegation if so what do I use for end points?

Can somebody help point me in the right direction of what I am missing.

msdeploy (Remote Agent Service) - Error "The client and server cannot communicate, because they do not possess a common algorithm"

$
0
0

I get the following error when I try to deploy to my remote agent service. Any suggestions how I can resolve this error?

-------------------------------------------------------
Start executing msdeploy.exe
-------------------------------------------------------"C:\Program Files\IIS\Microsoft Web Deploy V3\msdeploy.exe" -source:package='C:\mypackage.zip' -dest:auto,computerName="https://myservice:8172/msdeploy.axd",userName="myuser",password="mypassword",includeAcls="False" -verb:sync -disableLink:AppPoolExtension -disableLink:ContentExtension -disableLink:CertificateExtension -setParamFile:"C:\mySetParameters.xml" -whatif -allowUntrusted -setParam:name='IIS Web Application Name',value='My App'
Info: Using ID '929fd21c-14ef-4edf-b565-54b4dea555a9' for connections to the rem
ote server.
Error: Could not complete the request to remote agent URL 'https://myservice:8172/msdeploy.axd'.
Error: The underlying connection was closed: An unexpected error occurred on a receive.
Error: The client and server cannot communicate, because they do not possess a common algorithm
Error count: 1.


Web Deploy ExcludeFromPackageFolders & ExcludeFoldersFromDeployment both not working

$
0
0

Hi Web Deployers,

My Web Deploy from VS 2017 on my Windows 10 dev machine  to IIS on a separate Windows Server machine completes correctly but when it opens the home page of that newly deployed site I get the following error in the browser:

The directory '/App_Code/' is not allowed because the application is precompiled.

Because of this error, I am trying to EXCLUDE '/App_Code/' from my package and/or from my deployment

To do this I have made the following two changes to my project, but neither of these have been successful if preventing the deployment of the "App_Code" folder !!??

Change 1

As described at https://docs.microsoft.com/en-us/aspnet/web-forms/overview/deployment/advanced-enterprise-web-deployment/excluding-files-and-folders-from-deployment

I added the following to MyProject.wpp.targets

      <ItemGroup>
          <ExcludeFromPackageFolders Include="App_Code">
           <FromTarget>To avoid the error The directory App_Code is not allowed because the application is precompiled</FromTarget>
          </ExcludeFromPackageFolders>
      </ItemGroup>

Change 2

As described in post by post by Brian Ogden at https://stackoverflow.com/questions/650875/exclude-files-from-web-site-publish-in-visual-studio

I added the following to Properties/PublishProfiles/MyProject.pubxml

 <PropertyGroup>
    ......
    <ExcludeFoldersFromDeployment>App_Code</ExcludeFoldersFromDeployment>
    ......
</PropertyGroup>

Any assistance understanding why the App_Code folder is not being Excluded from the Package or from the Deployment, and how to fix this issue, would be appreciated.

Thanks all

Terry Clancy

ClanceZ

Please guide

$
0
0

1)Where can i get web deploy tool complete video tutorial[end 2 end]?

2)can we use this tool with GUI?

3)Is this tool only work with integration of visual studio or can we use this tool stand alone with out visual studio for only source destination & destination code deployment over the staging servers?

4)can we use this tool for code deployment over the multiple servers or web farms at a time with out network or time delay at a time like multi deployments &  at the end of multiple user profiles or accounts?

5)can we use this tool for web site creation, virtual directory, virtual application and application pool creation?

6) At last can we use this tool for any iis configuration changes at staging iis web servers?

7) can we do schedule time deployments as scheduled and manual job run?

8)can we take automatic backup of destination folder existing code content? 

Please guide

Thanks.

Viewing all 565 articles
Browse latest View live


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