Windows Develop Bookmark and Share   
 index > ClickOnce and Setup & Deployment Projects > Access Denied Launch Error
 

Access Denied Launch Error

I have been having this issue with some of the computers I am trying to deploy an application to with ClickOnce. The install works just fine until it actually tries to launch the application. Then it gives me an error. There is no evidence that the application was installed after this error. The error only happens on some of the computers. Any help would be really great. Here is the error:

PLATFORM VERSION INFO
Windows : 5.1.2600.196608 (Win32NT)
Common Language Runtime : 2.0.50727.3082
System.Deployment.dll : 2.0.50727.3053 (netfxsp.050727-3000)
mscorwks.dll : 2.0.50727.3082 (QFE.050727-3000)
dfdll.dll : 2.0.50727.3053 (netfxsp.050727-3000)
dfshim.dll : 2.0.50727.3053 (netfxsp.050727-3000)

SOURCES
Deployment url: file://064-fs01/gpapps$/ArchiveSearch/ArchiveSearch.application
Deployment Provider url: file://fdc-sql/ArchiveSearchPublish/ArchiveSearch.application
Application url: file://fdc-sql/ArchiveSearchPublish/Application%20Files/ArchiveSearch_1_0_2_8/ArchiveSearch.exe.manifest

IDENTITIES
Deployment Identity: ArchiveSearch.application, Version=1.0.2.8, Culture=en, PublicKeyToken=e547c24bc131693f, processorArchitecture=msil
Application Identity: ArchiveSearch.exe, Version=1.0.2.8, Culture=en, PublicKeyToken=e547c24bc131693f, processorArchitecture=msil, type=win32

APPLICATION SUMMARY
* Installable application.

ERROR SUMMARY
Below is a summary of the errors, details of these errors are listed later in the log.
* Activation of \\064-fs01\gpapps$\ArchiveSearch\ArchiveSearch.application resulted in exception. Following failure messages were detected:
+ Access to the path 'c:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Archive Search.appref-ms' is denied.

COMPONENT STORE TRANSACTION FAILURE SUMMARY
No transaction error was detected.

WARNINGS
There were no warnings during this operation.

OPERATION PROGRESS STATUS
* [8/17/2009 9:08:47 AM] : Activation of \\064-fs01\gpapps$\ArchiveSearch\ArchiveSearch.application has started.
* [8/17/2009 9:08:59 AM] : Processing of deployment manifest has successfully completed.
* [8/17/2009 9:08:59 AM] : Installation of the application has started.
* [8/17/2009 9:09:00 AM] : Processing of application manifest has successfully completed.
* [8/17/2009 9:09:01 AM] : Request of trust and detection of platform is complete.
* [8/17/2009 9:09:01 AM] : Commit of the downloaded application has started.

ERROR DETAILS
Following errors were detected during this operation.
* [8/17/2009 9:09:03 AM] System.UnauthorizedAccessException
- Access to the path 'c:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Archive Search.appref-ms' 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)
at System.IO.FileStream..ctor(String path, FileMode mode, FileAccess access, FileShare share, Int32 bufferSize, FileOptions options)
at System.IO.StreamWriter.CreateFile(String path, Boolean append)
at System.IO.StreamWriter..ctor(String path, Boolean append, Encoding encoding, Int32 bufferSize)
at System.IO.StreamWriter..ctor(String path, Boolean append, Encoding encoding)
at System.Deployment.Application.ShellExposure.GenerateAppShortcut(SubscriptionState subState, ShellExposureInformation shellExposureInformation)
at System.Deployment.Application.ShellExposure.UpdateShortcuts(SubscriptionState subState, ShellExposureInformation& shellExposureInformation)
at System.Deployment.Application.ShellExposure.UpdateSubscriptionShellExposure(SubscriptionState subState)
at System.Deployment.Application.SubscriptionStore.CommitApplication(SubscriptionState& subState, CommitApplicationParams commitParams)
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)

