Ask a Question related to ASP.NET Security, Design and Development.
-
Stephane #1
Win XP event log: Access denied
Hi,
I have an ASP.NET web site using event log to log errors. My home server
used to be Win 2000 and it has always worked fine. Few days ago, I installed
Win XP and since then, I have security problems... Here's the error I get:
System.Web.Services.Protocols.SoapException: Server was unable to process
request. --> Cannot open log for source {0}. You may not have write access.
--> Access is denied
I don't know how to set permissions in Win XP to let ASPNET user write in
event log.
Any idea??
Thanks,
Stephane
Stephane Guest
-
Web Service + Anon Access, but getting 401 Access Denied Error
I have a simple webservice that just returns a string. The security for this is set to windows authentication in IIS (XP Professional) and anonymous... -
ItemDataBound Event - How to access the previous record when this event is raised in DataGrid?
ItemDataBound Event - How to access the previous record when this event is raised in DataGrid? During "ItemDataBound Event", I would like... -
EMAB, Impersonation, & Access Denied to Event Log in ASP.NET
Hi, I am working on an ASP.NET project and wanted to use the Exception Management Application Block to do my error logging. With the ASP.NET... -
Access is denied on DC System Event log
When I am running computer management of any of our Windosw Server 2003 Domain controllers & I attempt to view the System Event Log, I recieve this... -
Access denied when creating Access application object
In an ASP file I am running the following in VBScript in order to extract data from an Access 2002 MDB file which is physically located in the... -
Stephane #2
RE: Win XP event log: Access denied
Hi,
After few other tests, it looks like it's any of my applications which are
called by ASP.NET that are having trouble with event log. Here's the last
error:
System.InvalidOperationException: Cannot open log for source {0}. You may
not have write access. ---> System.ComponentModel.Win32Exception: Access is
denied
I didn't have this problem on windows 2000. But since I'm on Win XP now, I
have to solve this. I set full control to everyone on every drive of my
computer and it still not working...
Any idea of how to set permissions to write in event log in Win Xp?
Thanks,
Steph
Stephane Guest
-
richlm #3
Re: Win XP event log: Access denied
see [url]http://support.microsoft.com/default.aspx?scid=kb;en-us;842795[/url]
Yes the default registry permissions on XP/2003 are tighter than on 2000.
The first time your app tries to write to the event log, it checks to see if
an event source for your application (typically the application name)
already exists. If not, it tries to create it.
Event log sources are stored in the registry under:
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Servic es\Eventlog\...
Changing file system permissions will have no effect on the registry. If you
start regedit.exe and locate the registry key above, right click and select
'Permissions' you can see which accounts do have access.
You could just add the ASPNET account here, but this is a BAD idea because
it will complicate deployment of your application and weaken security.
The usual solution is to create the event source at installation time using
EventLog.CreateEventSource (or the EventLogInstaller class). Installation
will normally be done in the context of an administrator account.
Here's a couple of links to get you started:
[url]http://msdn.microsoft.com/library/default.asp?url=/library/en-us/vbcon/html/vbwlkWalkthroughCreatingEventLogInstallers.asp[/url]
[url]http://msdn.microsoft.com/library/default.asp?url=/library/en-us/vbcon/html/vbtskaddingyourapplicationassourceofeventlogentrie s.asp[/url]
richlm Guest
-
Stephane #4
Re: Win XP event log: Access denied
I solve my problem using impersonation in web.config like this...
<identity impersonate="true" userName="stephane" password="12345"/>
I guess this is not te best way, but at least it's working on my development
server.
Thanks,
Steph
"richlm" wrote:
> see [url]http://support.microsoft.com/default.aspx?scid=kb;en-us;842795[/url]
>
> Yes the default registry permissions on XP/2003 are tighter than on 2000.
>
> The first time your app tries to write to the event log, it checks to see if
> an event source for your application (typically the application name)
> already exists. If not, it tries to create it.
>
> Event log sources are stored in the registry under:
> HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Servic es\Eventlog\...
>
> Changing file system permissions will have no effect on the registry. If you
> start regedit.exe and locate the registry key above, right click and select
> 'Permissions' you can see which accounts do have access.
> You could just add the ASPNET account here, but this is a BAD idea because
> it will complicate deployment of your application and weaken security.
>
> The usual solution is to create the event source at installation time using
> EventLog.CreateEventSource (or the EventLogInstaller class). Installation
> will normally be done in the context of an administrator account.
>
> Here's a couple of links to get you started:
> [url]http://msdn.microsoft.com/library/default.asp?url=/library/en-us/vbcon/html/vbwlkWalkthroughCreatingEventLogInstallers.asp[/url]
> [url]http://msdn.microsoft.com/library/default.asp?url=/library/en-us/vbcon/html/vbtskaddingyourapplicationassourceofeventlogentrie s.asp[/url]
>
>
>
>Stephane Guest
-
Ted Jung #5
Re: Win XP event log: Access denied
Stephane wrote:
> Hi,> I have an ASP.NET web site using event log to log errors. My home server
> used to be Win 2000 and it has always worked fine. Few days ago, I installed
> Win XP and since then, I have security problems... Here's the error I get:> System.Web.Services.Protocols.SoapException: Server was unable to process
> request. --> Cannot open log for source {0}. You may not have write access.
> --> Access is denied> I don't know how to set permissions in Win XP to let ASPNET user write in
> event log.> Any idea??> Thanks,Did you ever get a response to this question, Stephanie? I am getting the> Stephane
same error and I'm looking for a clue. I have a web service running on my
server and the client program is showing me this error when it tries to
execute the web service. If I change the Anonymous Access user that the
web service runs as to an account with Administrator permissions, it works
without error, but if I don't, then I get this error every time.
Ted
Ted Jung Guest
-
Joe Kaplan \(MVP - ADSI\) #6
Re: Win XP event log: Access denied
You might try enabling some auditing on the server in question in Local
Security Policy and setting the SACL on the event log files and registry
keys to see if you can see what access is generating the failure. Auditing
is really helpful for tracking down security-related failures.
Joe K.
"Ted Jung" <tedjung@microsoft.com> wrote in message
news:f9cecc74b07fc3685cd062c38feaaa3c$1@www.sslgur u.com...> Stephane wrote:
>>>> Hi,>>> I have an ASP.NET web site using event log to log errors. My home server
>> used to be Win 2000 and it has always worked fine. Few days ago, I
>> installed Win XP and since then, I have security problems... Here's the
>> error I get:>>> System.Web.Services.Protocols.SoapException: Server was unable to process
>> request. --> Cannot open log for source {0}. You may not have write
>> access. --> Access is denied>>> I don't know how to set permissions in Win XP to let ASPNET user write in
>> event log.>>> Any idea??>>> Thanks,>>> Stephane
> Did you ever get a response to this question, Stephanie? I am getting the
> same error and I'm looking for a clue. I have a web service running on my
> server and the client program is showing me this error when it tries to
> execute the web service. If I change the Anonymous Access user that the
> web service runs as to an account with Administrator permissions, it works
> without error, but if I don't, then I get this error every time.
>
> Ted
>
Joe Kaplan \(MVP - ADSI\) Guest



Reply With Quote

