ClickOnce错误:远程主机强行关闭现有连接

时间:2011-11-28 13:43:17

标签: .net apache clickonce socketexception

我有一个恼人的问题。我通过clickonce部署了应用程序。到目前为止,它工作得非常好,并且很容易部署了大量更新。这次我不得不在我的应用程序中做一些重大更改。这导致更新大约是16MB。不幸的是,在下载更新期间(随机时刻),大多数时间客户端计算机出现错误:

ERROR SUMMARY
Below is a summary of the errors, details of these errors are listed later in the log.
* Activation of C:\Documents and Settings\Administrator\Menu Start\Programy\Marketell\Marketell.appref-ms| resulted in exception. Following failure messages were detected:
    + Downloading http://xx.xx.xx.xx/Marketell 2/Application Files/Marketell_1_0_1_2/CounterPathSDK.dll.deploy did not succeed.
    + Unable to read data from the transport connection: An existing connection was forcibly closed by the remote host.
    + An existing connection was forcibly closed by the remote host

还有一些细节:

ERROR DETAILS
Following errors were detected during this operation.
* [2011-11-28 14:02:34] System.Deployment.Application.DeploymentDownloadException (Unknown subtype)
    - Downloading http://xx.xx.xx.xx/Marketell 2/Application Files/Marketell_1_0_1_2/CounterPathSDK.dll.deploy did not succeed.
    - Source: System.Deployment
    - Stack trace:
        at System.Deployment.Application.SystemNetDownloader.DownloadSingleFile(DownloadQueueItem next)
        at System.Deployment.Application.SystemNetDownloader.DownloadAllFiles()
        at System.Deployment.Application.FileDownloader.Download(SubscriptionState subState)
        at System.Deployment.Application.DownloadManager.DownloadDependencies(SubscriptionState subState, AssemblyManifest deployManifest, AssemblyManifest appManifest, Uri sourceUriBase, String targetDirectory, String group, IDownloadNotification notification, DownloadOptions options)
        at System.Deployment.Application.ApplicationActivator.DownloadApplication(SubscriptionState subState, ActivationDescription actDesc, Int64 transactionId, TempDirectory& downloadTemp)
        at System.Deployment.Application.ApplicationActivator.InstallApplication(SubscriptionState& subState, ActivationDescription actDesc)
        at System.Deployment.Application.ApplicationActivator.ConsumeUpdatedDeployment(SubscriptionState& subState, ActivationDescription actDesc)
        at System.Deployment.Application.ApplicationActivator.PerformDeploymentUpdate(SubscriptionState& subState, String& errorPageUrl)
        at System.Deployment.Application.ApplicationActivator.ProcessOrFollowShortcut(String shortcutFile, String& errorPageUrl, TempFile& deployFile)
        at System.Deployment.Application.ApplicationActivator.PerformDeploymentActivation(Uri activationUri, Boolean isShortcut, String textualSubId, String deploymentProviderUrlFromExtension, BrowserSettings browserSettings, String& errorPageUrl)
        at System.Deployment.Application.ApplicationActivator.ActivateDeploymentWorker(Object state)
    --- Inner Exception ---
    System.IO.IOException
    - Unable to read data from the transport connection: Istniejące połączenie zostało gwałtownie zamknięte przez zdalnego hosta.
    - Source: System
    - Stack trace:
        at System.Net.ConnectStream.Read(Byte[] buffer, Int32 offset, Int32 size)
        at System.Deployment.Application.SystemNetDownloader.DownloadSingleFile(DownloadQueueItem next)
    --- Inner Exception ---
    System.Net.Sockets.SocketException
    - Istniejące połączenie zostało gwałtownie zamknięte przez zdalnego hosta
    - Source: System
    - Stack trace:
        at System.Net.Sockets.Socket.Receive(Byte[] buffer, Int32 offset, Int32 size, SocketFlags socketFlags)
        at System.Net.Sockets.NetworkStream.Read(Byte[] buffer, Int32 offset, Int32 size)

当然我用X替换了真正的IP 只有一次正确更新。我使用WAMP作为HTTP服务器。 我已经谷歌搜索了一段时间,但没有找到任何实用的东西。

由于

1 个答案:

答案 0 :(得分:2)

我知道这是一个老问题,但我今天遇到了这个问题,结果是客户端的防火墙阻止从ClickOnce服务器下载二进制文件。我们添加了一个例外,它运行良好。