ERROR_DESTINATION_NOT_REACHABLE: Web deployment task failed - iis-7

When I try to publish code using Web Deploy method I am getting the following error
ERROR_DESTINATION_NOT_REACHABLE: Web deployment task failed. (Could not connect to the remote computer ("xxxxx.xxxxxxx.xxx.xxxx"). On the remote computer, make sure that Web Deploy is installed and that the required process ("Web Management Service") is started
On my server,I have web deployer 3.5 install and web management service is also running.
There is no firewall issue also.
I have restarted the web management service still no luck

If you want to publish a site on a remote server you could follow the below steps:
Go to the Start menu and right-click the cmd.exe and then select Run as Administrator.
Enter the following in the command prompt:
winrm quickconfig
winrm set winrm/config/client #{TrustedHosts="*"}
On the target server, open a command prompt as an Administrator and
enter the following:
winrm quickconfig
winrm set winrm/config/client #{TrustedHosts="IP_ADDRESS"}
where IP address is the IP address of your remote server.
make sure you installed Management service.
-after doing all the above things open iis.
carete site with a blank folder at the destination (remote server)
go back to the server from which you want to publish a site and select Publish.
On the Publish page, click the icon labeled IIS, FTP, etc.
In the Publish Method list box, select Web Deploy:
or if you want to publish as an application under any site:
no need to create site at the destination server.
enter your site name in the site name and enter your application name after /.
Regards,
Jalpa

Related

How to setup Visual Studio project FTP to a remote IIS Server?

I have an ASP.Net project that I've been working on my local machine and I've successfully uploaded my application files from my local machine to the remote IIS server. My issue occurs when I make changes to my code through the IIS remote server, sometimes the changes that I have made do not appear or work. The way I fixed the problem was upload the updated project into the IIS server.
I've read a bunch of articles online and some people are mentioning the IIS cache or temp file that must be cleared.
Is there a way for me to establish an FTP connection from my local machine to the remote IIS server so that when I push changes it would automatically update the code?
You can publish your website by using visual studio publish tool. Which will automatically deploy code to your FTP location on publish. You just need to configure your FTP remote server. Right click your website project and click publish
Then select IIS,FTP from side nav and click publish
Then select FTP from Publish method drop down and start configuring your application and after that click on Validate Connection to test if it had connected to FTP properly and click next and complete configuration and your code will be deployed to that FTP remote server

Hosting an asp.net website in my computer

I have an app I am modifying for a client. The app is in asp.net. I have read that I can deploy the app in three ways:
xCopy Deployment
Precompiled Deployment
Web Setup Project
I would like to go with xCopy method. I have not installed visual studio but have SQL server installed.
Coming from a PHP background, is IIS just like apache where I can copy my files inside a directory in IIS and launch the app in a web browser or is there an extra step that required to be able to run the asp.net web app?
Here is a complete guide to:
Install IIS in windows
Install SQL Server Express
Publish to IIS in Visual Studio
Finally, test in the test environment
Note: There is no need to install IIS, just enable its some settings. And you have to install SQL Server and Visual Studio.
Edit:
Install IIS
Open Control Panel, Programs and Features, Turn Windows features on or off.
Make sure that ASP.NET 4.5 is selected under Internet Information Services -> World Wide Web Services -> Application Development Features.
Set ASP.Net Framework from v2.0 to v4.0: Press Windows + R and type "inetmgr" hit enter.
In the Application Pools pane under connections, click DefaultAppPool, and then in the Actions pane click Basic Settings.
In the Edit Application Pool dialog box, change .NET Framework version to .NET Framework v4.0.30319 and click OK.
Install SQL Server Express
Download it from here either x64 and x86 based.
After downloading SQL Server run the setup and click New SQL Server stand-alone installation. In the installation wizard accept the default settings.
Publish to IIS in Visual Studio
Run Visual Studio as Administrator by Right - Click on VS icon.
Right - Click on your project select Publish, in Publish Web create new Profile.
In Connection tab enter localhost -> Service URL, Default Web Site/yourProjectName -> Site/application, http://localhost/yourProjectName -> Destination URL
In Settings tab check Exclude files from the App_Data folder.
enter Remote connection string that you have use to connect with SQL Server database.
Check Update database and click Configure database updates add sql script Grant.sql that you will run in SQL Server which is like:
IF NOT EXISTS (SELECT name FROM sys.server_principals WHERE name = 'IIS APPPOOL\DefaultAppPool')
BEGIN
CREATE LOGIN [IIS APPPOOL\DefaultAppPool]
FROM WINDOWS WITH DEFAULT_DATABASE=[master],
DEFAULT_LANGUAGE=[us_english]
END
GO
CREATE USER [ContosoUniversityUser]
FOR LOGIN [IIS APPPOOL\DefaultAppPool]
GO
EXEC sp_addrolemember 'db_owner', 'yourProjectName'
GO
Finally click on Publish.
Test in Environment
Check that your project files have exits in wwwroot folder at C:\inetpub\wwwroot\yourProjectName. Run your project index.aspx file and test it.

Web site fails to deploy

I have created a new ASP.NET5 web site, using VS2015 CE, and I can't get it to deploy to an IIS7.5 server.
I can deploy older projects to this server.
When I use the Publish Web wizard, the Connection tab is correctly configured (Validate Connection shows success). Pressing "Start Preview" on the Preview Tab shows the correct list of files to be sent to the server.
This suggests to me that VS can communicate successfully with WebDeploy on the server.
When I press Publish, I get:
Error Code: ERROR_DESTINATION_NOT_REACHABLE
More Information: Could not connect to the remote computer (blah blah blah)
/?LinkId=221672#ERROR_DESTINATION_NOT_REACHABLE
Error: Unable to connect to the remote server
I have read https://docs.asp.net/en/latest/publishing/iis-with-msdeploy.html and followed all the instructions.
Deploy the package manually using MSDeploy.exe with the -verbose flag to try to get more details about the error.
>"C:\Program Files (x86)\IIS\Microsoft Web Deploy V3\msdeploy.exe" -verb:sync -source:package=WebApplication7.zip -dest:manifest=WebApplication7.DestManifest.xml
There is a section at the bottom of the following post with full instructions on deploying a package manually.
The Anatomy of a WebDeploy Package

TFS deploy error destination not reachable

We have 1 new DEV and 1 new QA server that I am configuring for automated deploys. I got the DEV deploys working. My problem is that the deploy to QA is giving me the below error.
Our build server contains the controller and drop folder. The error occurs when the Invoke deploy command is issued. I have ensured that the Web Management service is running on the web servers.
What could be causing the follow error message?
Error Code: ERROR_DESTINATION_NOT_REACHABLE
More Information: Could not connect to the destination computer ("myWebServer").
On the destination computer, make sure that Web Deploy is installed and that the
required process ("Web Deployment Agent Service") is started.
Error: The remote server returned an error: (404) Not Found.
Error count: 1.
Here is my deploy command:
\\myBuildServer\Builds\MyApp - Deploy to QA\myApp - Deploy to QA_20120827.1\_PublishedWebsites\AppName.UI.Web_Package\Appname.UI.Web.deploy.cmd /M:http://myWebAddress/MsDeployAgentService/ /U:myDomain\tfsUID /P:MyPassword "-setParam:name='IIS Web Application Name',value='MyWebAppName'" /Y
If you're on IIS 7, ensure that WMSvc is installed (add or turn on Windows features) running, that it is configured correctly and enabled in IIS Manager under "Management Service" and that port 8172 is open - try telnet-ing into it.
If IIS 6, install the Web Deploy agent.
For IIS 7 using WMSvc, you should use http://svr:8172/MsDeploy.axd and for MsDepSvc you are already using the right URL (see your /M param).
I've found the whole remote publishing to be a total ballache.
When you install Web Deploy, make sure to select Custom and check all components. This is what solved the issue for me.
Source: Could not reach the Web Deploy endpoint on the specified virtual machine

TFS 2010 - WebDeploy to IIS6

I have setup a build configuration in TFS2010 with MSBuild arguments to deploy using WebDeploy to a remote IIS6 webserver. I can deploy to this remote web server using WebDeploy manually from VS2010 without issue. But, when I kick off the TFS build it fails with a permission denied error when attempting to deploy to the remote box. I have added the user to the Administrator group on the webserver box.
I found in the security event log that the Domain wasn't set:
Logon Failure:
Reason: Unknown user name or bad password
User Name: tfssvcUser
Domain:
Logon Type: 3
Logon Process: NtLmSsp
Authentication Package: NTLM
Workstation Name: TFSServer
When I run it manually the Domain is set. tfssvcUser is a domain user is running as such on the build server.
I am running MSDeploy 1 right now.
Any ideas?
In the end the admin for the TFS box had misread the permissions on the build server and needed to add permissions to a temp folder or registry, not sure which.

Resources