2015-07-10 70 views
1

我遇到了打開我的WPF應用程序的ClickOnce應用程序的問題。ClickOnce部署無法從URL運行

當我在Internet Explorer中嘗試打開http:/myServerName/ReportServer/ReportBuilder/ReportBuilder_3_0_0_0.application?(注意一個/有意失蹤)時,一切正常。 報告生成器正在啓動,沒有問題。

如果我嘗試做在Mozilla同樣的事情 - 它下載的應用程序文件,當我嘗試運行它,我得到一個錯誤:

Cannot download the application.

現在對於試圖從打開報表生成器我的應用程序運行:

WebBrowser wb = new WebBrowser(); 
wb.Navigate("http:/myServer/ReportServer/ReportBuilder/ReportBuilder_3_0_0_0.application?"); 

(注意,一個/故意丟失) ,我也得到了同樣的錯誤,如果它是Mozilla的。 同樣的事情發生,如果我嘗試Ctrl +單擊我的代碼中的鏈接。

注:我已將默認瀏覽器設置爲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

+1

這是一個ClickOnce應用程序,對吧? – Herdo

+1

是的,ReportServer中的Report Builder是ClickOnce應用程序,但我也在本地安裝了Report Builder。 – Deividas

+1

您可以驗證目錄C:\ Users \ Deividas \ AppData \ Local \ Microsoft \ Windows \ INetCache \ IE \ D5SZ3L71 \ RptBuilder_3 \是否存在? – Herdo

回答

1

我設法克服這個簡單的問題解決方案:

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(); 

它啓動報告構建器,並可選擇指定打開所需報告(已連接到報告服務器)的路徑。 希望這可以幫助