From Win2008-R2 to Win2012-R2:
The error on the destination is 9000 in the event log. Have looked high and low and do not see how to resolve this.
The command is:
msdeploy -verbose -verb:sync -source:webserver,computername=WIN-67E8GTGADGJ -dest:webserver,computername=192.168.2.21,userName="administrator",password="###"
On the cmd line, the error returned is:
Error: (8/25/2015 5:07:09 PM) An error occurred when the request was processed on the remote computer.
Error: The ApplicationHost.config file is invalid. Cannot proceed with synchronization.
Error count: 1.
On the destination system, there is an error in the event log:
Microsoft-Windows-IIS-APPHOSTSVC -- message 9000
It seems like there should be a way to solve. The target is sparkly clean Win2012-R2 with IIS role
There are no useful docs on the web to engage this.
Note: A commenter on this thread keeps saying that msdeploy does not support IIS 8.x. That commenter is wrong. http://www.iis.net/downloads/microsoft/web-deploy
There seems to be real problems with msdeploy, but no one seems to understand (or document) why. The tool is primarily built to go from IIS 6.x (Win 2003) to newer IIS.
In our experience, when going from IIS 7.x to 8.x, you often cannot use msdeploy with "source:webserver" approach. However, msdeploy can do a lot of the lifting for you from 7.x to 8.x.
Here are some steps I have seen work:
msdeploy -verbose -verb:sync -source:apphostconfig="WEB SITE NAME",computername=SOURCEMACHINE -dest:apphostconfig="WEB SITE NAME",computername=DESTINATIONMACHINE,userName="administrator",password="password-here" -enableLink:AppPoolExtension
Note the "enablelink" flag.
Repeat the above with:
-enableLink:CertificateExtension
and then
-enableLink:FrameworkConf
Once this is done, msdeploy has done all it can. You should now have the site migrated, with content and app pools, and ssl certs, and the configuration related to the sites and app pools.
For mime mappings, and other IIS system wide settings (compression is one example), you are on your own.
Related
Using the instructions in this link and the "How to Deploy Klondike"
github instructions I have installed the Klondike release on my local IIS (Version 10.0.15063.0). At first it looked promising, but then I realized that the main page is showing "loading..." rather than the Klondike URL. See image:
Additionally the when I click the API page tab, the site navigates to http://localhost:8081/api which returns a 404.0 HTTP error. This error may not seem very surprising as the site's directory does not contain an api directory. However, I have reverse engineering a working server with Klondike configured on it and it also does not have the api directory. Here is an image of the 404.0 error:
Additionally, when I try to nuget pushto localhost:8081, it results with the error in the image here (note, the red blocked out text is the apikey).
Finally, I have left the handleLocalRequestsAsAdmin is set to true, but even though I am on localhost, it does not show me the "LocalAdministrator" link. I believe that all these symptoms are linked to the same issue.
I have tried the following with no affect on the behavior:
Putting this site in c:\inetpub\wwwroot and also in C:\Klondike;
Using different port numbers, such as 8081 and 80;
Putting a 127.0.0.1 alias in my hosts file and binding the value in IIS to the host name; and
Installed the Debugging tools for Windows install as was suggested on the github site and set the debuggingToolsPath to its path.
(at this point, I'm just guessing at the issue)
The settings I have changed in settings.config file are as follows:
packagesPath = C:\Klondike\App_Data\Packages
Left lucenePath = empty string (I also tried this with a value of C:\Klondike\App_Data\Lucene with no affect.
symbolsPath = C:\Klondike\App_Data\Symbols
debuggingToolsPath = C:\Program Files (x86)\Windows Kits\10\Debuggers\x64
ignorePackageFiles = "true"
I have not changed any values in the web.config file from the default web.config release values.
Thank you for any help that you can provide.
I ran into the same problem, although I was installing Klondike on a remote server rather than locally, but still IIS 10. The problem might be you don't have all the IIS components installed or enabled. More specifically, .NET or one of its required components might not be installed or enabled. If you look at the error on the /api link - it has to do with the MapRequestHandler and Static file handler in IIS - this indicates IIS doesn't know how to handle the request, which is an indicator you might be missing the ExtensionlessUrlHandler in IIS, as well as other components. To solve the problem, go to Start -> Control Panel -> Turn Windows features on or off (varies per system, might be under "Programs and Features"), then find the IIS Application Development Features. These might be listed under Internet Information Services -> World Wide Web Services, or Web Server (IIS) -> Web Server, depending on your system. Once you find these Application Development Features, make sure you have an ASP.NET option checked - you might just want to check all the options. Below is screenshot of what it looks like on my system. You might want to reboot after adding those features - not sure if a reboot is required, but it doesn't hurt. After you enable those features, you might start to run into all kinds of file permission errors when running the Klondike app - you might want to just remove Klondike and reinstall it from the zip file. I have a feeling it Klondike doesn't run cleanly the first time it has problems, as it needs to create an App_Data folder with sub directories.
I have recently been trying to migrate some websites from a 2003 server with IIS 6 to a 2012 server with IIS 8 installed. I am using Microsoft's Web Deploy tool and have been successful in copying a few web sites one at a time using the following command (changing the site identifier # for each site).NOTE: The reason the mumbo jumbo with replacing the drive exists is because our new server has a different data drive on it, and MSDeploy didn't like that. Could that be breaking things as well?
msdeploy -verb:sync -source:metakey=lm/w3svc/#,computername=SourceServerNameHere -dest:metakey=lm/w3svc/# -replace:objectName=metaProperty,scopeAttributeName=name,scopeAttributeValue=Path,targetAttributeName=value,match="F:",replace="E:" -enableLink:appPoolExtension > migration.log
The main issue is that when I try to navigate to any site one of three errors happens..
1. 503 Service Unavailable
2. 401.2 Unauthorized
3. 404.17 Not Found
These errors start from 1, and progress to 3 as I am trying to troubleshoot the IIS configurations. But this kind of defeats the purpose of using the Web Deploy Tool. Has anyone had any luck migrating sites being completely successful, or does the tool not actually support "IIS 6.0 or higher migration?"
Thanks in advance.
EDIT: So I have been able to get the main page of my site working by reverting the Handler Mappings and Default Documents to their parent configurations, and making sure that the AppPools don't conflict with versions, etc. The problem with this, is that I have to figure out how to do this for every app and app pool under the sites... Does anyone else have a similar problem?
Try using the iisApp provider instead of the MetaKey provider. For example,
msdeploy -verb:sync -source:iisApp=Site1/ContosoApp,computerName=Server1 -dest:iisApp="Site1/ContosoApp",computerName=Server2
https://technet.microsoft.com/en-us/library/dd569054(v=ws.10).aspx
I ended up contacting Microsoft Support to get this sorted out and ended up spending 3 hours on the phone with them...There were multiple issues that came up during the deploy tool's migration.
The bulk of the issues were corrected by changing the application pools to 64-bit and commenting out abomappercustom handlers in the applicationhost.config.
Using v7.1 (that is the ver at cmd prompt), 3.6 (from web platform installer) of msdeploy.exe
Migrating from Win2008-R2 IIS to Win2012-R2
Attempting to move everything IIS related over. (And yes, we have customized applicatiohost.config, but we do not know all the mods... that is why we are using a migration tool,,, to move everything...)
Command I am running:
C:\Program Files\IIS\Microsoft Web Deploy V3>msdeploy
-verb:sync -source:webserver,
computername=WIN-67E8GTGADGJ
-dest:webserver,computername=192.168.2.21,
userName="administrator",password="###"
output:
Info: Using ID '1d59e6bd-0f89-4479-9853-98e164c9f613' for connections to the rem
ote server.
Info: Using ID '0c99bd7f-faa3-4737-ac35-d65c495402b6' for connections to the rem
ote server.
Info: Adding MSDeploy.webServer (MSDeploy.webServer).
Info: Adding webServer (MSDeploy.webServer/webServer).
Info: Adding appHostConfig ().
Error: (8/24/2015 10:28:43 PM) An error occurred when the request was processed on the remote computer.
Error: The ApplicationHost.config file is invalid. Cannot proceed with synchronization.
Error count: 1.
MORE INFORMATION
The sequence of events is:
Target system logs one error event:
Microsoft-Windows-IIS-APPHOSTSVC -- message 9000
And then msdeploy on the source system throws (and msdeploy exits):
Error: (8/25/2015 4:36:50 PM) An error occurred when the request was processed on the remote computer.
Error: The ApplicationHost.config file is invalid. Cannot proceed with synchronization.
Error count: 1.
UPDATE: Initially I was getting TWO event log errors on target system. Message 9000 and 9012. I was able to fix the 9012 by extending the applicationhost.config file. But hours of work and no solution yet for the 9000 error.
I have examined the ApplicationHost.config, and compared it to baseline, and there really seems to be nothing special there.
What is the path to resolution?
The answer is that there seems to be real problems with msdeploy, but no one seems to understand (or document) why. The tool is primarily built to go from IIS 6.x (Win 2003) to newer IIS.
In our experience, when going from IIS 7.x to 8.x, you often cannot use msdeploy with "source:webserver" approach. However, msdeploy can do a lot of the lifting for you from 7.x to 8.x.
Here are some steps I have seen work:
First, do three steps. This will let msdeploy move as much as it can (would be nice if it could move more, but this is as far as I have seen work):
msdeploy -verbose -verb:sync -source:apphostconfig="WEB SITE NAME",computername=SOURCEMACHINE -dest:apphostconfig="WEB SITE NAME",computername=DESTINATIONMACHINE,userName="administrator",password="password-here" -enableLink:AppPoolExtension
Note the "enablelink" flag.
Repeat the above with:
-enableLink:CertificateExtension
and then
-enableLink:FrameworkConf
Once this is done, msdeploy has done all it can. You should now have the site migrated, with content and app pools, and ssl certs, and the configuration related to the sites and app pools.
For mime mappings, and other IIS system wide settings (compression is one example), you are on your own.
Don't ask me why there is no document on how to do this. (Don't ask me why msdeploy can't just do the whole freaking server. It works great from IIS 6, but not from IIS 7, like what kind of crazy is that? Anyway, send Satya an email about it.)
I have been searching for this error all over the internet but no matter what I try to fix this problem nothing actually works. And the detailed message that I got after I copied a url from fiddler and put it in the browser and is as follows.
Module IIS Web Core
Notification BeginRequest
Handler Not yet determined
Error Code 0x80070003
Config Error Cannot read configuration file
Config File \?\C:\inetpub\wwwroot\myservices\web.config
Actually what has happened in the past that I had this service called "myservices" working all fine when I used visual studio to create a virtual directory for it in IIS. But then what I did, I tried to do a web deploy of this service in IIS and removed ("myservices" from Default Web Site tree which I had created by creating a virtual directory from within VS 2013). And what I observed is, that after I web deployed "myservices" it didn't work the same way as it was working previously when (I created a virtual directory for "myservices" in IIS through VS2013 but had it removed to see whether the web deployed version of it would behave the same way). Therefore when I analyzed the cause of HTTP error 500.19 through Fiddler (for the web deployed service) it said (Config Error Cannot read configuration file and
Config File \?\C:\inetpub\wwwroot\myservices\web.config) but when I physically try to look into the folder C:\inetpub\wwwroot I could never find myservices folder as such (what to talk of web.config file in it). Then I manually created a folder called "myservices" in C:\intepub\wwwroot directory and put my web.config file there to see if the web deployed service would still work, but it didn't. Then I removed this folder called "myservices" and obviously the web.config file inside of it and also removed the web deployed service from Default Web Site Tree.
And now after all this mess even if I go to visual studio and try to create a virtual directory for my service "myservices" (I can see it in Default Web Site Tree in IIS ) but it would throw the same error as http 500.19 as the web deployed version of this service. In other words whatever I tried it messed up my services even when it's not a web deployed version which previously was not the case. I literally request everybody out there to please guide/suggest me with whatever experience they have as to what went wrong in all this trial and error endeavor of mine.
Thanks
This may be a long shot, but sometimes web.config files get corrupted (our code repository occasionally does this) and you cannot see it with the naked eye. take a simple web.config file that you know is not corrupt and start rebuilding the file from there if it works. We have also used a hex editor (like XVI32) where we can see the corruption, but its much easier to rebuild from a fresh file.
If your problem is not the web.config but the virtual folders, then do the same methodology. Start over with what works and go from there. It could be the web deploy tool that is causing the corruption.
When nothing worked, all I did, was uninstalled IIS rebooted my machine re-installed it again and the HTTP 500.19 is gone.It seems like my IIS was corrupted.
I'm trying to do msdeploy of a MVC app to a windows7 box, running on command-line. And kept getting this error:
Error Code: ERROR_DESTINATION_NOT_REACHABLE
More Information: Could not connect to the destination computer ("192.168.xxx.xxx"
). On the destination computer, make sure that Web Deploy is installed and that
the required process ("The Web Management Service") is started.
Error: The remote server returned an error: (404) Not Found.
Error count: 1.
I've verified both Wmsvc (seems this is being used) and MsDepSvc are running. And firewall are disabled. In the browser when I visit https://192.168.xxx.xxx:8172/msdeploy.axd, I got a Server Error 404, seems a bit further than where the command-line stopped.
Most of instructions on setting up IIS7 and Web deployment I could find online is for MS Servers. Both my local machine and the Windows7 machine has the same version of Msdeploy installed.
I had exactly the same issue with a VM on Azure, and the solution was to enable first the IIS Management Service and then install Web Deploy (I used Web Platform Installer). Seems that the installation order matters. You can find a blog entry I wrote about this here http://davidjrh.intelequia.com/2012/10/configurando-web-platform-installer-y.html
For non-server operating systems (i.e. Windows 7) the Web Deploy publish via Web Management Service is not supported. Instead you will have to use the Remote Agent Service, this is an admin only publishing service. You can find more info at http://technet.microsoft.com/en-us/library/dd569059(v=WS.10).aspx.
I had the same issue using MSDeploy to deploy my web application to remote IIS 7.5 web server running windows 7. I have just figured out how to fix the problem today after reading Sayed's post, so I wanna post my solution here for anyone who would run into this problem like me. Try this:
Enable IIS Management Service (in control panel >> add or remove features >> add or remove windows features)
Install Web Deploy (http://www.iis.net/downloads/microsoft/web-deploy)
Open cmd with Administrative privilege, type “net start msdepsvc” to start the “Web Deploy Agent Service”.
Check this link in your browser: http://serveraddress/MsDeployAgentService/, if it prompts for username and password, MsDeployAgentService is running on server, go to the next step.
In VS, type in http://serveraddress/MsDeployAgentService/ in Service URL while creating publish, instead of https://serveraddress:8172/MsDeploy.axd, and click test connection. It should be ok now.
After checking the Management Service and Web Deploy 3.0 were correctly installed, I found that (from VS2012 at least) the Service URL seems to matter here too, attempting to publish to any of the following did not work for me:
FQDN (localmachine.domain.local)
Domain IP Address (172.22.xxx.xxx)
Loop-back IP (127.0.0.1)
Whereas the following DID work:
localhost
NetBIOS name (localmachine)