ClickOnce Installation from URL still tries to download vsto file locally - vsto

I try to deploy my VSTO AddIn using ClickOnce with the following setup. When I start setup the installer still tries to find the vsto file in the users download folder instead of downloading it from the server.
This is the detailed error message:
Name:
Von: file:///C:/Users/myname/Downloads/myapp_OutlookPlugin.vsto
************** Ausnahmetext **************
System.Deployment.Application.DeploymentDownloadException: 'file:///C:/Users/myname/Downloads/myapp_OutlookPlugin.vsto' konnte nicht gedownloadet werden. ---> System.Net.WebException: Die Datei "C:\Users\myname\Downloads\myapp_OutlookPlugin.vsto" konnte nicht gefunden werden. ---> System.Net.WebException: Die Datei "C:\Users\myname\Downloads\myapp_OutlookPlugin.vsto" konnte nicht gefunden werden. ---> System.IO.FileNotFoundException: Die Datei "C:\Users\myname\Downloads\myapp_OutlookPlugin.vsto" konnte nicht gefunden werden.
bei System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath)
bei 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)
bei System.IO.FileStream..ctor(String path, FileMode mode, FileAccess access, FileShare share, Int32 bufferSize, FileOptions options, String msgPath, Boolean bFromProxy)
bei System.Net.FileWebStream..ctor(FileWebRequest request, String path, FileMode mode, FileAccess access, FileShare sharing, Int32 length, Boolean async)
bei System.Net.FileWebResponse..ctor(FileWebRequest request, Uri uri, FileAccess access, Boolean asyncHint)
--- Ende der internen Ausnahmestapelüberwachung ---
bei System.Net.FileWebResponse..ctor(FileWebRequest request, Uri uri, FileAccess access, Boolean asyncHint)
bei System.Net.FileWebRequest.GetResponseCallback(Object state)
--- Ende der internen Ausnahmestapelüberwachung ---
bei System.Net.FileWebRequest.EndGetResponse(IAsyncResult asyncResult)
bei System.Net.FileWebRequest.GetResponse()
bei System.Deployment.Application.SystemNetDownloader.DownloadSingleFile(DownloadQueueItem next)
--- Ende der internen Ausnahmestapelüberwachung ---
bei Microsoft.VisualStudio.Tools.Applications.Deployment.ClickOnceAddInDeploymentManager.GetManifests(TimeSpan timeout)
bei Microsoft.VisualStudio.Tools.Applications.Deployment.ClickOnceAddInDeploymentManager.InstallAddIn()
Signing the deployment is configured like this:
And yes I made sure that the files are available on the server in the right directory. I verified this by manually downloading the vsto file from the webserver. It succeeded.

Related

Downloading Clickonce application fails in WebBrowser control