COMPONENT STORE TRANSACTION DETAILS
* Transaction at [8/17/2009 9:09:02 AM]
+ System.Deployment.Internal.Isolation.StoreOperationStageComponent
- Status: Installed
- HRESULT: 0x0
- Manifest: W96GKNL1.WVC.application
+ System.Deployment.Internal.Isolation.StoreOperationSetDeploymentMetadata
- Status: Set
- HRESULT: 0x0
+ System.Deployment.Internal.Isolation.StoreOperationSetDeploymentMetadata
- Status: Set
- HRESULT: 0x0
+ System.Deployment.Internal.Isolation.StoreTransactionOperationType (27)
- HRESULT: 0x0

I appreciate any help. I am trying to get my application deployed this week.

Ryan Haack  Monday, August 17, 2009 5:30 PM
Well your root error is this line:

Access to the path 'c:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Archive Search.appref-ms' is denied

Most likely a permissions issue for the current windows profile. Which would also explain why its only happening on some machine/logins.


If this answers your question, please mark the question as answered.
BigTuna99  Monday, August 17, 2009 7:29 PM

When I use a login thatdoesn't work on a different computer itwill work, which would normally sugges that it is the computer.However, when I use a different login on that computer it works. It seems to be a result of the combination of certain logins and computers. Do i just need to delete the profile (C:\Documents And Settings\[USER])on the computer, and let it reload everything?

Ryan Haack  Monday, August 17, 2009 7:39 PM
I think the question is why is it looking for "active search.appref-ms" in the .Net Framework folder?

I assume "active search" is the name of your application? This is what is in the Product Name field in the deployment properties?

Are you publishing to a web server, a network share, or what? Can you provide an example of what your installation and publishing file location fields look like?

Also, does the user have admin rights -- you're not running under a Guest account, right?

And I'm assuming the application is both online and offline, not online-only, true?

RobinDotNet
Click here to visit my ClickOnce blog!
RobinDotNet  Tuesday, August 18, 2009 7:15 AM

Thank you for your response. I really appreciate your help.

It does seem odd that it is looking for an appref file in the .net folder. Shouldn't it only be creating apprefs in the all programs folder and on the desktop? Do you know of any setting that would cause this to happen?

Archive Search is the name of the application and is what is contained in the Prodcut Name field. I am publishing to a server on our intranet.

The location of the installer is like \\[server name]\gpapps$\ArchiveSearch\. I have done the install from various locations, including locally on the user’s computer, and each try produces the same error.

The user does not have admin rights, however, I have successfully installed the program on other computers withusers that do not have admin rights. I am not running the install on a guest account.

The application is both online and offline.

What is strange about the problem I am having is I cannot figure out how to reproduce the error. The error seems to be specific to only certain user-computer combinations. It appears that either the duration a user profile has been in use on a computer or the creation date of that profile corresponds to the error. This does not necessarily indicate causality, however.

Thank you very much for you help, RobinDotNet. I really appreciate your time. Ill look through my publish settings again and try to figure out what would cause the deployment to try to put the appref in the .net folder.

-Ryan

Ryan Haack  Tuesday, August 18, 2009 2:47 PM
I would bet you a dollar that the $ symbol is causing you a problem here. I know you can't use an ampersand in a path to a ClickOnce deployment. Can you somehow change that and see if it fixes the problem?

Also, does the appref-ms file actually appear in the .net folder? Or is it just looking for it there?

RobinDotNet
Click here to visit my ClickOnce blog!
RobinDotNet  Tuesday, August 18, 2009 5:45 PM

I don't think it is the $ symbol since I have had the same problem with various publish locations. I would also like to (and dont have a choice but to) leave the $ symbol since it is what makes the folder a hidden share. My SA required it.

The appref-ms file does appear if the installation is successfull (ie no application start error), however it does not appear if the application does not install successfully.

Ryan

Ryan Haack  Tuesday, August 18, 2009 6:21 PM
I have decided to use a method other than clickonce for my deployment since I have time contstraints, however, I am still interested in figuring out why it was not working (because I am a nerd).
Ryan Haack  Tuesday, August 18, 2009 10:46 PM

You can use google to search for other answers

Custom Search

More Threads

• Use and deployment of a custom application framework
• How to deply clickonce with netmodule file
• .NET framework installation detection
• winform is not loading in IE
• Newbie with deployment projects, having a problem with VB2005
• to get clickonce functionality in vs 2003 setup
• Change default icon on the application's exe file??
• Guidelines for ensuring success with ClickOnce
• ClickOnce - Internet zone
• FileNotFoundException on reference assembly after deployment