Excel add-in fails upon installation with 'Access denied' error

Add-in Express™ Support Service
That's what is more important than anything else

Excel add-in fails upon installation with 'Access denied' error
Excel add-in fails upon installation with 'Access denied' error 
Daniel Levite




Posts: 5
Joined: 2014-08-05
My first attempt to use add-in express resulted in a solution that would publish fine.
However, when I tried to install it on a client machine(Windows 7), I would get a failure on the publish location because it would say access denied.
This was a ClickOnce deployment. It was odd because the prerequisites in the setup.exe would be recognized and they launched from the vendor's sites as expected. However, the rest of the installation failed because of 'access denied' on the publish url even though the setup.exe had just ran from that location enough to test and launch the prerequisites.
So thinking the add-in subfolder might have some restrictions I gave full control to everyone for all objects and subfolders in the publish location.
This is a file or unc publish location and not IIS.
I made the share, the directory and the drive of the server from which I was installing with full control permissions for everyone with the same result, and same error.
I setup the publish url to a second server, published to that location, with the same result and same error on installation.
I setup a VSTO addin and tried installing it from the same subfolder on the same server with absolutely no problem. It installed and ran fine.
I searched developer's manual, this forum and the internet with no clue as to what might be going on.
It is the most current version of add-in express for .NET and while I had high hopes, the complexity of deployment and installation is giving me pause as to whether this is really a viable solution.
The client machine is Windows 7. The add-in is an Excel add-in.
Also, since I am using Visual Studio 2012, without additional software purchases, I am unable to use anything other than clickonce deployment it seems.
Posted 05 Aug, 2014 06:25:38 Top
Andrei Smolin


Add-in Express team


Posts: 19175
Joined: 2006-05-11
Hello Daniel,

Installing a COM add-in via ClickOnce requires FullTrust permissions. Could you please check if you can deploy a test Windows Forms app to that folder? Please make sure that you select Enable ClickOnce Security Settings and choose "This is a full trust application" in the test appplications's properties.


Andrei Smolin
Add-in Express Team Leader
Posted 05 Aug, 2014 08:00:32 Top
Daniel Levite




Posts: 5
Joined: 2014-08-05
No Joy. Here is what I did:
1) Create a simple hello world windows form application
2) Set Properties|Security|Click Once to full trust
3) published locally using the same installation url as the addin
4) copied the publish package (setup, application subfolder...etc) to the same share on the server from which I tried to install the addin \
5) using the windows 7 client navigated to the share and ran the windows app
6) it showed the clickonce progress dialog and came up without a hitch.

Then I tried the addin again, from the same share on the same server as I ran the windows form app above.
It displays the clickonce progress bar and then stops with the following details. Note I use the same login (administrator) on the same client workstation (Windows 7) each time.
PLATFORM VERSION INFO
Windows : 6.1.7601.65536 (Win32NT)
Common Language Runtime : 4.0.30319.18444
System.Deployment.dll : 4.0.30319.18408 built by: FX451RTMGREL
clr.dll : 4.0.30319.18444 built by: FX451RTMGDR
dfdll.dll : 4.0.30319.18408 built by: FX451RTMGREL
dfshim.dll : 4.0.41209.0 (Main.041209-0000)

SOURCES
Deployment url : file://halsql/Share/NewHalAddin/newhaladdin.application
Deployment Provider url : file://halsql/Share/NewHalAddin

ERROR SUMMARY
Below is a summary of the errors, details of these errors are listed later in the log.
* Activation of \\HALSQL\Share\NewHalAddin\newhaladdin.application resulted in exception. Following failure messages were detected:
+ Downloading file://halsql/Share/NewHalAddin did not succeed.
+ Access to the path '\\halsql\Share\NewHalAddin' is denied.
+ Access to the path '\\halsql\Share\NewHalAddin' is denied.
+ Access to the path '\\halsql\Share\NewHalAddin' is denied.