I am using webbrowser Control in my application and conditionally needs to download another application ( click once based) without user interaction. the download of the application works from Edge browser as expected.
Download fails in webbrowser control with following error
OPERATION PROGRESS STATUS
* [3/4/2022 3:58:28 PM] : Activation of C:\Users\Test4\AppData\Local\Microsoft\Windows\INetCache\IE\2XZDUQN2\TestClickonce[1].application has started.
* [3/4/2022 3:58:29 PM] : Processing of deployment manifest has successfully completed.
* [3/4/2022 3:58:29 PM] : Installation of the application has started.
ERROR DETAILS
Following errors were detected during this operation.
* [3/4/2022 3:58:29 PM] System.Deployment.Application.DeploymentDownloadException (Unknown subtype)
- Downloading file:///C:/Users/Test4/AppData/Local/Microsoft/Windows/INetCache/IE/2XZDUQN2/TestClickonce.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, X509Certificate2 clientCertificate)
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.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, Uri& deploymentUri)
at System.Deployment.Application.ApplicationActivator.PerformDeploymentActivationWithRetry(Uri activationUri, Boolean isShortcut, String textualSubId, String deploymentProviderUrlFromExtension, BrowserSettings browserSettings, String& errorPageUrl)
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Deployment.Application.ApplicationActivator.PerformDeploymentActivationWithRetry(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 file 'C:\Users\Test4\AppData\Local\Microsoft\Windows\INetCache\IE\2XZDUQN2\TestClickonce.exe.manifest'.
- Source: System
- Stack trace:
at System.Net.FileWebRequest.EndGetResponse(IAsyncResult asyncResult)
at System.Deployment.Application.SystemNetDownloader.DownloadSingleFile(DownloadQueueItem next)
--- Inner Exception ---
System.Net.WebException
- Could not find file 'C:\Users\Test4\AppData\Local\Microsoft\Windows\INetCache\IE\2XZDUQN2\TestClickonce.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.FileNotFoundException
- Could not find file 'C:\Users\Test4\AppData\Local\Microsoft\Windows\INetCache\IE\2XZDUQN2\TestClickonce.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.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)
COMPONENT STORE TRANSACTION DETAILS
No transaction information is available.

VB.Net Application Download did not succeed

I've encountered an error upon deploying a project for a few times. on my 18th revision of the project I noticed that it is not installing automatically after I opened my application. I tried to manually install it by running my system.application file but unfortunately I'm receiving a "Application Download did not succeed".
I've searched the web and did try some of the solution for this problem but none of them worked. I'm using VS2015 in coding this.
PLATFORM VERSION INFO
Windows : 10.0.17134.0 (Win32NT)
Common Language Runtime : 4.0.30319.42000
System.Deployment.dll : 4.7.3056.0 built by: NET472REL1
clr.dll : 4.7.3416.0 built by: NET472REL1LAST_B
dfdll.dll : 4.7.3056.0 built by: NET472REL1
dfshim.dll : 10.0.17134.1 (WinBuild.160101.0800)
SOURCES
Deployment url : file:///C:/KidsMonitoringSystem/Application%20Files/Kids%20Monitoring%20System_1_0_0_20/Kids%20Monitoring%20System.application
Deployment Provider url : file://users/Team%20Guilas/Desktop/Kids/Kids%20Monitoring%20System.application
ERROR SUMMARY
Below is a summary of the errors, details of these errors are listed later in the log.
* Activation of C:\KidsMonitoringSystem\Application Files\Kids Monitoring System_1_0_0_20\Kids Monitoring System.application resulted in exception. Following failure messages were detected:
+ Downloading file://users/Team Guilas/Desktop/Kids/Kids Monitoring System.application did not succeed.
+ The network path was not found.
+ The network path was not found.
+ The network path was not found.
COMPONENT STORE TRANSACTION FAILURE SUMMARY
No transaction error was detected.
WARNINGS
There were no warnings during this operation.
OPERATION PROGRESS STATUS
* [6/23/2019 12:50:20 AM] : Activation of C:\KidsMonitoringSystem\Application Files\Kids Monitoring System_1_0_0_20\Kids Monitoring System.application has started.
ERROR DETAILS
Following errors were detected during this operation.
* [6/23/2019 12:50:23 AM] System.Deployment.Application.DeploymentDownloadException (Unknown subtype)
- Downloading file://users/Team Guilas/Desktop/Kids/Kids Monitoring System.application 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, X509Certificate2 clientCertificate)
at System.Deployment.Application.DownloadManager.DownloadManifestAsRawFile(Uri& sourceUri, String targetPath, IDownloadNotification notification, DownloadOptions options, ServerInformation& serverInformation)
at System.Deployment.Application.DownloadManager.DownloadDeploymentManifestDirect(SubscriptionStore subStore, Uri& sourceUri, TempFile& tempFile, IDownloadNotification notification, DownloadOptions options, ServerInformation& serverInformation)
at System.Deployment.Application.DownloadManager.FollowDeploymentProviderUri(SubscriptionStore subStore, AssemblyManifest& deployment, Uri& sourceUri, TempFile& tempFile, IDownloadNotification notification, DownloadOptions options)
at System.Deployment.Application.DownloadManager.DownloadDeploymentManifestBypass(SubscriptionStore subStore, Uri& sourceUri, TempFile& tempFile, SubscriptionState& subState, IDownloadNotification notification, DownloadOptions options)
at System.Deployment.Application.ApplicationActivator.PerformDeploymentActivation(Uri activationUri, Boolean isShortcut, String textualSubId, String deploymentProviderUrlFromExtension, BrowserSettings browserSettings, String& errorPageUrl, Uri& deploymentUri)
at System.Deployment.Application.ApplicationActivator.PerformDeploymentActivationWithRetry(Uri activationUri, Boolean isShortcut, String textualSubId, String deploymentProviderUrlFromExtension, BrowserSettings browserSettings, String& errorPageUrl)
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Deployment.Application.ApplicationActivator.PerformDeploymentActivationWithRetry(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
- The network path was not found.
- Source: System
- Stack trace:
at System.Net.FileWebRequest.EndGetResponse(IAsyncResult asyncResult)
at System.Deployment.Application.SystemNetDownloader.DownloadSingleFile(DownloadQueueItem next)
--- Inner Exception ---
System.Net.WebException
- The network path was not found.
- 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.IOException
- The network path was not found.
- 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.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)
COMPONENT STORE TRANSACTION DETAILS
No transaction information is available.
The answer appears to be in the logged info you posted: your application is hosted on/published to a network location (smb file share?) and it has gone away:
Downloading file://users/Team Guilas/Desktop/Kids/Kids Monitoring System.application did not succeed.
The network path was not found.
Check your network connection, server availability, drive mappings etc and try again?

System.UnauthorizedAccessException: Access to the path 'C:\inetpub\wwwroot\website\imagecache\0f\ae1ea.jpg.tmp_4a1f20d7.tmp' is denied

Using imageresizer diskcache 4.2.5 and just recently started having a high frequency of this error. This is after doing a recent publish of new code to our site. We did not explicitly change anything to our knowledge related to imageresizer, so not sure if it is related to a new version, a web.config issue, etc.
We are using precompiled views in this MVC 5 web app.
Gist debug file
This has been working for years. It looks like we updgraded the nuget package of this from 3.4.3 to 4.2.5 a couple of months ago.
When navigating to the image directly, no error is thrown. The funny thing to me is this .tmp naming convention of the file trying to be accessed.
The path of the image is is trying to retrieve from the Elmah error log is: C:\inetpub\wwwroot\website\Images\no_image.jpg?maxwidth=420&maxheight=420
Stacktrace:
System.UnauthorizedAccessException: Access to the path 'C:\inetpub\wwwroot\website\imagecache\0f\ae1ea13d9acc62f74c3da0f38e1b85328c07effdd1afce83d91b44f244a602f3.jpg.tmp_4a1f20d7.tmp' is denied.
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)
at ImageResizer.Plugins.DiskCache.CustomDiskCache.<>c__DisplayClass29_0.<TryWriteFile>b__0()
at ImageResizer.Plugins.DiskCache.LockProvider.TryExecute(String key, Int32 timeoutMs, LockCallback success)
at ImageResizer.Plugins.DiskCache.CustomDiskCache.GetCachedFile(String keyBasis, String extension, ResizeImageDelegate writeCallback, Int32 timeoutMs, Boolean asynchronous)
at ImageResizer.Plugins.DiskCache.DiskCache.Process(IResponseArgs e)
at ImageResizer.Plugins.DiskCache.DiskCache.Process(HttpContext context, IResponseArgs e)
at ImageResizer.InterceptModule.HandleRequest(HttpContext context, HttpModuleRequestAssistant ra, IVirtualFile vf)
at ImageResizer.InterceptModule.CheckRequest_PostAuthorizeRequest(Object sender, EventArgs e)
at System.Web.HttpApplication.SyncEventExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute()
at System.Web.HttpApplication.<>c__DisplayClass285_0.<ExecuteStepImpl>b__0()
at System.Web.HttpApplication.ExecuteStepImpl(IExecutionStep step)
at System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously)
This means that the app does not have write permission to the folder. A temp name is used to prevent it from being served while writing.

