Windows Develop Bookmark and Share   
 index > ClickOnce and Setup & Deployment Projects > UnauthorizedAccessException
 

UnauthorizedAccessException

Hi all,

Im getting a UnauthorizedAccessException when deploying a newer version of an app I have previously deployed successfully.

Have tried removing all traces of the App and re-installing, same deal.

The app is actually successfully installed and I am able to run it by using the actual exe, just not sure why the appref-ms is being installed to the framework\v2.0....... directory instead of the start menu Any ideas?

Cheers

__________________________________________________________________


Cleaned Up Deployment Log (* = Removed Info):


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

SOURCES
Deployment url : http://*/*.Client.application
Server : Microsoft-IIS/6.0
X-Powered-By : ASP.NET
Deployment Provider url : http://*/*.Client.application
Application url : http://*/Application%20Files/*.Client_1_0_0_16/*.Client.exe.manifest
Server : Microsoft-IIS/6.0
X-Powered-By : ASP.NET

IDENTITIES
Deployment Identity : *.Client.application, Version=1.0.0.16, Culture=neutral, PublicKeyToken=f08f1f6e8f3f83f3, processorArchitecture=msil
Application Identity : *.Client.exe, Version=1.0.0.16, Culture=neutral, PublicKeyToken=f08f1f6e8f3f83f3, 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 http://*/*.Client.application resulted in exception. Following failure messages were detected:
+ Access to the path 'c:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\* Client.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
* [11/02/2009 14:37:18] : Activation of http://*/*.Client.application has started.
* [11/02/2009 14:37:19] : Processing of deployment manifest has successfully completed.
* [11/02/2009 14:37:19] : Installation of the application has started.
* [11/02/2009 14:37:20] : Processing of application manifest has successfully completed.
* [11/02/2009 14:37:21] : Request of trust and detection of platform is complete.
* [11/02/2009 14:45:50] : Downloading of subscription dependencies is complete.
* [11/02/2009 14:45:50] : Commit of the downloaded application has started.

ERROR DETAILS
Following errors were detected during this operation.
* [11/02/2009 14:45:52] System.UnauthorizedAccessException
- Access to the path 'c:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\* Client.appref-ms' is denied.
- Source: mscorlib
Patrick Dobbs  Wednesday, February 11, 2009 3:06 PM

Hi Patrick,

> The app is actually successfully installed and I am able to run it by using the actual exe,

Do you see the shortcut for the ClickOnce application in the start menu?

> just not sure why the appref-ms is being installed to the framework\v2.0....... directory instead of the start menu

I'm not sure the reason of this problem. Perhaps the current user's profile is corrupted. You may have a try deleting the current user's profile, e.g. c:\users\username or c:\documents and settings\username.

Hope this helps.

Sincerely,
Linda Liu

Linda Liu  Monday, February 16, 2009 7:32 AM
If you don't want to remove the entire profile, try deleting the Apps\2.0 folder first. This seems to fix a multitude of problems like this, with no explanation whatsoever aside from cleaning it out.

Vista: C:\Users\username\AppData\Local\Apps\2.0
XP: C:\Documents and Settings\username\Local Settings\Apps\2.0\

RobinS.
GoldMail.com
Ts'i mahnu uterna ot twan ot geifur hingts uto.
RobinDotNet  Tuesday, February 17, 2009 7:06 PM

Patrick, did you ever resolve this issue? I am having the same issue. I tried deleting the Apps\2.0 directory and it did not work. I have not tried deleting the user's profile as I am a bit nervous to do so. Will deleting the user's profile potentially cause more trouble than it is worth?

Thanks,
Ryan

Ryan Haack  Monday, August 17, 2009 3:44 PM

There are solutions proposed in your other thread.

RobinDotNet


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

You can use google to search for other answers

Custom Search

More Threads

• Clickonce and prerequisites configuration
• Visual Studio enhancement request for publishing ClickOnce
• problem installing 32 bit application on 64 bit Windows 7
• Run Custom Action as Trusted Installer
• Looking for the best way to distribute my application with the .Net Framework over the Web
• help with deployment - mshtml.dll
• ClickOnce Updates?
• Uninstall previous version
• two click once profiles
• Setup project not deploying to correct registry path