ClickOnce应用程序不会安装在我的计算机上,但由于缺少权限而在其他计算机上安装 [英] ClickOnce app does not install on my computer but does on others because of lack of privileges
问题描述
我用VisualStudio Express创建了一个应用程序。我可以将它安装在其他计算机上,但不能安装在我的计算机上。
I have created an application with VisualStudio Express. I can install it on other computer but not on mine.
我收到消息:无法启动应用程序。联系应用程序供应商。
I get the message: Application cannot be started. Contact the application vendor.
我不记得设置已更改,但可能会有所改变。 它已经工作了一个月,突然它不再起作用了。我希望有人知道如何解决这个问题。
I cannot remember settings changed however it might be possible. It has worked during a month and suddenly it does not work anymore. I hope somebody knows how I can fix this.
顺便说一下我已经尝试过或者注意到了:
Btw I have tried or noticed:
- 删除缓存
- 在调试和发布模式下从Visual Studio运行时应用程序正常工作
- the application works when running from Visual studio in debug and release mode
- 从bin目录启动时应用程序工作(双击)
- the application works when starting from the bin directory (double clicking)
- 双击设置(完成生成的文件夹中的clickonce生成的文件) 即使以管理员身份运行,我也会收到错误。
- when double clicking setup (the clickonce generated file in the complete generated folder) I get the error, even when run as administrator.
完整的日志是:
PLATFORM VERSION INFO
Windows :6.1.7601.65536(Win32NT)
公共语言运行时 :4.0.30319.235
System.Deployment.dll :4.0.30319.1(RTMRel.030319-0100)>
clr.dll :4.0.30319.235(RTMGDR.030319-2300)
dfdll.dll :4.0.30319.1 (RTMRel.030319-0100)
dfshim.dll :4.0.31106.0(Main.031106-0000)
PLATFORM VERSION INFO
Windows : 6.1.7601.65536 (Win32NT)
Common Language Runtime : 4.0.30319.235
System.Deployment.dll : 4.0.30319.1 (RTMRel.030319-0100)
clr.dll : 4.0.30319.235 (RTMGDR.030319-2300)
dfdll.dll : 4.0.30319.1 (RTMRel.030319-0100)
dfshim.dll : 4.0.31106.0 (Main.031106-0000)
来源
部署网址 :
file:/// D:/PcgTools%20Publish2/PcgTools.application
应用程序网址 :
file:/// D:/PcgTools%20Publish2/Application%20Files/PcgTools_0_2_0_74/PcgTools.exe .manifest
IDENTITIES
IDENTITIES
应用程序摘要
*可安装的应用程序。
APPLICATION SUMMARY
* Installable application.
错误摘要
以下是错误摘要,这些错误的详细信息将在日志后面列出。
* Activati在D:\ PcgTools Publish2 \PcgTools.application导致异常。检测到以下失败消息:
+指定演员表无效。
ERROR SUMMARY
Below is a summary of the errors, details of these errors are listed later in the log.
* Activation of D:\PcgTools Publish2\PcgTools.application resulted in exception. Following failure messages were detected:
+ Specified cast is not valid.
COMPONENT STORE TRANSACTION FAILURE SUMMARY
  ;未检测到交易错误。
COMPONENT STORE TRANSACTION FAILURE SUMMARY
No transaction error was detected.
警告
此操作期间没有警告。
WARNINGS
There were no warnings during this operation.
操作进度状态
* [4-9-2011 1:42:03]:激活D:\PcgTools Publish2 \PcgTools.application已经开始。
  ; * [4-9-2011 1:42:03]:部署清单处理已成功完成。
* [4-9-2011 1:42:03]:安装申请已经开始。
OPERATION PROGRESS STATUS
* [4-9-2011 1:42:03] : Activation of D:\PcgTools Publish2\PcgTools.application has started.
* [4-9-2011 1:42:03] : Processing of deployment manifest has successfully completed.
* [4-9-2011 1:42:03] : Installation of the application has started.
错误详情
在此操作过程中检测到以下错误。
* [4-9 -2011 1:42:03] System.InvalidCastException
- 指定的演员表无效。
- 来源:System.Deployment
- 堆栈跟踪:
在System.Deployment.Application.DownloadMana ger.VerifyRequestedPrivilegesSupport(String requestedExecutionLevel)
at System.Deployment.Application.DownloadManager.DownloadApplicationManifest(AssemblyManifest deploymentManifest,String targetDir,Uri deploymentUri,IDownloadNotification notification,DownloadOptions options,Uri& appSourceUri,String&
appManifestPath)
在System.Deployment.Application.DownloadManager.DownloadApplicationManifest(AssemblyManifest deploymentManifest,String targetDir,Uri deploymentUri,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)
at System.Deployment.Application.ApplicationActivator.ActivateDepl oymentWorker(对象状态)
ERROR DETAILS
Following errors were detected during this operation.
* [4-9-2011 1:42:03] System.InvalidCastException
- Specified cast is not valid.
- Source: System.Deployment
- Stack trace:
at System.Deployment.Application.DownloadManager.VerifyRequestedPrivilegesSupport(String requestedExecutionLevel)
at System.Deployment.Application.DownloadManager.DownloadApplicationManifest(AssemblyManifest deploymentManifest, String targetDir, Uri deploymentUri, IDownloadNotification notification, DownloadOptions options, Uri& appSourceUri, String&
appManifestPath)
at System.Deployment.Application.DownloadManager.DownloadApplicationManifest(AssemblyManifest deploymentManifest, String targetDir, Uri deploymentUri, 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)
at System.Deployment.Application.ApplicationActivator.ActivateDeploymentWorker(Object state)
COMPONENT STORE TRANSACTION DETAILS
没有可用的交易信息。
COMPONENT STORE TRANSACTION DETAILS
No transaction information is available.
推荐答案
Hi Michel,
Hi Michel,
我没有发现任何地方会导致强制转换异常,我只发现了来自VerifyRequestedPrivilegesSupport方法的异常抛出,它由以下原因引起:
I have not found any place would caused the cast exception, I only found the exception throw from the VerifyRequestedPrivilegesSupport method, it caused by:
HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\Policies\System
HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\Policies\System
EnableLUA为1,但您还设置了requireAdministrator或  ; * .exe.manifest中的highestAvailable。
EnableLUA is 1, but you also set the requireAdministrator or highestAvailable in the *.exe.manifest.
这是我的分析。
如果问题也无法解决,可以共享Visual Studio吗?解决方案包给我,我想在这个Visual Studio解决方案中查看你的配置(它将包括ClickOnce发布配置)。
If the problem also cannot solved, can you share the Visual Studio Solution package to me, I would like to have a look at yours configurations in this Visual Studio Solution(it will be including the ClickOnce publish configurations).
如果有'如有任何疑虑,请随时告诉我。
If there's any concern, please feel free to let me know.
祝福,
这篇关于ClickOnce应用程序不会安装在我的计算机上,但由于缺少权限而在其他计算机上安装的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!