Getting Error while loading the project in the NUnit

I'm trying the load the project in the NUnit GUI. But I'm getting an error
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)
at System.IO.File.Open(String path, FileMode mode, FileAccess access, FileShare share)
at WellsFargo.Tridion.NUnit.DailyMonitoringTesting.TestDataFactory.GetInputData(String NodeName) in C:\Users\u382343\Desktop\PQC Patching Project\source\WellsFargo.Tridion.NUnit.DailyMonitoringTesting\Common\TestDataFactory.cs:line 153
at WellsFargo.Tridion.NUnit.DailyMonitoringTesting.TestDataFactory.<get_F5Url>d__0.MoveNext() in C:\Users\u382343\Desktop\PQC Patching Project\source\WellsFargo.Tridion.NUnit.DailyMonitoringTesting\Common\TestDataFactory.cs:line 21
at NUnit.Core.Builders.TestCaseSourceProvider.GetTestCasesFor(MethodInfo method, Test parentSuite)
at NUnit.Core.Extensibility.TestCaseProviders.GetTestCasesFor(MethodInfo method, Test suite)
Can anyone tell me what's this error about?
If all the required/dependent dlls are not properly copied to release folder you are trying to load the NUnit GUI, this error will be thrown.
Please refer: Why am I getting a FileNotFound exception when referencing another project from the same solution?

