Im having a bit of trouble web deploying from my CI server teamcity.I can however do a web deploy through visual studio.
I get the following error
Open in IDE
C:\Program Files
(x86)\MSBuild\Microsoft\VisualStudio\v14.0\Web\Microsoft.Web.Publishing.targets(4276,
5): error ERROR_DESTINATION_NOT_REACHABLE: Web deployment task failed.
(Could not connect to the remote computer ("destinationserver"). 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.)
and this is my configuration in team city
enter image description here
i have also opened up port 8172 so i dont think it is a permissions issue and checked the username and pass is correct
So what i dont understand is why i am able to publish locally but not from the CI?
Thanks,
Martin
I solve this replacing the IP address of the destination host with the DNS name and adding this parameter to the deployment:
/P:MsDeployServiceUrl=https://%TargetServer%/MsDeploy.axd?site=%SiteName%
Related
I honestly don't know where to start apart from mentioning I've tried absolutely everything and I feel like banging my head against the wall!
I've configured my IIS according to the Microsoft docs and also added Web Deploy 3.6.
In my services I have the following running:
In my windows firewall I have opened port 8172:
In my IIS I have enabled remote connections:
Within IIS I have a Site which points to an empty folder, when I right click -> Deploy -> Configure Web Deploy publishing I get this:
Using this, I've set up a publish profile in VS like so:
But get this error why I try and 'Validate' the connection:
Severity Code Description Project File Line Suppression State
Error Web deployment task failed. (Could not connect to the remote computer ("server2021"). On the remote computer, make sure that Web Deploy is installed and that the required process ("Web Management Service") is started. Learn more at: https://go.microsoft.com/fwlink/?LinkId=221672#ERROR_DESTINATION_NOT_REACHABLE.)
This error indicates that you cannot connect to the server. Make sure the service URL is correct, firewall and network settings on this computer and on the server computer are configured properly, and the appropriate services have been started on the server.
Error details:
Could not connect to the remote computer ("server2021"). On the remote computer, make sure that Web Deploy is installed and that the required process ("Web Management Service") is started. Learn more at: https://go.microsoft.com/fwlink/?LinkId=221672#ERROR_DESTINATION_NOT_REACHABLE.
Unable to connect to the remote server
A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond
I can't even remote to this server, I'm accessing it using TeamViewer.
I've viewed EventViewer logs on my local machine and it just says the same error which VS is spitting out.
I honestly don't know what I'm doing and I'd really really appreciate any help
I am trying to publish a ASP.NET Core Web project to IIS (remote server) using a non-admin account using Visual Studio 2017 and I have the following error on deploy:
Starting Web deployment task from source:
manifest(D:\Projects\Own\AspNetCore\CoreWithAngularTrial\CoreWithAngularTrialApi\obj\Debug\netcoreapp1.1\PubTmp\CoreWithAngularTrialApi.SourceManifest.xml)
to Destination: auto(). C:\Program Files (x86)\Microsoft Visual
Studio\2017\Community\MSBuild\Sdks\Microsoft.NET.Sdk.Publish\build\netstandard1.0\PublishTargets\Microsoft.NET.Sdk.Publish.MSDeploy.targets(134,5):
Error : Web deployment task failed. (Connected to the remote computer
("...") 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.
Learn more at:
http://go.microsoft.com/fwlink/?LinkId=221672#ERROR_USER_UNAUTHORIZED.)
Make sure the site name, user name, and password are correct. If the
issue is not resolved, please contact your local or server
administrator. Error details: Connected to the remote computer
("...") 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.
Learn more at:
http://go.microsoft.com/fwlink/?LinkId=221672#ERROR_USER_UNAUTHORIZED.
The remote server returned an error: (401) Unauthorized. Publish
failed to deploy.
I have the following configuration for deployment:
Publish method = Web deploy
Server = servername:8172/msdeploy.axd
Site name = Default Web Site/CoreWithAngularTestApi
User name = username
Password = ******
The exact same configuration works when publishing a different application (ASP.NET MVC 5) under the same Web site (Default Web Site), so publishing configuration appears to be correct on the remote server.
Making username a local administrator unblocks the publishing process in Visual Studio 2017.
Also, publishing configuration files (*.pubxml) are virtually identical.
Event viewer on remote server catches the following error:
IISWMSVC_AUTHORIZATION_SERVER_NOT_ALLOWED
Only Windows Administrators are allowed to connect using a server
connection. Other users should use the 'Connect To Site or
Application' task to be able to connect.
Process:WMSvc User=username
Question: How can I enabled non-administration web publishing from Visual Studio 2017?
This issue has been fixed: https://github.com/aspnet/websdk/issues/146.
ASP.NET core project uses a different set of Publish targets (hence the change in behavior from MVC5). This project is available on GitHub - https://github.com/aspnet/websdk.
I managed to figure out why the publish fails with non-admin user. Server setup is correct, but Visual Studio publishing seems to treat ASP.NET Core Web app deployment differently from ASP.NET MVC 5 one.
I had to explicitly specify web site name within the publishing profile xml file. So, instead of:
<MSDeployServiceURL>servername:8172/msdeploy.axd</MSDeployServiceURL>
I put
<MSDeployServiceURL>servername:8172/msdeploy.axd?Site=Default Web Site</MSDeployServiceURL>
NOTE: This problem does not occur when publishing an MVC 5 project within VS2017.
I am trying to deploy my webapp VS2015 RC1 DNX 451. Even when I validate connection and run publish I get error
Severity Code Description Project File
Error Error Code: ERROR_USER_UNAUTHORIZED
Error More Information: Connected to the remote computer ("crocus.arvixe.com") 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. Learn more at: http://go.microsoft.com/fwlink/?LinkId=221672#ERROR_USER_UNAUTHORIZED.
Error Error: The remote server returned an error: (401) Unauthorized.
Googling the issue and even trying to view host forum just says make sure username and password is correct. I am getting nowhere trying various settings. Any ideas how to debug the issue?
I am using Arvixe.com as host.
You should contact Arvixe.com. They likely have some odd configuration on their servers but I would suspect they can help you resolve the issue.
Arvixe does not support Web Deploy anymore. Once they move you to their new servers Web Deploy won't be available to you. In Visual Studio you can set up a Publish with FTP instead of Web Deploy. If you're used to Web Deploy publishing your database changes, then you'll need to do those yourself with SQL scripts. Entity Frameworks has an option to produce a SQL script for a migration, so you can use that to publish your EF database changes.
I have a sub application underneath an IIS website, and I can deploy it using the publish wizard in Visual Studio no problem.
However, I'm automating our deployment from our build server so I prefer to use msdeploy.exe directly.
I can deploy the main website, but trying to deploy the sub application refuses to work.
This works (www.mymainwebsite.co.uk being the IIS website):
msdeploy.exe
-source:package='www.mymainwebsite.co.uk\obj\Test\Package\www.mymainwebsite.co.uk.zip'
-dest:auto,computerName='https://testweb1:8172/MsDeploy.axd?site=www.mymainwebsite.co.uk',userName='xxx',password='xxx',authtype='Basic',includeAcls='False'
-verb:sync -disableLink:AppPoolExtension -disableLink:ContentExtension -disableLink:CertificateExtension -setParamFile:"www.mymainwebsite.co.uk\obj\Test\Package\www.mymainwebsite.co.uk.SetParameters.xml"
-allowUntrustedInfo
This doesn't (SubApplication being the application path):
msdeploy.exe
-source:package='SubApplication\obj\Test\Package\SubApplication.zip'
-dest:auto,computerName='https://testweb1:8172/MsDeploy.axd?site=www.mymainwebsite.co.uk/SubApplication',userName='xxx',password='xxx',authtype='Basic',includeAcls='False'
-verb:sync -disableLink:AppPoolExtension -disableLink:ContentExtension -disableLink:CertificateExtension -setParamFile:"SubApplication\obj\Test\Package\SubApplication.SetParameters.xml"
-allowUntrustedInfo
The error is:
Error Code: ERROR_USER_UNAUTHORIZED
More Information: Connected to the remote computer ("testweb1") 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. Learn more at: http://go.microsoft.com/fwlink/?LinkId=221672#ERROR_USER_UNAUTHORIZED.
Error: The remote server returned an error: (401) Unauthorized.
As I said, this works from the Visual Studio publish wizard, setting the Site/application property to www.mymainwebsite.co.uk/SubApplication, so I know it's not a permissions issue on the server.
Am I missing something in the msdeploy parameters?
I use the following on the command line to set the web application:
-setParam:name="IIS Web Application Name",value="www.mymainwebsite.co.uk/SubApplication"
In order to do a web deployment to sub-application of a main site, go to TFS, Deploy IIS App step, update the Override parameters to something like this
name="IIS Web Application Name",value="MainSite/SubApplication"
It should do the trick!!
With VS 2010 Web Deploy is functional and working without issue. At the same time, Web Deploy from VS 2012 fails, indicating that the server did not respond and suggesting this link.
This notes the following conditions, all of which are fulfilled.
You can ping the remote machine
That the msdepsvc or wmsvc service is started on the remote server.
Your firewall is not blocking incoming connections of your ports on the destination. If you used the default installation, then it would be 80 for msdepsvc and 8172 for wmsvc
Web Deploy is still functioning for VS2010.
How can this be solved?
Clearly an example of not reading all the documentation first. However, for those looking to understand some of the changes here's what I found.
VS 2012 uses the Web Deployment Agent Service and NOT the Web Management Service
Local deployment is to "http://Your Server/msdeployagentservice" and NOT :8172/msdeploy.axd
For a complete account of the many options GO HERE!
Hope this helps someone else.