Problem with websiteCopy.exe

May 27, 2010 at 12:37 PM

Hi Guys,

I have a problem running the websiteCopy.exe on a partner-hosted environment.
The error message is:

Unhandled Exception: System.Net.WebException: The underlying connection was clos
ed: An unexpected error occurred on a send. ---> System.IO.IOException: The hand
shake failed due to an unexpected packet format.
   at System.Net.Security.SslState.StartReadFrame(Byte[] buffer, Int32 readBytes
, AsyncProtocolRequest asyncRequest)
   at System.Net.Security.SslState.StartReceiveBlob(Byte[] buffer, AsyncProtocol
Request asyncRequest)
   at System.Net.Security.SslState.ForceAuthentication(Boolean receiveFirst, Byt
e[] buffer, AsyncProtocolRequest asyncRequest)
   at System.Net.Security.SslState.ProcessAuthentication(LazyAsyncResult lazyRes
ult)
   at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, C
ontextCallback callback, Object state)
   at System.Net.TlsStream.ProcessAuthentication(LazyAsyncResult result)
   at System.Net.TlsStream.Write(Byte[] buffer, Int32 offset, Int32 size)
   at System.Net.PooledStream.Write(Byte[] buffer, Int32 offset, Int32 size)
   at System.Net.ConnectStream.WriteHeaders(Boolean async)
   --- End of inner exception stack trace ---
   at System.Web.Services.Protocols.WebClientProtocol.GetWebResponse(WebRequest
request)
   at System.Web.Services.Protocols.HttpWebClientProtocol.GetWebResponse(WebRequ
est request)
   at System.Web.Services.Protocols.SoapHttpClientProtocol.Invoke(String methodN
ame, Object[] parameters)
   at Microsoft.Xrm.Client.Services.Proxy.CrmDiscoveryService.Execute(Request Re
quest)
   at Microsoft.Xrm.Client.CrmConnection.GetCrmConnectionDetails(String reason)
   at Microsoft.Xrm.Client.CrmConnection.<>c__DisplayClass2.<.ctor>b__0(String l
oad)
   at Microsoft.Xrm.Client.Threading.MutexExtensions.<>c__DisplayClass2`1.<Get>b
__0(Mutex _)
   at Microsoft.Xrm.Client.Threading.MutexExtensions.Lock(String key, Int32 mill
isecondsTimeout, Action`1 action)
   at Microsoft.Xrm.Client.Threading.MutexExtensions.Get[T](String key, Int32 mi
llisecondsTimeout, Func`2 loadFromCache, Func`2 loadFromService)
   at Microsoft.Xrm.Client.Threading.MutexExtensions.Get[T](String key, Func`2 l
oadFromCache, Func`2 loadFromService)
   at Microsoft.Xrm.Client.Caching.Cache.Get[T](String label, Func`2 load, Actio
n`1 insert)
   at Microsoft.Xrm.Client.Caching.Cache.Get[T](String label, Func`2 load)
   at Microsoft.Xrm.Client.CrmConnection..ctor(String connectionStringName, Stri
ng connectionString)
   at WebsiteCopy.WebsiteImporter.Import(XElement element, String websiteName)
   at WebsiteCopy.WebsiteImporter.Import(Stream input, String websiteName)
   at WebsiteCopy.WebsiteImporter.Import(String inputXml, String websiteName)
   at WebsiteCopy.Copier.Copy(String[] args)
   at WebsiteCopy.Program.Main(String[] args)

I am using the command:
WebsiteCopy.exe /targetConnectionString:"Authentication Type=SPLA; Server=https://hcrm672.crm01.net; User ID=databroker@hcrm672.se; Password=xxxx;" /targetWebsiteName:"hcrm672" /sourceFile:customerportal.xml

May 27, 2010 at 1:38 PM
Edited May 27, 2010 at 1:39 PM

Ok, this problem was solved using the following string:

WebsiteCopy.exe /targetConnectionString:"Authentication Type=SPLA; Server=https://hcrm672.crm01.net/hcrm672; User ID=databroker@hcrm672.se; Password=xxxxx;" /targetWebsiteName:"hcrm672" /sourceFile:customerportal.xml

So, even if you have an IFD-deployment that mapps the hostheader to the correct site, you still have to enter the sitename in the URL.

Please marked as solved.