zoukankan      html  css  js  c++  java
  • 求助:用C#创建的Windows Service安装时出现密码?(已解决)

    我用C#创建了一个Windows Service程序,也同时创建了一个ProjectInstaller。然后生成服务程序的可执行文件,安装。
    当使用installutil.exe工具进行安装时,提示输入用户名和密码。我输入了我的管理员的用户名和密码也不行。
    后来即使切换到adminitrator用户下,重启,再安装,也需要输入用户名和密码,结果还是不对。
    以下是提示信息,请大家看看,是为什么。谢谢!

    Found .NET Framework version 2.0.50727
    Installing service "MyServices.exe"
    Microsoft (R) .NET Framework Installation utility Version 2.0.50727.42
    Copyright (c) Microsoft Corporation.  All rights reserved.


    Running a transacted installation.

    Beginning the Install phase of the installation.
    See the contents of the log file for the C:\Program Files\tech\TS.Services\MySer
    vices.exe assembly's progress.
    The file is located at C:\Program Files\tech\TS.Services\MyServices.InstallLog.
    Installing assembly 'C:\Program Files\tech\TS.Services\MyServices.exe'.
    Affected parameters are:
       logtoconsole =
       assemblypath = C:\Program Files\tech\TS.Services\MyServices.exe
       logfile = C:\Program Files\tech\TS.Services\MyServices.InstallLog

    An exception occurred during the Install phase.
    System.ComponentModel.Win32Exception: No mapping between account names and secur
    ity IDs was done

    The Rollback phase of the installation is beginning.
    See the contents of the log file for the C:\Program Files\tech\TS.Services\MySer
    vices.exe assembly's progress.
    The file is located at C:\Program Files\tech\TS.Services\MyServices.InstallLog.
    Rolling back assembly 'C:\Program Files\tech\TS.Services\MyServices.exe'.
    Affected parameters are:
       logtoconsole =
       assemblypath = C:\Program Files\tech\TS.Services\MyServices.exe
       logfile = C:\Program Files\tech\TS.Services\MyServices.InstallLog

    The Rollback phase completed successfully.

    The transacted install has completed.
    The installation failed, and the rollback has been performed.
    DONE!!!
    Press any key to continue . . .

  • 相关阅读:
    代码重构~提取方法
    代码重构~提取到类
    不说技术~有时,开发者还是应该讲究一点!
    代码重构~封装成员变量
    将不确定变为确定~LINQ查询包含对不同数据上下文上所定义项的引用
    真实的用户,真实的中国互联网
    John Resig: JavaScript's Chuck Norris
    chrome插件IE tab使用技巧
    人生的疆域与生存的幻象—阅读丰富人生
    WPF 创建多行TextBox
  • 原文地址:https://www.cnblogs.com/saptechnique/p/1101733.html
Copyright © 2011-2022 走看看