开发者

ClickOnce setup failed on XP or Windows Server 2003 if username contains dots

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.t开发者_JAVA技巧est". 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


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.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