求助:用C#建立的Windows Service安裝時出現密碼?(已解決)

來源:互聯網
上載者:User

我用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 . . .

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.