如果用户名包含点,则在 XP 或 Windows Server 2003 上 ClickOnce 安装失败
我有基于 ClickOnce 的设置(适用于用 C#/.NET 2.0 编写的应用程序)。除了(奇怪!)用户名中包含点(“.”)的用户(例如“almog\miki.test”)之外,此安装工作顺利。我花了很多时间才明白安装失败的原因。此外,对于这些“点”用户来说,我的设置在 Windows 7 和 Windows Server 2008 下也能完美运行!该问题仅出现在 Windows XP 和 Windows Server 2003 上!
对于此类“有问题”的用户,安装会失败并显示“详细信息...”按钮,我在其显示的错误日志下方附加了该信息。可能有人已经看到这个问题,或者知道某些东西可以提供帮助,或者只是知道我可以尝试解决这个问题。不幸的是,我的客户既不同意提前使用 Windows 7,也不更改这些用户的名称,我理解他们。多次谷歌搜索尝试均未成功:(请帮忙!
这是错误日志...
PLATFORM VERSION INFO Windows : 5.2.3790.131072 (Win32NT) Common Language Runtime : 2.0.50727.3623 System.Deployment.dll : 2.0.50727.3053 (netfxsp.050727-3000) mscorwks.dll : 2.0.50727.3623 (GDR.050727-3600) dfdll.dll : 2.0.50727.3053 (netfxsp.050727-3000) dfshim.dll : 4.0.31106.0 (Main.031106-0000) SOURCES Deployment url : file://sunny/NextSharpErp/deploy/NextExplorer.application Application url : file://sunny/NextSharpErp/deploy/REL.1.0.11223.13006/NextExplorer.exe.manifest IDENTITIES Deployment Identity : NextExplorer.app, Version=1.0.11223.13006, Culture=neutral, PublicKeyToken=287349dda24b871e, processorArchitecture=msil Application Identity : NextExplorer.exe, Version=2011.8.10.10, Culture=neutral, PublicKeyToken=287349dda24b871e, 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 \\sunny\NextSharpErp\deploy\NextExplorer.application resulted in exception. Following failure messages were detected: + Transaction did not complete. The file name may be too long. Shorten the file name, and try again. + The system cannot find the path specified. (Exception from HRESULT: 0x80070003) COMPONENT STORE TRANSACTION FAILURE SUMMARY * Transaction at [11/08/2011 13:59:50] - Staging of a component file (Languages\VbSnippets\fundamentals\datatypes\ConvertBetweenSimplifiedChineseandTraditionalChineseCharacters.snippet) did not succeed. - Staging of a component file (Languages\Dynamic\Lexers\ActiproSoftware.Perl.xml) did not succeed. - Staging of a component file (Languages\VbSnippets\common code patterns\properties and procedures\FuncWithVarParams.snippet) did not succeed. - Staging of a component file (Languages\VbSnippets\common code patterns\types\GetTheStringValueOfAnEnumerationValue.snippet) did not succeed. - Staging of a component file (Languages\VbSnippets\common code patterns\types\DefineAnEnumeration.snippet) did not succeed. - Staging of a component file (Languages\VbSnippets\fundamentals\datatypes\ConvertaNumbertoaHexaDecimalString.snippet) did not succeed. - Staging of a component file (Languages\VbSnippets\fundamentals\math\CalculateTangentOfAnAngle.snippet) did not succeed. - Staging of a component file (Languages\VbSnippets\fundamentals\filesystem\DeleteFiles.snippet) did not succeed. ...............[I skip many other files]...................... - Staging of a component (NextExplorer.resources.dll.genman) did not succeed. - Staging of a component file (NextExplorer.resources.dll) did not succeed. - Staging of a component (ActiproSoftware.SyntaxEditor.Net20.dll.genman) did not succeed. - Staging of a component file (ActiproSoftware.SyntaxEditor.Net20.dll) did not succeed. - Staging of a component (ComponentFactory.Krypton.Navigator.dll.genman) did not succeed. - Staging of a component file (ComponentFactory.Krypton.Navigator.dll) did not succeed. - Installation of deployment (file://sunny/NextSharpErp/deploy/NextExplorer.application#NextExplorer.app, Version=1.0.11223.13006, Culture=neutral, PublicKeyToken=287349dda24b871e, processorArchitecture=msil) did not succeed. - Setting one or more of the deployment metadata did not succeed. WARNINGS There were no warnings during this operation. OPERATION PROGRESS STATUS * [11/08/2011 13:59:15] : Activation of \\sunny\NextSharpErp\deploy\NextExplorer.application has started. * [11/08/2011 13:59:15] : Processing of deployment manifest has successfully completed. * [11/08/2011 13:59:15] : Installation of the application has started. * [11/08/2011 13:59:16] : Processing of application manifest has successfully completed. * [11/08/2011 13:59:19] : Request of trust and detection of platform is complete. * [11/08/2011 13:59:45] : Downloading of subscription dependencies is complete. * [11/08/2011 13:59:45] : Commit of the downloaded application has started. ERROR DETAILS Following errors were detected during this operation. * [11/08/2011 13:59:51] System.Deployment.Application.DeploymentException (ComponentStore) - Transaction did not complete. The file name may be too long. Shorten the file name, and try again. - Source: System.Deployment - Stack trace: at System.Deployment.Application.ComponentStore.SubmitStoreTransaction(StoreTransactionContext storeTxn, SubscriptionState subState) at System.Deployment.Application.ComponentStore.SubmitStoreTransactionCheckQuota(StoreTransactionContext storeTxn, SubscriptionState subState) at System.Deployment.Application.ComponentStore.CommitApplication(SubscriptionState subState, CommitApplicationParams commitParams) 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) --- Inner Exception --- System.IO.DirectoryNotFoundException - The system cannot find the path specified. (Exception from HRESULT: 0x80070003) - Source: System.Deployment - Stack trace: at System.Deployment.Internal.Isolation.IStore.Transact(IntPtr cOperation, StoreTransactionOperation[] rgOperations, UInt32[] rgDispositions, Int32[] rgResults) at System.Deployment.Internal.Isolation.Store.Transact(StoreTransactionOperation[] operations, UInt32[] rgDispositions, Int32[] rgResults) at System.Deployment.Application.ComponentStore.SubmitStoreTransaction(StoreTransactionContext storeTxn, SubscriptionState subState) COMPONENT STORE TRANSACTION DETAILS * Transaction at [11/08/2011 13:59:50] + System.Deployment.Internal.Isolation.StoreOperationStageComponent - Status: Installed - HRESULT: 0x0 - Manifest: 177GGDTG.85L.application + System.Deployment.Internal.Isolation.StoreOperationSetDeploymentMetadata - Status: Set - HRESULT: 0x0 + System.Deployment.Internal.Isolation.StoreOperationStageComponent - Status: Installed - HRESULT: 0x0 - Manifest: NextExplorer.exe.manifest + System.Deployment.Internal.Isolation.StoreOperationStageComponentFile - Status: Installed - HRESULT: 0x0 - File: Languages\VbSnippets\common code patterns\exception handling\DefineAnExceptionClass.snippet + System.Deployment.Internal.Isolation.StoreOperationStageComponentFile - Status: Installed - HRESULT: 0x0 - File: Languages\VbSnippets\common code patterns\exception handling\UsingStatement.snippet + System.Deployment.Internal.Isolation.StoreOperationStageComponentFile - Status: Installed - HRESULT: 0x0 - File: Languages\VbSnippets\fundamentals\collections and arrays\LocateanElementinanArray.snippet ..........................[I skip many other such blocks with status 'Installed']............................................... + System.Deployment.Internal.Isolation.StoreOperationStageComponentFile - Status: Installed - HRESULT: 0x0 - File: Languages\Dynamic\Lexers\ActiproSoftware.MSIL.xml + System.Deployment.Internal.Isolation.StoreOperationStageComponentFile - Status: Installed - HRESULT: 0x0 - File: Languages\VbSnippets\application\ActivateaRunningApplicationByProcess.snippet + System.Deployment.Internal.Isolation.StoreOperationStageComponentFile - Status: Failed - HRESULT: 0x80070003 - File: Languages\VbSnippets\fundamentals\datatypes\ConvertBetweenSimplifiedChineseandTraditionalChineseCharacters.snippet + System.Deployment.Internal.Isolation.StoreOperationStageComponentFile - Status: Failed - HRESULT: 0x1 - File: Languages\Dynamic\Lexers\ActiproSoftware.Perl.xml + System.Deployment.Internal.Isolation.StoreOperationStageComponentFile - Status: Failed - HRESULT: 0x1 - File: Languages\VbSnippets\common code patterns\properties and procedures\FuncWithVarParams.snippet + System.Deployment.Internal.Isolation.StoreOperationStageComponentFile - Status: Failed - HRESULT: 0x1 - File: Languages\VbSnippets\common code patterns\types\GetTheStringValueOfAnEnumerationValue.snippet .........................[I skip many other blocks like these with status 'Failed'].................................................. + System.Deployment.Internal.Isolation.StoreOperationStageComponent - Status: Failed - HRESULT: 0x1 - Manifest: ComponentFactory.Krypton.Navigator.dll.genman + System.Deployment.Internal.Isolation.StoreOperationStageComponentFile - Status: Failed - HRESULT: 0x1 - File: ComponentFactory.Krypton.Navigator.dll + System.Deployment.Internal.Isolation.StoreOperationInstallDeployment - Status: Failed - HRESULT: 0x1 - AppId: file://sunny/NextSharpErp/deploy/NextExplorer.application#NextExplorer.app, Version=1.0.11223.13006, Culture=neutral, PublicKeyToken=287349dda24b871e, processorArchitecture=msil + System.Deployment.Internal.Isolation.StoreOperationSetDeploymentMetadata - Status: Failed - HRESULT: 0x1 + System.Deployment.Internal.Isolation.StoreTransactionOperationType (27) - HRESULT: 0x1
I have ClickOnce based setup (for application written in C#/.NET 2.0). This install works smoothly except (weird!) for the users which have dots (".") in their user name, e.g. "almog\miki.test". It took me a lot of time to understand that reason of installation failure. Furthermore, my setup also works perfectly under Windows 7 and Windows Server 2008 for these "dotted" users! The problem is occurred on Windows XP and Windows Server 2003 only!
For such "problematic" users installation fails with "Details..." button and I attach below the error log it shows. May someone have seen this problem, or knows something could help or just have ideas of what could I try to fix the situation. Unfortunately, my customers neither agree advance to Windows 7 nor change these users' names and I understand them. Numerous Googling attempts did not success :( Please help!
Here is the error log...
PLATFORM VERSION INFO Windows : 5.2.3790.131072 (Win32NT) Common Language Runtime : 2.0.50727.3623 System.Deployment.dll : 2.0.50727.3053 (netfxsp.050727-3000) mscorwks.dll : 2.0.50727.3623 (GDR.050727-3600) dfdll.dll : 2.0.50727.3053 (netfxsp.050727-3000) dfshim.dll : 4.0.31106.0 (Main.031106-0000) SOURCES Deployment url : file://sunny/NextSharpErp/deploy/NextExplorer.application Application url : file://sunny/NextSharpErp/deploy/REL.1.0.11223.13006/NextExplorer.exe.manifest IDENTITIES Deployment Identity : NextExplorer.app, Version=1.0.11223.13006, Culture=neutral, PublicKeyToken=287349dda24b871e, processorArchitecture=msil Application Identity : NextExplorer.exe, Version=2011.8.10.10, Culture=neutral, PublicKeyToken=287349dda24b871e, 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 \\sunny\NextSharpErp\deploy\NextExplorer.application resulted in exception. Following failure messages were detected: + Transaction did not complete. The file name may be too long. Shorten the file name, and try again. + The system cannot find the path specified. (Exception from HRESULT: 0x80070003) COMPONENT STORE TRANSACTION FAILURE SUMMARY * Transaction at [11/08/2011 13:59:50] - Staging of a component file (Languages\VbSnippets\fundamentals\datatypes\ConvertBetweenSimplifiedChineseandTraditionalChineseCharacters.snippet) did not succeed. - Staging of a component file (Languages\Dynamic\Lexers\ActiproSoftware.Perl.xml) did not succeed. - Staging of a component file (Languages\VbSnippets\common code patterns\properties and procedures\FuncWithVarParams.snippet) did not succeed. - Staging of a component file (Languages\VbSnippets\common code patterns\types\GetTheStringValueOfAnEnumerationValue.snippet) did not succeed. - Staging of a component file (Languages\VbSnippets\common code patterns\types\DefineAnEnumeration.snippet) did not succeed. - Staging of a component file (Languages\VbSnippets\fundamentals\datatypes\ConvertaNumbertoaHexaDecimalString.snippet) did not succeed. - Staging of a component file (Languages\VbSnippets\fundamentals\math\CalculateTangentOfAnAngle.snippet) did not succeed. - Staging of a component file (Languages\VbSnippets\fundamentals\filesystem\DeleteFiles.snippet) did not succeed. ...............[I skip many other files]...................... - Staging of a component (NextExplorer.resources.dll.genman) did not succeed. - Staging of a component file (NextExplorer.resources.dll) did not succeed. - Staging of a component (ActiproSoftware.SyntaxEditor.Net20.dll.genman) did not succeed. - Staging of a component file (ActiproSoftware.SyntaxEditor.Net20.dll) did not succeed. - Staging of a component (ComponentFactory.Krypton.Navigator.dll.genman) did not succeed. - Staging of a component file (ComponentFactory.Krypton.Navigator.dll) did not succeed. - Installation of deployment (file://sunny/NextSharpErp/deploy/NextExplorer.application#NextExplorer.app, Version=1.0.11223.13006, Culture=neutral, PublicKeyToken=287349dda24b871e, processorArchitecture=msil) did not succeed. - Setting one or more of the deployment metadata did not succeed. WARNINGS There were no warnings during this operation. OPERATION PROGRESS STATUS * [11/08/2011 13:59:15] : Activation of \\sunny\NextSharpErp\deploy\NextExplorer.application has started. * [11/08/2011 13:59:15] : Processing of deployment manifest has successfully completed. * [11/08/2011 13:59:15] : Installation of the application has started. * [11/08/2011 13:59:16] : Processing of application manifest has successfully completed. * [11/08/2011 13:59:19] : Request of trust and detection of platform is complete. * [11/08/2011 13:59:45] : Downloading of subscription dependencies is complete. * [11/08/2011 13:59:45] : Commit of the downloaded application has started. ERROR DETAILS Following errors were detected during this operation. * [11/08/2011 13:59:51] System.Deployment.Application.DeploymentException (ComponentStore) - Transaction did not complete. The file name may be too long. Shorten the file name, and try again. - Source: System.Deployment - Stack trace: at System.Deployment.Application.ComponentStore.SubmitStoreTransaction(StoreTransactionContext storeTxn, SubscriptionState subState) at System.Deployment.Application.ComponentStore.SubmitStoreTransactionCheckQuota(StoreTransactionContext storeTxn, SubscriptionState subState) at System.Deployment.Application.ComponentStore.CommitApplication(SubscriptionState subState, CommitApplicationParams commitParams) 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) --- Inner Exception --- System.IO.DirectoryNotFoundException - The system cannot find the path specified. (Exception from HRESULT: 0x80070003) - Source: System.Deployment - Stack trace: at System.Deployment.Internal.Isolation.IStore.Transact(IntPtr cOperation, StoreTransactionOperation[] rgOperations, UInt32[] rgDispositions, Int32[] rgResults) at System.Deployment.Internal.Isolation.Store.Transact(StoreTransactionOperation[] operations, UInt32[] rgDispositions, Int32[] rgResults) at System.Deployment.Application.ComponentStore.SubmitStoreTransaction(StoreTransactionContext storeTxn, SubscriptionState subState) COMPONENT STORE TRANSACTION DETAILS * Transaction at [11/08/2011 13:59:50] + System.Deployment.Internal.Isolation.StoreOperationStageComponent - Status: Installed - HRESULT: 0x0 - Manifest: 177GGDTG.85L.application + System.Deployment.Internal.Isolation.StoreOperationSetDeploymentMetadata - Status: Set - HRESULT: 0x0 + System.Deployment.Internal.Isolation.StoreOperationStageComponent - Status: Installed - HRESULT: 0x0 - Manifest: NextExplorer.exe.manifest + System.Deployment.Internal.Isolation.StoreOperationStageComponentFile - Status: Installed - HRESULT: 0x0 - File: Languages\VbSnippets\common code patterns\exception handling\DefineAnExceptionClass.snippet + System.Deployment.Internal.Isolation.StoreOperationStageComponentFile - Status: Installed - HRESULT: 0x0 - File: Languages\VbSnippets\common code patterns\exception handling\UsingStatement.snippet + System.Deployment.Internal.Isolation.StoreOperationStageComponentFile - Status: Installed - HRESULT: 0x0 - File: Languages\VbSnippets\fundamentals\collections and arrays\LocateanElementinanArray.snippet ..........................[I skip many other such blocks with status 'Installed']............................................... + System.Deployment.Internal.Isolation.StoreOperationStageComponentFile - Status: Installed - HRESULT: 0x0 - File: Languages\Dynamic\Lexers\ActiproSoftware.MSIL.xml + System.Deployment.Internal.Isolation.StoreOperationStageComponentFile - Status: Installed - HRESULT: 0x0 - File: Languages\VbSnippets\application\ActivateaRunningApplicationByProcess.snippet + System.Deployment.Internal.Isolation.StoreOperationStageComponentFile - Status: Failed - HRESULT: 0x80070003 - File: Languages\VbSnippets\fundamentals\datatypes\ConvertBetweenSimplifiedChineseandTraditionalChineseCharacters.snippet + System.Deployment.Internal.Isolation.StoreOperationStageComponentFile - Status: Failed - HRESULT: 0x1 - File: Languages\Dynamic\Lexers\ActiproSoftware.Perl.xml + System.Deployment.Internal.Isolation.StoreOperationStageComponentFile - Status: Failed - HRESULT: 0x1 - File: Languages\VbSnippets\common code patterns\properties and procedures\FuncWithVarParams.snippet + System.Deployment.Internal.Isolation.StoreOperationStageComponentFile - Status: Failed - HRESULT: 0x1 - File: Languages\VbSnippets\common code patterns\types\GetTheStringValueOfAnEnumerationValue.snippet .........................[I skip many other blocks like these with status 'Failed'].................................................. + System.Deployment.Internal.Isolation.StoreOperationStageComponent - Status: Failed - HRESULT: 0x1 - Manifest: ComponentFactory.Krypton.Navigator.dll.genman + System.Deployment.Internal.Isolation.StoreOperationStageComponentFile - Status: Failed - HRESULT: 0x1 - File: ComponentFactory.Krypton.Navigator.dll + System.Deployment.Internal.Isolation.StoreOperationInstallDeployment - Status: Failed - HRESULT: 0x1 - AppId: file://sunny/NextSharpErp/deploy/NextExplorer.application#NextExplorer.app, Version=1.0.11223.13006, Culture=neutral, PublicKeyToken=287349dda24b871e, processorArchitecture=msil + System.Deployment.Internal.Isolation.StoreOperationSetDeploymentMetadata - Status: Failed - HRESULT: 0x1 + System.Deployment.Internal.Isolation.StoreTransactionOperationType (27) - HRESULT: 0x1
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我以前遇到过这个问题。问题是用户的文件夹中包含一个点 (.),并且安装程序的某些功能不喜欢在路径中包含点。
有两种可能的解决方案,一种有点冒险,另一种很可能毫无用处。为自己的悲观态度道歉。
解决方案#1
用户需要从其个人资料文件夹中删除该点。 此演练解释了该过程,但它涉及对计算机的管理员访问权限和黑客攻击注册表。第一个要求可能无法实现,而第二个要求通常是不好的做法,如果可以避免,则不建议这样做。
此外,更改用户配置文件文件夹可能很危险,因为其他文件和应用程序可能依赖于虚线用户目录中文件夹或文件的固定路径。解决您的问题可以为使用其他应用程序的用户创造更多。这不是最佳解决方案。
解决方案 #2
下一个解决方案并不是真正的解决方案。这就是使用 MS Connect 提交错误报告。彻底记录该问题,并确保引用错误代码 0x80070003,并三次检查您是否可以重现此问题,以便您可以给出有关如何重现此错误的非常具体的说明。
微软的某人会做出回应,但他们有可能会说这是设计造成的。但是,您可能会很幸运并从中获得修补程序。
我建议暂时接受此错误并向 MS Connect 发布错误报告。使用 MS Connect 票证的链接更新您的问题,我(希望其他人)会对该请求进行投票,以便希望它能够得到解决。
正如我提到的,我以前见过这个问题。但是,我记得在我的例子中,目录中的点不是用户名的一部分,因此我能够重命名目录,瞧!问题已解决。这是一种特殊情况,我们不应该重命名用户文件夹。
祝你好运,我会继续关注这篇文章。
I have ran into this problem before. The problem is that the user's folder contains a dot (.) in it, and some function of the installer doesn't like having a dot in the path.
There are two possible solutions, one is a bit risky and the other will most likely be useless. Apologies for being pessimistic.
Solution #1
The user needs to remove the dot from their profile folder. This walk-through explains the process but it involve, both, having admin access to the machine and hacking the registry. The first requirement may not be possible and the second is often bad practice and not recommended if avoidable.
Furthermore, changing the users profile folder could be dangerous because other files and application could rely on a fixed path to a folder or file within the dotted user directory. Fixing your problem could create more for the user with other applications. This isn't an optimal solution.
Solution #2
The next solution isn't really much of a solution. That would be to file a bug report with MS Connect. Thoroughly document the problem and be sure to reference the error code 0x80070003 and also triple-check that you can reproduce this problem so that you can give very specific instructions on how to replicate this error.
Someone from Microsoft will respond but there is a chance that they will say it behaves this way by design. However, you may get lucky and get a Hotfix out of this.
I recommend accepting this error for now and posting a bug report to MS Connect. Update your question with the link to the MS Connect ticket an I (and hopefully others) will up-vote the request so that hopefully it will get fixed.
As I mentioned I've seen this problem before. However, I recall that in my case the dot in the directory wasn't part of the user name, so I was able to rename the directory and voila! The problem was fixed. This is a special case where we should not rename the user folder.
Good luck and I'll keep watching this post.