Cannot read a Security Log from ASP.net web service

From: Ian Wright (ian-c-wright_at_msn.com)
Date: 05/22/04


Date: Sat, 22 May 2004 17:13:34 -0400

I'm attempting to read the security event log for a WinXP Pro machine using
a web form that calls a web service. Both files are stored in the same
directory in IIS. The directory is set to use Windows Integrated security
and I've set up the web app to use impersonation with the local admin
account on a WinXP Pro box.

I get the following error though whenever I attempt to iterate over the
Entries collection of the EventLog object:

Cannot open log Security on machine .. Windows has not provided an error
code.

The application log and the system log can both be read though using the
same web service. I've altered the machine.config file to use both the
LOCAL and Administrator accounts with the same result. If I put the same
code into a Win form project, it works just fine and I'm able to view the
entries of the security log. Within the web method, I can see that the
current user making the request is the local administrator by using the
IIdentity interface of the User object. Explicitly impersonating the local
admin using objects of the System.Security namespace doesn't help either.

Signing the web service with sn.exe and putting it into the GAC has not
helped. I created a code permission that included full privileges to the
registry and event logs and set my sn assembly to use it, but the same error
occurs. Using Regmon.exe, I can see the requests to the registry keys that
are made, but no error messages are reported.

Can anyone provide suggestions for a fix?



Relevant Pages

  • Re: WSE 3.0, usernameOverTransportSecurity, custom Token Manager w/ securityTokenManager,
    ... I've added the web service call directly to my Data binding method ... expected but not present in the security header of the incoming ... the username token to the message. ... protected override string AuthenticateToken(UsernameToken token) ...
    (microsoft.public.dotnet.framework.webservices.enhancements)
  • Re: Cannot read a Security Log from ASP.net web service
    ... it's a very bad idea to grant that permission to the ASPNET ... Here's the error I get after adding the ASPNET account to the Admin group: ... Cannot open log Security on machine .. ... > a web form that calls a web service. ...
    (microsoft.public.dotnet.framework.aspnet.security)
  • RE: Recommendations for securing a local webservice.
    ... You seem to be trying to secure a web service interface to only those ... protocol that was intended to be caller agnostic to implement a caller ... Install a special certificate as part of the ... Combine #2 with token based security. ...
    (microsoft.public.dotnet.framework.aspnet.webservices)
  • RE: Web Service Implementation Security Question
    ... As for the security problems regarding on using TypedDAtaset in asp.net ... Web Service Implementation Security Question ... | enable the %windir%\Temp directory so the schema can compile. ... Have the process that “compiles�the schema files use another ...
    (microsoft.public.inetserver.iis.security)
  • RE: WSE 2.0, smart client, Username authentication, no x.509
    ... web services WSE 3.0 hosts them without a web server for you (read the WSE ... To perform authentication, because your database does not contain user ... the implementation William Stacey has uses Security ... > server where my web service is ...
    (microsoft.public.dotnet.framework.webservices.enhancements)