在Windows Server 2008上安装由Dot net创建的Windows服务问题 [英] Install windows service created by Dot net on Windows server 2008 problem

查看:119
本文介绍了在Windows Server 2008上安装由Dot net创建的Windows服务问题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好。

我通过visual studio 2010写了一个windows服务。

我在我的笔记本电脑上通过InstallUtil.exe安装并测试了它(来自windows\.net \ framework 2文件夹)。

但是当它在Windows服务器2008上安装时会引发此错误:

请注意我在此服务器上拥有管理员权限。

Hi anybody
I wrote a windows service by visual studio 2010 .
I installed and tested it on my laptop by InstallUtil.exe(from windows\.net\ framework 2 folder).
But when installing it on a windows server 2008 it raise this error:
Please note I have administrator privileged on this server .

C:\c:\Windows\Microsoft.NET\Framework\v2.0.50727\InstallUtil.exe
-i c:\FileManitor\AspcFileManitor.exe
Microsoft (R) .NET Framework Installation utility Version 2.0.50727.4927
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:\FileManitor\AspcFileManitor.exe asse
mbly's progress.
The file is located at c:\FileManitor\AspcFileManitor.InstallLog.
Installing assembly 'c:\FileManitor\AspcFileManitor.exe'.
Affected parameters are:
   logtoconsole =
   assemblypath = c:\FileManitor\AspcFileManitor.exe
   i =
   logfile = c:\FileManitor\AspcFileManitor.InstallLog
Installing service ASPC File Monitor...
Creating EventLog source ASPC File Monitor in log Application...
An exception occurred during the Install phase.
System.Security.SecurityException: The source was not found, but some or all eve
nt logs could not be searched.  Inaccessible logs: Security.
The Rollback phase of the installation is beginning.
See the contents of the log file for the c:\FileManitor\AspcFileManitor.exe asse
mbly's progress.
The file is located at c:\FileManitor\AspcFileManitor.InstallLog.
Rolling back assembly 'c:\FileManitor\AspcFileManitor.exe'.
Affected parameters are:
   logtoconsole =
   assemblypath = c:\FileManitor\AspcFileManitor.exe
   i =
   logfile = c:\FileManitor\AspcFileManitor.InstallLog
Restoring event log to previous state for source ASPC File Monitor.
An exception occurred during the Rollback phase of the System.Diagnostics.EventL
ogInstaller installer.
System.Security.SecurityException: The source was not found, but some or all eve
nt logs could not be searched.  Inaccessible logs: Security.
An exception occurred during the Rollback phase of the installation. This except
ion will be ignored and the rollback will continue. However, the machine might n
ot fully revert to its initial state after the rollback is complete.
The Rollback phase completed successfully.
The transacted install has completed.
The installation failed, and the rollback has been performed.



这里是日志文件:


and here is the log file:

Installing assembly 'c:\FileManitor\AspcFileManitor.exe'.
Affected parameters are:
   logtoconsole =
   assemblypath = c:\FileManitor\AspcFileManitor.exe
   i =
   logfile = c:\FileManitor\AspcFileManitor.InstallLog
Installing service ASPC File Monitor...
Creating EventLog source ASPC File Monitor in log Application...
Rolling back assembly 'c:\FileManitor\AspcFileManitor.exe'.
Affected parameters are:
   logtoconsole =
   assemblypath = c:\FileManitor\AspcFileManitor.exe
   i =
   logfile = c:\FileManitor\AspcFileManitor.InstallLog
Restoring event log to previous state for source ASPC File Monitor.
An exception occurred during the Rollback phase of the System.Diagnostics.EventLogInstaller installer.
System.Security.SecurityException: The source was not found, but some or all event logs could not be searched.  Inaccessible logs: Security.
An exception occurred during the Rollback phase of the installation. This exception will be ignored and the rollback will continue. However, the machine might not fully revert to its initial state after the rollback is complete.

推荐答案

它解决了!

但是我有管理员权限,我应该运行命令提示符窗口As administrate选项!

我找到了这个链接:服务应用程序安装失败 [ ^ ]


另一个变体。

我发现将installutil.exe,InstallUtilLib.dll和InstallUtil.exe.config复制到目标目录更容易。

然后导航命令提示符到目标目录并运行installutil -i Target.exe

我厌倦了错误输入长目录路径并让installutil抱怨它找不到目标文件。
An additional variation.
I find it easier to copy installutil.exe,InstallUtilLib.dll and InstallUtil.exe.config to the target directory.
Then navigate the commandprompt to the target directory and run installutil -i Target.exe
I get sick of mistyping long directory paths and having installutil complain it can't find the target file.


是运行visual basic cmd提示符作为管理员运行它解决了错误,如

安装失败,并且回滚已经已执行。
yes by running visual basic cmd prompt as run as administrator it solve the error like
"installation failed,and rollback has been performed".


这篇关于在Windows Server 2008上安装由Dot net创建的Windows服务问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