I can able to perform the Azure MVC web app publishing from external networks but the publishing fails when I do it from company network.Please let me know what network setting restricts the publishing. Please help. Below is the error message:
Severity Code Description Project File Line Suppression State
Error Web deployment task failed.
(Web Deploy experienced a connection problem with the server and had to terminate the connection.
Contact your server administrator if the problem persists.
Learn more at: http://go.microsoft.com/fwlink/?LinkId=221672#ERROR_CONNECTION_TERMINATED.)
Please let me know if you need more information reg this.
Thanks
AR_
If nothing has changed other than the external/internal network, my guess is that your company has blocked Web Publishing from inside the network.
I would recommend contacting your network team and asking them to unblock port 8172 which is used by Web Deploy.
Related
I am trying to deploy a simple ASP.NET web application over the Internet, using the google cloud platform. I followed the tutorial on this page : https://cloud.google.com/dotnet/docs/getting-started/hello-world (I uploaded a slightly more complex app though). So basically everything went well from the creation of the ASP.NET framework virtual machine to the deployment from my computer to the VM since I've been able to reach for the web app home page through the VM IP address.
Starting Web deployment task from source: manifest(C:\Users...\obj\Release\netcoreapp2.2\PubTmp\myApp.SourceManifest.xml) to Destination: auto().
Updating file (Default Web Site\MyApp.deps.json).
Updating file (Default Web Site\MyApp.runtimeconfig.json).
Updating file (Default Web Site\web.config).
Successfully executed Web deployment task.
Problem is that the home page won't display as it did when I would deploy it locally (with IIS express) but rather throw an
500 - Internal server error.
There is a problem with the resource you are looking for, and it cannot be displayed.
I found some interesting subjects raising the same issue :
Deploying website: 500 - Internal server error : suggests to enable detailed errors and/or to change a few lines in the web.config file but I do not have a web.config file at my side of the process in my project (only a Startup.cs which does some of the work) and I cannot manipulate the one in the google virtual machine.
I noticed that before uploading the web app to the VM, the output displayed errors similar to these : https://github.com/dotnet/sdk/issues/1897 (message NETSDK1041) so I thought that the discrepancies between referenced/platform assemblies might be the origin of these errors but then, why wouldn't they impact the local deployment of the web-app too ?
I would like my web application to run on google cloud's VM (based on the generic Google Compute Engine ASP.NET framework), the web app is 'correctly' deployed to the host VM but raises a wild 500 - internal error. Anybody has any idea as to how I could at least identify the source of this error ? (Helping me find the web.config would also help greatly, I understand that everybody has this file somewhere, but I can't find it and don't have a clue on its whereabouts because I just used a random template MVC application on Visual Studio Community 2017 which did all the configuration work
I'm currently trying install a web application on win server 2012. After compiled the app, i'v deployed it in IIS. After the logging page the next page is not displayed and i see the error in the subject in the svclog file. I saw that this error could be caused because a missing dll but as the application run on another server, i compared the dll's in the bin directory and that's the same as on the new server. I'm newbee in web application. I'don't know how to debug it and i can't go further in my task to improve the application. Any help would be appreciate !
The application is silverlight + MVVM + RIA services + sql server
thanks
it COULD be due to win server configuration.
Make sure that WCF Services HTTP Activation is installed.
Errors messages and stack are the bare minimum in diagnosis. It's like symptoms for sickness.
Even if this would solve your problem, please reports them here, for future reference.
Problem
Getting a deployment error when trying to publish to an Azure Web App from TFS CI. A file is locked and this prevents the build from updating.
Symptoms
Publishing manually (Web Deploy publish from within Visual Studio) usually succeeds.
Stopping the Web App and publishing allows it to succeed, however this defeats the point of our CI if we need need to stop and start the Web App each time.
CI publish to Web roles and Worker roles don't appear to have this issue, we only get it on publishing to Web Apps (formerly Web Sites, the current Azure Portal term is now App Service).
Only publishing from a CI build via TFS fails consistently in this way.
Error
Web deployment task failed. (Web Deploy cannot modify the file
'msvcr100.dll' on the destination because it is locked by an external
process. In order to allow the publish operation to succeed, you may
need to either restart your application to release the lock, or use
the AppOffline rule handler for .Net applications on your next publish
attempt. Learn more at:
http://go.microsoft.com/fwlink/?LinkId=221672#ERROR_FILE_IN_USE.)
The information at the link isn't very helpful.
ERROR_FILE_IN_USE
Diagnosis – A destination file cannot be overwritten or deleted because it is currently in use.
Resolution – Make sure that the destination file is not in use before performing a sync. If you are syncing content to a web site
hosted on IIS 7 or later (using the appHostConfig, iisApp, or
contentPath providers), consider taking the application offline during
the sync by enabling the appOffline rule.
Attempted resolutions
We were using New Relic - have since removed New Relic and this issue still persists. The binary appears to be a Microsoft library but it's unclear how it is relevant to the application (it's not referenced).
Some other SO questions have addressed similar issues with publishing but none of these relate to getting this issue from TFS CI.
azurew website continious deployment - Web Deploy cannot modify the file 'XXX' on the destination because it is locked by an external process
How to take web app offline while publishing?
One answer in the above question suggests using the EnableMSDeployAppOffline configuration in the publish profile, and adding this configuration works OK for doing a publishing manually from within VS but it doesn't fix the problem when publishing automatically from TFS/CI.
Edit
How to take web app offline while publishing? deals with taking the app offline using the EnableMSDeployAppOffline configuration - unfortunately this config only seems to be supported when doing WebDeploy through Visual Studio (not CI).
You can use the Web Deploy v3 in CI to deploy your web app.
In Web Deploy V3, we added support to automatically take an ASP.Net
application offline before publishing to it. This is useful if a user
wants to ensure that their application does not have a lock on a file
(e.g. SQL CE sdf files which only allow one connection to the file at
a time) being overwritten, or if they want to ensure that visitors to
their site cannot affect the publish process. When the publish process
is completed, the App_Offline.htm file will be removed and the site
will be online again.
Or you can add a PowerShell script like following to deploy the web app to Azure:
param($websiteName, $packOutput)
$website = Get-AzureWebsite -Name $websiteName
# get the scm url to use with MSDeploy. By default this will be the second in the array
$msdeployurl = $website.EnabledHostNames[1]
$publishProperties = #{'WebPublishMethod'='MSDeploy';
'MSDeployServiceUrl'=$msdeployurl;
'DeployIisAppPath'=$website.Name;
'Username'=$website.PublishingUsername;
'Password'=$website.PublishingPassword}
Write-Output "Stopping web app..."
Stop-AzureWebsite -Name $websiteName
Write-Output "Publishing web app..."
$publishScript = "${env:ProgramFiles(x86)}\Microsoft Visual Studio 14.0\Common7\IDE\Extensions\Microsoft\Web Tools\Publish\Scripts\default-publish.ps1"
. $publishScript -publishProperties $publishProperties -packOutput $packOutput
Write-Output "Starting web app..."
Start-AzureWebsite -Name $websiteName
Reference from: https://msdn.microsoft.com/en-us/Library/vs/alm/Build/azure/deploy-aspnet5
The new "Deploy AzureRM Web App" task has an option to take the app offline which will prevent this error.
See screenshot for checkbox
I am stuck into the deployment of website from installshield limited edition where I have a database file in the App_Data folder along with this I have one scheduler functionality into website, for this I have created a Windows service and calling though the WCF call.
Now I am accessing the .mdf file from the website as well as WCF with the edmx.
But the problem is once I deploy the website at IIS and if I start the Windows service manually from that point on, I am getting the access issue such as
Cannot open database "C:\INETPUB\WWWROOT\XYZWEBSITE\APP_DATA\XYZ.MDF" requested by the login. The login failed.
Login failed for user 'IIS APPPOOL\DefaultAppPool'.
If I stop the Windows service then it works, and vice versa.
Anyone gone through this situation and got any ways to get the work done?
Waiting for reply
Thanks in advance
I was trying to create azure mobile service from VS 2013, 2 issues I am facing.
Host in cloud option is disabled.
Getting error on click of Validate connection while publishing the project. error thrown there is "Destination is unreachable".
Log I have extracted from output window is :
Error ERROR_DESTINATION_NOT_REACHABLE: Web deployment task failed. (Could not connect to the remote computer ("****.scm.azure-mobile.net"). On the remote computer, make sure that Web Deploy is installed and that the required process ("Web Management Service") is started. Learn more at: http://go.microsoft.com/fwlink/?LinkId=221672#ERROR_DESTINATION_NOT_REACHABLE.)
I have attached screenshot you reference. Please check.
gone through similar question : Not able to publish website on Windows Azure using publish through VS2010
didnt helped though.
Can anyone help me to resolve these issues..? Appreciate the help.
Regards
Ravi Bhat
I encounter this error as well.
I tried changed two things and it works, yet now I don't remember which one is the root cause:
use https instead of http for the server address and destination URL
My company has proxy settings for all internet access, I change to the other WIFI without any proxy. So check your internet connection.
You could try this, but I'm not sure if it works.