If you are deploy your application using click one some time you got "Application Deployment Error the application can not be deployed. Contract the application publisher for assistance."
There are several reason can happen so that the application can't deploy in client machine. I'm found few cases like
Reason 1.
Some time if Internet explorer(IE) crash the presentationhost.exe will not be close and it lock the files it use. then next time another presentationhost can't access necessary file for boot the xbap application. if you are view the log by clicking on "Open Error Log" you will may find following error details
PLATFORM VERSION INFO
Windows : 5.1.2600.131072 (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)
dfshim.dll : 2.0.50727.3053 (netfxsp.050727-3000)
SOURCES
Deployment url : http://..../Home.xbap
Application url : http://..../Application%20Files/Home_1_0_0_422/Home.exe.manifest
IDENTITIES
Deployment Identity : Home.xbap, Version=1.0.0.422, Culture=en, PublicKeyToken=ca9bbb2917ceb712, processorArchitecture=msil
Application Identity : Home.exe, Version=1.0.0.422, Culture=en, PublicKeyToken=ca9bbb2917ceb712, processorArchitecture=msil, type=win32
APPLICATION SUMMARY
* Online only application.
* Trust url parameter is set. * Browser-hosted application.
ERROR SUMMARY
Below is a summary of the errors, details of these errors are listed later in the log.
* An exception occurred while downloading the application. Following failure messages were detected:
+ Exception occurred during store operation.
+ The process cannot access the file because it is being used by another process. (Exception from HRESULT: 0x80070020) lab lab la e huge log description........
To solve this error find out why the presentationhost.exe not die after you kill the IE(Internet explorer) is there any code you write on you application exit that got faulted or do you capture any resource that's not release for any reason. primarily you can kill presentationhost.exe by forced (manually). then try again you application it should deploy now.
Reason 2.
Another deployment error can be occur if you publish same application in several domain like http://lallabla.com and http://habhabla.com and by mistake you forgot to update build number while you publish. it may be also true for same domain also like your already install latest build and now you publish a new build with same build number with different assembly.
This type deployment error can solve easily by increasing build number and publishing again. And good practices is check "Automatically increment revision with each publish" from you project property. and never build with a disconnected solution from source safe or any other version control you use.
Reason 3.
TrustNotGrantedException comes if you deploy your application with full trust but client not have enough privilege to grant you required permission. Check my another post (How to run wpf/xbap in full trust mode ) about this issue
PLATFORM VERSION INFO
Windows : 5.1.2600.131072 (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)
dfshim.dll : 2.0.50727.3053 (netfxsp.050727-3000)
SOURCES
Deployment url : http://.../home.xbap
Application url : http://./Home_1_0_0_445/Home.exe.manifest
IDENTITIES
Deployment Identity : Home.xbap, Version=1.0.0.445, Culture=en, PublicKeyToken=ca9bbb2917ceb712, processorArchitecture=msil
Application Identity : Home.exe, Version=1.0.0.445, Culture=en, PublicKeyToken=ca9bbb2917ceb712, processorArchitecture=msil, type=win32
APPLICATION SUMMARY
* Online only application.
* Trust url parameter is set. * Browser-hosted application.
ERROR SUMMARY
Below is a summary of the errors, details of these errors are listed later in the log.
* An exception occurred while determining trust. Following failure messages were detected:
+ User has refused to grant required permissions to the application.
COMPONENT STORE TRANSACTION FAILURE SUMMARY
No transaction error was detected.
WARNINGS
There were no warnings during this operation.
OPERATION PROGRESS STATUS
No phase information is available.
ERROR DETAILS
Following errors were detected during this operation.
* [11/23/2008 5:32:54 PM] System.Deployment.Application.TrustNotGrantedException (Unknown subtype)
- User has refused to grant required permissions to the application.
- Source: System.Deployment
- Stack trace:
at System.Deployment.Application.ApplicationTrust.RequestTrust(SubscriptionState subState, Boolean isShellVisible, Boolean isUpdate, ActivationContext actCtx, TrustManagerContext tmc)
at System.Deployment.Application.DeploymentManager.DetermineTrustCore(Boolean blocking, TrustParams tp)
COMPONENT STORE TRANSACTION DETAILS
No transaction information is available.
Reason 4.
More critical one is if your client use Authentication proxy to get his Internet connection. You may fall on 407 error
PLATFORM VERSION INFO
Windows : 5.1.2600.131072 (Win32NT)
Common Language Runtime : 2.0.50727.42
System.Deployment.dll : 2.0.50727.42 (RTM.050727-4200)
mscorwks.dll : 2.0.50727.42 (RTM.050727-4200)
dfshim.dll : 2.0.50727.42 (RTM.050727-4200)
SOURCES
Deployment url : http://..../home.xbap
ERROR SUMMARY
Below is a summary of the errors, details of these errors are listed later in the log.
* An exception occurred while downloading the manifest. Following failure messages were detected:
+ Downloading http://.../Home.xbap did not succeed.
+ The remote server returned an error: (407) Proxy Authentication Required.
Check out this thread
http://social.msdn.microsoft.com/Forums/en-US/wpf/thread/d6b018bf-df4c-4cf8-90db-98e502d619e6/
http://geekswithblogs.net/mrnat/archive/2007/09/16/115405.aspx
I can't solve it yet let you know when I can do it.
hope it will solve by using
<configuration>
. . .
<system.net>
<defaultProxy enabled="true" useDefaultCredentials="true"/>
</system.net>
</configuration>
good luck...
Tips
Worse way to solve deployment error is deleting previous application file from user cache. normally click once deployed file will cache here
root...:\Documents and Settings\..user..\Local Settings\Apps
you can clean it by manually or using mage tools come with .net framework sdk.Go vs command prompt and type "mage -cc" this will clear your previous cache.
Another tips is if deployment fail the error window comes with a support link.
You can configure this link from you application property window>>options
then set your Support Url.
hope this helps.
0 comments:
Post a Comment