SYNC FRAMEWORK-Batching

I am able to synchronize two remote databases using sync framework 2.1 over WCF(N-Tier) .
To improve performance while transferring large data, I implemented Batching.
But I am facing below error message:
An unexpected error occurred when applying batch file 1e1855e6-0b9a-4332-9fdb-07a25bc1bd49.batch. See the inner exception for more details.
This is happening only with last batch file. When applying last batch file in the set of batch files the code is terminating with above error message.
Below I am pasting xml format of webservice log (inner exception):
<InnerException>
<ExceptionType>System.IO.FileNotFoundException, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</ExceptionType>
<Message>Could not find file 'c:\windows\system32\inetsrv\1e1855e6-0b9a-4332-9fdb-07a25bc1bd49.batch'.</Message>
<StackTrace>
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)
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)
at Microsoft.Synchronization.Data.DbSyncBatchInfoFactory.Deserialize(String batchFileName, Boolean deserializeData)
at Microsoft.Synchronization.Data.DbSyncBatchConsumer.ReadBatchFile(UInt32 lookupLocation, UInt32 expectedNumber)
at Microsoft.Synchronization.Data.DbSyncBatchConsumer.ReadBatchFile(UInt32 expectedNumber, String& batchFileName)
at Microsoft.Synchronization.Data.DbSyncBatchConsumer.ApplyBatches(DbSyncScopeMetadata scopeMetadata, DbSyncSession syncSession, SyncSessionStatistics sessionStatistics)
</StackTrace>
<ExceptionString>System.IO.FileNotFoundException: Could not find file 'c:\windows\system32\inetsrv\1e1855e6-0b9a-4332-9fdb-07a25bc1bd49.batch'.
File name: 'c:\windows\system32\inetsrv\1e1855e6-0b9a-4332-9fdb-07a25bc1bd49.batch'
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)
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)
at Microsoft.Synchronization.Data.DbSyncBatchInfoFactory.Deserialize(String batchFileName, Boolean deserializeData)
at Microsoft.Synchronization.Data.DbSyncBatchConsumer.ReadBatchFile(UInt32 lookupLocation, UInt32 expectedNumber)
at Microsoft.Synchronization.Data.DbSyncBatchConsumer.ReadBatchFile(UInt32 expectedNumber, String& batchFileName)
at Microsoft.Synchronization.Data.DbSyncBatchConsumer.ApplyBatches(DbSyncScopeMetadata scopeMetadata, DbSyncSession syncSession, SyncSessionStatistics sessionStatistics)
</ExceptionString>
</InnerException>
Your help and suggestions are very much appreciated!!
Thank you in advance friends!!
try moving out your batching directory outside of IIS folder.