转到正文

存档

标签: windows service

Today when I want to Install a windows service in a remote computer, I met an error:

An exception occurred during the Install phase.
System.Security.SecurityException: The source was not found, but some or all event logs could not be searched.  Inaccessible logs: Security.

The problem is because that you don't have administrator right.  You must run the install program with Administrator right. It's easy, right click the execuatable program, and "Run as Administrator".

Good Luck!

Reference:

1. Service application installation fail: http://social.msdn.microsoft.com/Forums/en-US/winformssetup/thread/7cea376a-cab5-497a-927d-0c224e58053b

If you write a windows service, and you choose "Local Service" as account type, and if you want to connect to sql server db, you must use

User ID=*****;Password=***

instead of

integrated security=SSPI

Or you'll get a pemission exception.

Today I want to write a windows serivce application. When I finished the code and I wanted to start the serivce, and I get a error, just like below:

C:\Documents and Settings\Elliot>net start msiserver
The Windows Installer service is starting.
The Windows Installer service could not be started.
 The service did not report an error.
More help is available by typing NET HELPMSG 3534.

C:\Documents and Settings\Elliot>net helpmsg 3534
The service did not report an error.

This error is very strange.  After about 30 minutes, I got the solution as below:

in my case, this was permissions on a log file. If your program code will wrtie some data to a file, and you never change the program execute directory( the service program's default execute directory is C:\windows\system32), and you'll get a error that you have not permission to write to system directory.  However, how to find this error? I looked at the event log which pointed me to this issue. specifically:
1. right click my computer 继续阅读

www.liaoqiqi.com网站PR查询 博客简洁版 博客Google_Site_Map 博客Baidu_Site_Map ?