0

First I'll start by saying that this question is similar to this question: Cannot use msdeploy to sync 2 websites - ERROR_FRAMEWORK_VERSIONS_DO_NOT_MATCH.

Actually my use case is different... but despite that I still tried to get the big picture and follow the answers there. However it didn't work...

Let me explain.

In my case I am trying to migrate a website running on IIS 7.5 and Windows Server 2008 to another machine running IIS 10 and Windows Server 2016.

I found a good detailed tutorial called Steps to migrate the websites from IIS 7.5 to IIS 10 which matched my situation perfectly and I followed it carefully, installing all the required roles and features on the new server and Web Deploy 3.6 on both servers (which integrated correctly on both IIS Managers, adding the "Deploy" options to the context menu).

So I then successfully managed to export the website, but when I tried importing it in IIS 10, the import operation halted with this error:

The version of the .NET Framework Configuration Provider (machineConfig64) are different on the source (2.0) and destination (4.0).

ERROR_FRAMEWORK_VERSIONS_DO_NOT_MATCH

Learn more at: https://docs.microsoft.com/en-us/iis/publish/troubleshooting-web-deploy/web-deploy-error-codes#ERROR_FRAMEWORK_VERSIONS_DO_NOT_MATCH

Now, I did read the above documentation page and also a different article at: https://blogs.msdn.microsoft.com/ericparvin/2015/04/03/error_framework_versions_do_not_match/

and as advised I tried inverting the position of

<supportedRuntime version="v2.0.50727" />
<supportedRuntime version="v4.0" />

both in msdeploy.exe.config and msdepsvc.exe.config, on both the origin and destination server, and also restarted the wmsvc service.

However no matter which combination of changes I try, I still get the same error message.

I also exported the website again after applying those changes, but importing failed again with the same error.

Now, I have to admit that I am not really sure I got this all under my belt... Both the official and unofficial documentation articles never make clear if you have to edit the origin or destination msdeploy.exe.config and msdepsvc.exe.config. It's all given for granted! Moreover for some reason Microsoft decided that they had to use the words "client" and "server", and it's never clear when those refer to the origin server and destination server!

So the only thing I could do is make a change here, restart service, see if works, make a change there, restart service, see if it works... and so on... until I got more and more confused and frustrated.

And another thing that is making me go crazy is that the origin website uses a .NET Framework 4.0 Classic application pool, yet the error complains that the origin is on .NET 2.0. ??? How is that?

Well, I'd really appreciate if somebody could give me a little guidance into understanding what I am doing wrong and how I could fix it... Thanks a lot in advance!

Redoman
  • 121
  • 1
  • 6
  • Concerning the confusing **client / server** terminology, I finally found something useful, and at the same time funny, being it from Microsoft itself: an official Microsoft Web Deploy documentation article where the author goes: *The reason I am using the word source instead of client is because client and server are very confusing terms in synchronization...* https://docs.microsoft.com/en-us/iis/publish/using-web-deploy/web-deploy-powershell-cmdlets Ok, these guys will never cease to amaze me... – Redoman Jun 14 '18 at 09:18

1 Answers1

1

Answering this myself:

The problem and source of confusion was that I was mixing console-based and GUI-based (IIS) Web Deploy approaches.

Specifically, I was correctly modifying the msdeploy.exe.config for Web Deploy to use .NET v4.0 on the source, but then I was not using the msdeploy.exe command line to actually deploy, and instead I was using IIS website context menu deploy > export, which does not read the configuration from the above file but lets you configure those settings in the dialog window during the export process, using machine configuration (32 and 64) parameters which were set to 2.0 by default.

So I fixed this by simply unticking those parameters in the export dialog window and everything was imported nicely in the destination machine.

Redoman
  • 121
  • 1
  • 6