I have developed several ASP.NET 4.5 applications and I want to publish them to a remote computer running IIS 8, using Web Deploy.
I created two sites in IIS8, Site1 and Site2. I created a single IIS User and I gave permission to access both sites to this user.
I can publish the first site via Web Deploy, but I cannot publish the second site.
When I try to publish the second site, I get this error in Visual Studio
2>Start Web Deploy Publish the Application/package to https://27.147.144.98:8172/msdeploy.axd?site=NSU ...
2>Adding ACL's for path (NSU)
2>C:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\v12.0\Web\Microsoft.Web.Publishing.targets(4255,5): Error : Web deployment task failed. ((6/30/2015 12:36:37 PM) An error occurred when the request was processed on the remote computer.)
2>
2>(6/30/2015 12:36:37 PM) An error occurred when the request was processed on the remote computer.
2>The server experienced an issue processing the request. Contact the server administrator for more information.
2>Publish failed to deploy.
The first site is published correctly always. The problems occurs only for the second site.
I had this error but also had Fiddler2 running which seemed like it was interfering with the deployment. When I closed it, things worked again. Make sure you test the connection beforehand.
Related
I'm running the latest version of Visual Studio 2019 on a Windows 2019 Datacenter in Azure. I have two IIS web sites, development and production, in C#, which are currently identical on that server and both reside on the d: drive in different folders under inetpub. Both use the same wildcard certificate and force https.
I have been able to debug both in the past but for some reason I cannot debug dev now. Trying to start in debug mode, it says "Unable to start debugging on the web server. The remote server returned an error: (403) Forbidden". I'm not aware that I've changed anything on the server/IIS.
I can debug the production web, same server, same source code, same VS. I just change Properties -> Web -> Project Url from dev.domain.com to prod.domain.com.
So, I created a third web site, pointed it to the same physical location as dev and it gives me the same error as the original dev site. I would think this would mean there is something in that path or configuration somewhere that's off. I don't know where to look to check.
Often, this error occurs because an error or configuration change has occurred that requires an update to your Application Pools, an IIS reset, or both. You can reset IIS by opening an elevated command prompt and typing iisreset.
More infor about how to troubleshoot this error you can refer to this link: Error: Unable to Start Debugging on the Web Server.
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
In Visual Studio 2012 RC when I try to validate a Web Deploy connection I get this error message:
ERROR_DESTINATION_NOT_REACHABLE
The required Web Management Service is started on the server and Web Deploy 3.0 RC is installed.
Then using Remote Desktop Connection I log on the server and go check IIS logs located at C:\inetpub\logs\LogFiles\W3SVC1. There I can see my attempts to validate the connection because they contain my IP address:
2012-07-13 20:58:49 185.201.117.17 HEAD /msdeploy.axd site=Default%20Web%20Site 8172 - 189.10.32.194 - 404 0 2 78
It's giving me a 404.
After trying to get this working for almost 6 hours now (reading a lot of material including this great Troubleshooting guide by IIS team titled Troubleshooting Web Deploy problems with Visual Studio and this related question Visual Studio 2010 Web deployment task failed) I decided to ask for help here and see if anyone has a clue about what can be the problem... Do you know what's causing this 404 error?
If you need any more info, just ask me and I'll provide it... :)
Edit 1
Yesterday I also tried the following msdeploy command on my local machine to list the the contents of a folder called test on the server [ and it worked as expected ]:
C:\Program Files\IIS\Microsoft Web Deploy V3>msdeploy -verb:dump -source:content
path=c:\test,computerName=xxxxxxxxxx.publiccloud.com.br,username=User,password=Password
Info: Using ID 'a246a13c-7777-4226-964c-fe9934c60b77' for connections to the rem
ote server.
MSDeploy.contentPath
c:\test
c:\test
c:\test\test.txt
Edit 2
After a lot of install/reinstall operations I finally got to a point where Windows Server 2008 is returning a 503 HTTP error when I try to publish the web site using VS 2012 RC or even msdeploy in the command line.
Looks like the best thing to do now is to do a clean install of Windows Server 2008 since I got a messed up VM server image to work with. Hope it'll do the trick.
Just for the record, this is the msdeploy command VS 2012 tries to execute. I did a copy/paste and tried it with msdeploy in the command line:
C:\Program Files (x86)\IIS\Microsoft Web Deploy V3\msdeploy.exe -source:manifest='E:\SISPEC\SISPEC\obj\Release\Package\SISPEC.SourceManifest.xml' -dest:auto,ComputerName="https://xxxxxxxxxx.publiccloud.com.br:8172/msdeploy.axd?site=Default%20Web%20Site",UserName='UserName',Password='Password',IncludeAcls='False',AuthType='Basic' -verb:sync -enableRule:DoNotDeleteRule -disableLink:AppPoolExtension -disableLink:ContentExtension -disableLink:CertificateExtension -setParamFile:"E:\SISPEC\SISPEC\obj\Release\Package\SISPEC.Publish.Parameters.xml" -retryAttempts=2
just to get the same 503 Server Unavailable message.
Edit 3
This question was cross-posted at the IIS Web Deployment Tool (MS Deploy) forum here.
Fyi - I too was getting the 404 errors. It turned out that I had to download the full package and install everything.
http://www.iis.net/downloads/microsoft/web-deploy#additionalDownloads
I had this same error (ERROR_DESTINATION_NOT_REACHABLE). I was able to fix the issue by opening port 8172.
I then ran into the error: ERR_COULD_NOT_CONNECT_TO_REMOVESVC which I was able to resolve by installing every component of Web Deploy 3.0. It was trying to hit /MSDEPLOYAGENTSERVICE which by default isn't installed by the Web Deploy 3.0 installer.
I had to manually add the Deployment Handler. In IIS Manager, with the server selected, choose "IIS|Handler Mappings|Add Managed Handler...".
Request path: msdeploy.axd
Type: Microsoft.Web.Deployment.DeploymentAgentHandler,..., Version=9...
Name: Web Deploy Whatever
In my case, the default certificate issued for WMSVC was not issued for the machine-name. My Solution was to:
Issue a certificate for the machine name from my domain CA. This could be self-signed if you're willing to trust the certificate.
Install that certificate under the Personal certificate store
stop the web management service
change the certificate to my properly issued certificate
restart the service.
Did you check your handlers? You can test this by creating an HTML page on the same folder and trying to access that HTML. If you can, then go check that your site has the necessary handlers. Also, make sure your DNS record are pointing to the correct IP address.
First I tried just Repair install of Web Deploy 3.0 and not worked. Removing and installing solved my issue.
In my case I had both Web Deploy 2.0 and 3.0 on server machine.
Removing both and installing just 3.0 solved my issue.
Ensure Web Management Service is started.
I deleted SSL certificate and the service stopped working.
If all previous indications fail, and if you are using an Azure virtual machine, where the endpoint for 8172 is open, I have solved it deleting the endpoint and opening it again. I believe the first time I have selected using Floating IP Enabled, and that did not work. Just create the endpoint again, select disable floating ip and done!
I have set up a Continuous Integration build with TeamCity and MSBuild. I am using the MSBuild Extension Pack, primarily for its IIS7AppPool Task. My goal is to stop an IIS app pool before the build script does a deployment step and start the app pool afterwards. The IIS app pool is on a different server from the build agent.
I have used the following MS Build code to stop IIS:
<MSBuild.ExtensionPack.Web.Iis7AppPool TaskAction="Stop" MachineName="$(DeploymentServerName)" Name="$(WebAppPoolName)" Username="$(DeploymentServerUsername)" UserPassword="$(DeploymentServerUserPassword)" />
I have set up a local admin user account on the web server, and used its username and password above as $(DeploymentServerUsername) and $(DeploymentServerPassword).
The error I am receiving is:
[MSBuild.ExtensionPack.Web.Iis7AppPool]
E:\TeamCity\BuildAgent\work\1a1dc058c29f0f12\BuildAndDeployment\Build_DevCI.proj(153,
5): UnauthorizedAccessException: Retrieving the COM class factory for
remote component with CLSID {2B72133B-3F5B-4602-8952-803546CE3344}
from machine DEPLOYMENTSERVERMACHINENAME failed due to the following
error: 80070005 DEPLOYMENTSERVERMACHINENAME.
I have asked our network guys to take down any firewalls between the two machines, but I still get the same error.
Can anyone see anything wrong with my syntax or offer any advice on how to get this to work?
I can get the task to stop an IIS app pool on my local machine ok, so my syntax should be right.
I have looked at this post, but I don't think it's the same problem:
MSBuild remoting to server throws COMException error
I have built an ASP.NET web application with Visual Studio 2008 and target framework version 2.0. I have created a Web Setup project to deploy this at multiple target OSes.
For the setup project, I have written a custom action which gets executed on "OnCommitting" event. This custom action adds wildcard script mapping for routing all requests through ASP.NET engine.
FileMon suggests that an error occurs while creating a file in the following directory:
C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files
The user account which was attempting this action was IWAM_<host name>.
The problem is after running this setup, if I try to access any url on the newly installed site, I received the error message:
Server Error in '/myapp' Application.
Failed to access IIS metabase.
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.
Exception Details: System.Web.Hosting.HostingEnvironmentException: Failed to access IIS metabase.
The process account used to run ASP.NET must have read access to the IIS metabase (e.g. IIS://servername/W3SVC). For information on modifying metabase permissions, please see http://support.microsoft.com/?kbid=267904.
Source Error:
An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.
I have already tried these options after 2 days of googling:
Run aspnet_regiis -i
Run aspnet_regiis -ga \ASPNET
Run aspnet_regiis -u and then aspnet_regiis -i
Option 3 has worked for me as of now, but, I want avoid using this, since, my web app will be deployed on a machine which might already be hosting some other app on IIS and I do not want to disturb these apps.
Can anyone suggest me a workaround for this?
B.T.W. my current system has .Net framework 3.5 and VS2008 installed on Win XP SP3 and IIS 5.1.
Thanks,
Vamyip
Your best bet is a custom bit of script in the installer package that checks permissions and then runs the command based on that information.
On a server OS this shouldn't be necessary since the default user for the application group will be in the IIS_WPG and have permissions to the temp directories. Windows XP has a bugged up version of IIS that is non-standard and doesn't follow all the rules. If your expected deployment environment is Windows Server 2003 or better then your installer should work as-is.