COMPONENT STORE TRANSACTION FAILURE SUMMARY
No transaction error was detected.

WARNINGS
There were no warnings during this operation.

OPERATION PROGRESS STATUS
* [8/5/2014 11:19:14 AM] : Activation of \\HALSQL\Share\NewHalAddin\newhaladdin.application has started.

ERROR DETAILS
Following errors were detected during this operation.
* [8/5/2014 11:19:14 AM] System.Deployment.Application.DeploymentDownloadException (Unknown subtype)
- Downloading file://halsql/Share/NewHalAddin 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.DownloadManifest(Uri& sourceUri, String targetPath, IDownloadNotification notification, DownloadOptions options, ManifestType manifestType, 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)
at System.Deployment.Application.ApplicationActivator.ActivateDeploymentWorker(Object state)
--- Inner Exception ---
System.Net.WebException
- Access to the path '\\halsql\Share\NewHalAddin' is denied.
- 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
- Access to the path '\\halsql\Share\NewHalAddin' is denied.
- 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.UnauthorizedAccessException
- Access to the path '\\halsql\Share\NewHalAddin' is denied.
- 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)

COMPONENT STORE TRANSACTION DETAILS
No transaction information is available.
Posted 05 Aug, 2014 10:30:08 Top
Daniel Levite




Posts: 5
Joined: 2014-08-05
Just noticed something in the error listed above.
SOURCES
Deployment url : file://halsql/Share/NewHalAddin/newhaladdin.application
Deployment Provider url : file://halsql/Share/NewHalAddin


Why would the deployment url resolve to <addin>.application instead of <addin>.vsto? Could that be the problem?
Posted 05 Aug, 2014 13:27:11 Top
Andrei Smolin


Add-in Express team


Posts: 19175
Joined: 2006-05-11
Hello Daniel,

Daniel Levite writes:
Why would the deployment url resolve to <addin>.application instead of <addin>.vsto? Could that be the problem?


No problem with this. You deploy an Add-in Express based add-in, not a VSTO add-in. In fact, you deploy an application that registers/unregisters your add-in.

I've tried installing a COM add-in published to a network folder \\{server name}\{path}. It works for me with this value in the Provider URL field:
file://\\{server name}\{path}\myaddin229.application

If this doesn't help, please archive the complete project folder and send it to me. You can find the support email address in {Add-in Express installation folder}\readme.txt. Please make sure your email contains a link to this topic.


Andrei Smolin
Add-in Express Team Leader
Posted 06 Aug, 2014 10:17:22 Top
Daniel Levite




Posts: 5
Joined: 2014-08-05
Do I understand you correctly? You put file://\\{server name}\{path}\myaddin229.application
in the Provider Url?

I was using the various examples and put in \\halsql\share\myaddin\

Should I put it in exactly like this (file://\\halsql\share\myaddin\newhaladdin.application)? Could that be the problem?
Posted 06 Aug, 2014 13:36:44 Top
Daniel Levite




Posts: 5
Joined: 2014-08-05
Wonderful, good news.
I solved the problem.
I was using the wrong format for the Provider URL.
Having developed VSTO apps for 10 years, I was used to putting the publishing and installation location as a UNC folder, NOT a filespec like the Provider URL requires.
Once I put in the fully qualified file path for \\<server>\<share path>\<My addin>.application
it worked.
I wish the message being display was NOT 'access denied', but 'file not found' or something meaningful.
That's for the clue that put me on the right track of what I was doing wrong.
Posted 06 Aug, 2014 21:38:29 Top
Andrei Smolin


Add-in Express team


Posts: 19175
Joined: 2006-05-11
Daniel,

Thank you for letting me know. As to the message, it is misleading. I suppose they cannot distinguish these scenarios for some reason.


Andrei Smolin
Add-in Express Team Leader
Posted 07 Aug, 2014 01:07:16 Top