从 URL 到 运行 的 ClickOnce 部署失败
ClickOnce deployment fails to run from URL
我在从我的 WPF 应用程序打开 ClickOnce 应用程序时遇到问题。
当我尝试在 Internet Explorer 中打开 http:/myServerName/ReportServer/ReportBuilder/ReportBuilder_3_0_0_0.application?
(请注意有意遗漏了一个 /)时,一切正常。 报表生成器 正在正常启动。
如果我尝试在 Mozilla 中做同样的事情 - 它会下载应用程序文件,当我尝试 运行 它时,我收到一个错误:
Cannot download the application.
现在尝试从我的应用程序打开 Report Builder 我 运行:
WebBrowser wb = new WebBrowser();
wb.Navigate("http:/myServer/ReportServer/ReportBuilder/ReportBuilder_3_0_0_0.application?");
(注意故意少了一个/)
我得到了与来自 Mozilla 的错误相同的错误。
如果我尝试按 Ctrl+单击代码中的 link,也会发生同样的事情。
注意:我已将默认浏览器设置为 Internet explorer。
出现以下错误:
Below is a summary of the errors, details of these errors are listed later in the log.
* Activation of C:\Users\Deividas\AppData\Local\Microsoft\Windows\INetCache\IE\D5SZ3L71\ReportBuilder_3_0_0_0[1].application resulted in exception. Following failure messages were detected:
+ Downloading file:///C:/Users/Deividas/AppData/Local/Microsoft/Windows/INetCache/IE/D5SZ3L71/RptBuilder_3/MSReportBuilder.exe.manifest did not succeed.
+ Could not find a part of the path 'C:\Users\Deividas\AppData\Local\Microsoft\Windows\INetCache\IE\D5SZ3L71\RptBuilder_3\MSReportBuilder.exe.manifest'.
+ Could not find a part of the path 'C:\Users\Deividas\AppData\Local\Microsoft\Windows\INetCache\IE\D5SZ3L71\RptBuilder_3\MSReportBuilder.exe.manifest'.
+ Could not find a part of the path 'C:\Users\Deividas\AppData\Local\Microsoft\Windows\INetCache\IE\D5SZ3L71\RptBuilder_3\MSReportBuilder.exe.manifest'.
堆栈跟踪:
Following errors were detected during this operation.
* [2015-07-10 13:52:41] System.Deployment.Application.DeploymentDownloadException (Unknown subtype)
- Downloading file:///C:/Users/Deividas/AppData/Local/Microsoft/Windows/INetCache/IE/D5SZ3L71/RptBuilder_3/MSReportBuilder.exe.manifest 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.DownloadManifestAsRawFile(Uri& sourceUri, String targetPath, IDownloadNotification notification, DownloadOptions options, ServerInformation& serverInformation)
at System.Deployment.Application.DownloadManager.DownloadApplicationManifest(AssemblyManifest deploymentManifest, String targetDir, Uri deploymentUri, IDownloadNotification notification, DownloadOptions options, Uri& appSourceUri, String& appManifestPath)
at System.Deployment.Application.DownloadManager.DownloadApplicationManifest(AssemblyManifest deploymentManifest, String targetDir, Uri deploymentUri, Uri& appSourceUri, String& appManifestPath)
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.PerformDeploymentActivation(Uri activationUri, Boolean isShortcut, String textualSubId, String deploymentProviderUrlFromExtension, BrowserSettings browserSettings, String& errorPageUrl)
at System.Deployment.Application.ApplicationActivator.ActivateDeploymentWorker(Object state)
--- Inner Exception ---
System.Net.WebException
- Could not find a part of the path 'C:\Users\Deividas\AppData\Local\Microsoft\Windows\INetCache\IE\D5SZ3L71\RptBuilder_3\MSReportBuilder.exe.manifest'.
- Source: System
- Stack trace:
at System.Net.FileWebRequest.EndGetResponse(IAsyncResult asyncResult)
at System.Net.FileWebRequest.GetResponse()
at System.Deployment.Application.SystemNetDownloader.DownloadSingleFile(DownloadQueueItem next)
--- Inner Exception ---
System.Net.WebException
- Could not find a part of the path 'C:\Users\Deividas\AppData\Local\Microsoft\Windows\INetCache\IE\D5SZ3L71\RptBuilder_3\MSReportBuilder.exe.manifest'.
- Source: System
- Stack trace:
at System.Net.FileWebResponse..ctor(FileWebRequest request, Uri uri, FileAccess access, Boolean asyncHint)
at System.Net.FileWebRequest.GetResponseCallback(Object state)
--- Inner Exception ---
System.IO.DirectoryNotFoundException
- Could not find a part of the path 'C:\Users\Deividas\AppData\Local\Microsoft\Windows\INetCache\IE\D5SZ3L71\RptBuilder_3\MSReportBuilder.exe.manifest'.
- Source: mscorlib
- Stack trace:
at System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath)
at System.IO.FileStream.Init(String path, FileMode mode, FileAccess access, Int32 rights, Boolean useRights, FileShare share, Int32 bufferSize, FileOptions options, SECURITY_ATTRIBUTES secAttrs, String msgPath, Boolean bFromProxy, Boolean useLongPath, Boolean checkHost)
at System.IO.FileStream..ctor(String path, FileMode mode, FileAccess access, FileShare share, Int32 bufferSize, FileOptions options, String msgPath, Boolean bFromProxy)
at System.IO.FileStream..ctor(String path, FileMode mode, FileAccess access, FileShare share, Int32 bufferSize, Boolean useAsync)
at System.Net.FileWebStream..ctor(FileWebRequest request, String path, FileMode mode, FileAccess access, FileShare sharing, Int32 length, Boolean async)
at System.Net.FileWebResponse..ctor(FileWebRequest request, Uri uri, FileAccess access, Boolean asyncHint)
单击“详细信息”时的完整错误日志文件:
http://pastebin.com/eLJPq9qr
我设法用这个简单的解决方案解决了这个问题:
Process p = new Process();
p.StartInfo.FileName = "iexplore.exe";
p.StartInfo.Arguments = "http://myServer/ReportServer/ReportBuilder/ReportBuilder_3_0_0_0.application?/Folder1/Folder+two/report1";
p.Start();
它会启动报表生成器,您可以选择指定打开所需报表的路径(已连接到报表服务器)。
希望这有帮助
我在从我的 WPF 应用程序打开 ClickOnce 应用程序时遇到问题。
当我尝试在 Internet Explorer 中打开 http:/myServerName/ReportServer/ReportBuilder/ReportBuilder_3_0_0_0.application?
(请注意有意遗漏了一个 /)时,一切正常。 报表生成器 正在正常启动。
如果我尝试在 Mozilla 中做同样的事情 - 它会下载应用程序文件,当我尝试 运行 它时,我收到一个错误:
Cannot download the application.
现在尝试从我的应用程序打开 Report Builder 我 运行:
WebBrowser wb = new WebBrowser();
wb.Navigate("http:/myServer/ReportServer/ReportBuilder/ReportBuilder_3_0_0_0.application?");
(注意故意少了一个/) 我得到了与来自 Mozilla 的错误相同的错误。 如果我尝试按 Ctrl+单击代码中的 link,也会发生同样的事情。
注意:我已将默认浏览器设置为 Internet explorer。
出现以下错误:
Below is a summary of the errors, details of these errors are listed later in the log.
* Activation of C:\Users\Deividas\AppData\Local\Microsoft\Windows\INetCache\IE\D5SZ3L71\ReportBuilder_3_0_0_0[1].application resulted in exception. Following failure messages were detected:
+ Downloading file:///C:/Users/Deividas/AppData/Local/Microsoft/Windows/INetCache/IE/D5SZ3L71/RptBuilder_3/MSReportBuilder.exe.manifest did not succeed.
+ Could not find a part of the path 'C:\Users\Deividas\AppData\Local\Microsoft\Windows\INetCache\IE\D5SZ3L71\RptBuilder_3\MSReportBuilder.exe.manifest'.
+ Could not find a part of the path 'C:\Users\Deividas\AppData\Local\Microsoft\Windows\INetCache\IE\D5SZ3L71\RptBuilder_3\MSReportBuilder.exe.manifest'.
+ Could not find a part of the path 'C:\Users\Deividas\AppData\Local\Microsoft\Windows\INetCache\IE\D5SZ3L71\RptBuilder_3\MSReportBuilder.exe.manifest'.
堆栈跟踪:
Following errors were detected during this operation.
* [2015-07-10 13:52:41] System.Deployment.Application.DeploymentDownloadException (Unknown subtype)
- Downloading file:///C:/Users/Deividas/AppData/Local/Microsoft/Windows/INetCache/IE/D5SZ3L71/RptBuilder_3/MSReportBuilder.exe.manifest 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.DownloadManifestAsRawFile(Uri& sourceUri, String targetPath, IDownloadNotification notification, DownloadOptions options, ServerInformation& serverInformation)
at System.Deployment.Application.DownloadManager.DownloadApplicationManifest(AssemblyManifest deploymentManifest, String targetDir, Uri deploymentUri, IDownloadNotification notification, DownloadOptions options, Uri& appSourceUri, String& appManifestPath)
at System.Deployment.Application.DownloadManager.DownloadApplicationManifest(AssemblyManifest deploymentManifest, String targetDir, Uri deploymentUri, Uri& appSourceUri, String& appManifestPath)
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.PerformDeploymentActivation(Uri activationUri, Boolean isShortcut, String textualSubId, String deploymentProviderUrlFromExtension, BrowserSettings browserSettings, String& errorPageUrl)
at System.Deployment.Application.ApplicationActivator.ActivateDeploymentWorker(Object state)
--- Inner Exception ---
System.Net.WebException
- Could not find a part of the path 'C:\Users\Deividas\AppData\Local\Microsoft\Windows\INetCache\IE\D5SZ3L71\RptBuilder_3\MSReportBuilder.exe.manifest'.
- Source: System
- Stack trace:
at System.Net.FileWebRequest.EndGetResponse(IAsyncResult asyncResult)
at System.Net.FileWebRequest.GetResponse()
at System.Deployment.Application.SystemNetDownloader.DownloadSingleFile(DownloadQueueItem next)
--- Inner Exception ---
System.Net.WebException
- Could not find a part of the path 'C:\Users\Deividas\AppData\Local\Microsoft\Windows\INetCache\IE\D5SZ3L71\RptBuilder_3\MSReportBuilder.exe.manifest'.
- Source: System
- Stack trace:
at System.Net.FileWebResponse..ctor(FileWebRequest request, Uri uri, FileAccess access, Boolean asyncHint)
at System.Net.FileWebRequest.GetResponseCallback(Object state)
--- Inner Exception ---
System.IO.DirectoryNotFoundException
- Could not find a part of the path 'C:\Users\Deividas\AppData\Local\Microsoft\Windows\INetCache\IE\D5SZ3L71\RptBuilder_3\MSReportBuilder.exe.manifest'.
- Source: mscorlib
- Stack trace:
at System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath)
at System.IO.FileStream.Init(String path, FileMode mode, FileAccess access, Int32 rights, Boolean useRights, FileShare share, Int32 bufferSize, FileOptions options, SECURITY_ATTRIBUTES secAttrs, String msgPath, Boolean bFromProxy, Boolean useLongPath, Boolean checkHost)
at System.IO.FileStream..ctor(String path, FileMode mode, FileAccess access, FileShare share, Int32 bufferSize, FileOptions options, String msgPath, Boolean bFromProxy)
at System.IO.FileStream..ctor(String path, FileMode mode, FileAccess access, FileShare share, Int32 bufferSize, Boolean useAsync)
at System.Net.FileWebStream..ctor(FileWebRequest request, String path, FileMode mode, FileAccess access, FileShare sharing, Int32 length, Boolean async)
at System.Net.FileWebResponse..ctor(FileWebRequest request, Uri uri, FileAccess access, Boolean asyncHint)
单击“详细信息”时的完整错误日志文件: http://pastebin.com/eLJPq9qr
我设法用这个简单的解决方案解决了这个问题:
Process p = new Process();
p.StartInfo.FileName = "iexplore.exe";
p.StartInfo.Arguments = "http://myServer/ReportServer/ReportBuilder/ReportBuilder_3_0_0_0.application?/Folder1/Folder+two/report1";
p.Start();
它会启动报表生成器,您可以选择指定打开所需报表的路径(已连接到报表服务器)。 希望这有帮助