473,327 Members | 1,976 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,327 software developers and data experts.

Security Issue in Service

Hello All,
I've run into a bit of an issue and I was hoping that someone here
could help me. I have inherited a Windows Service written in .Net 2.0
(C#) from a previous employee. It build successfully and I am able to
install it on the target machine via installutil but when I attempt to
run it I receive a security error. First I receive the dialog telling
me that the service could not be started "Error 1053: The service
did..." and then "An unhandled exception of type
'System.Security.SecurityException' occurred in System.dll" . I've
tried running the service on my local machine and opening the CLR
debugger and the errors seems to be related to EventLog.WriteEntry.
I've found the support article
http://support.microsoft.com/?kbid=918122 and have added the

EventLogPermission eventLogPermission = new
EventLogPermission(EventLogPermissionAccess.Admini ster, ".");
eventLogPermission.PermitOnly(); to no avail.

Any help would be greatly appreciated.

Oct 27 '06 #1
1 1655

"bthubbard" <Br*************@gmail.comwrote in message
news:11**********************@f16g2000cwb.googlegr oups.com...
| Hello All,
| I've run into a bit of an issue and I was hoping that someone here
| could help me. I have inherited a Windows Service written in .Net 2.0
| (C#) from a previous employee. It build successfully and I am able to
| install it on the target machine via installutil but when I attempt to
| run it I receive a security error. First I receive the dialog telling
| me that the service could not be started "Error 1053: The service
| did..." and then "An unhandled exception of type
| 'System.Security.SecurityException' occurred in System.dll" . I've
| tried running the service on my local machine and opening the CLR
| debugger and the errors seems to be related to EventLog.WriteEntry.
| I've found the support article
| http://support.microsoft.com/?kbid=918122 and have added the
|
| EventLogPermission eventLogPermission = new
| EventLogPermission(EventLogPermissionAccess.Admini ster, ".");
| eventLogPermission.PermitOnly(); to no avail.
|
| Any help would be greatly appreciated.
|

My guess is that your service attempts to create a "private log", only
admininstrator accounts have the right to "create" private logs. If your
service runs as localservice or networkservice (as it should), it won't be
able to create the log, so, you'll have to create the log from another
program, not from within your service.
Willy.

Oct 27 '06 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: Jiho Han | last post by:
This seems like a often-asked topic. I created a windows service and installed it on my workstation. The application basically goes out and "receieves" messages from a queue on a remote server....
5
by: Ken Cox [Microsoft MVP] | last post by:
MS has posted this here: http://www.asp.net/faq/ms03-32-issue.aspx Fix for: 'Server Application Unavailable' Error after Applying Security Update for IE...
5
by: nicholas | last post by:
I have a website designed in ASP.NET In my BIN-folder I have several .NET dll-files: DreamweaverCtrls.dll FreeTextBox.dll WebXelMail.dll Now, for "security" reason my hoster told me it is...
0
by: Sam Fields | last post by:
I have found very little regarding the error "Unable to find an entry point named EnumerateSecurityPackagesW in DLL security.dll. ". I have an ASP.NET Web Service being accessed via SSL. I found...
0
by: Scanner2001 | last post by:
I have a web service, which in turn uses a dll that is installed on the same server. The dll is deployed to the GAC. One of the purposes of the dll is to create a file, then write some information...
0
by: Charles Leonard | last post by:
I am having yet another issue with Windows Server 2003. This time, the web service (a file import web service) appears to run except for one odd message: "ActiveX component can't create object". ...
3
by: Grant Schenck | last post by:
I have a simple remoting sample using IPCChannel. If I run the server code as a console app my client can connect just fine. However, if I the same server code runs in a service, the client gets...
1
by: WebServiceSecurity | last post by:
The issue involves the following technologies: - 1. .NET 2.0 Framework 2. WSE2.0 (WS-Security) 3. X.509 certificates 4. BEA Weblogic 8.1.5
8
by: =?Utf-8?B?TWFuanJlZSBHYXJn?= | last post by:
Hi, I created a web service and hosted it in Windows Services. It is working fine. Now I am trying to implement the X509 certificates for message layer security. But it is throwing the following...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.