Logging not working in IIS ?

Topics: Logging Application Block
Jul 4, 2008 at 3:53 AM
hi,

I am implementing Rolling Flat File Trace Listener. 

1. Using Logging Application Block:
It does log in "c:/tempLog/rolling.log" when running in ASP.NET Development Server. But when switch to local IIS (same computer), the same log never works.

I have set full control on "tempLog" folder permission.

2. Using System.IO.File
I do a trace using alternative way:
System.IO.File.AppendText("c:/tempLog/logTest.log);

The log works in both ASP.Net Development Server and local IIS.


I am running out of idea, can someone help me ?

Thanks in advance.

Elvin

Jul 4, 2008 at 10:45 AM
Ok, I think I found the answer.

Just have to check to enable anonymous access in the virtual directory folder in IIS.


Jul 4, 2008 at 3:09 PM
Hi Elvin,

There's a known issue with the rolling flat file trace listener when impersonation is enabled in Windows Server 2003 because the default file permissions don't allow users to rename other users' files. You may not face it now, but you will if you enable impersonation later.

Fernando
Jul 15, 2008 at 10:41 PM
Edited Jul 15, 2008 at 10:48 PM
Hi All,

Even it is not working for me also. I have checked in IIS virtual folder the anonymous access is already checked with default ASP.Net User account details in it. Could you please let me know what else could be creating the problem? In my case, I am using the Rolling Flat File listener with the log directory pointing to an external dir out of the wwwroot folder , but within the same pc itself.

Environment:

Windows XP SP2, IIS 5.1, ASP.Net 2.0, entlib 3.1
Jul 16, 2008 at 12:09 AM
Edited Jul 16, 2008 at 12:09 AM


asrikant wrote:
Hi All,

Even it is not working for me also. I have checked in IIS virtual folder the anonymous access is already checked with default ASP.Net User account details in it. Could you please let me know what else could be creating the problem? In my case, I am using the Rolling Flat File listener with the log directory pointing to an external dir out of the wwwroot folder , but within the same pc itself.

Environment:

Windows XP SP2, IIS 5.1, ASP.Net 2.0, entlib 3.1


I could solve the issue. I just set the tracingEnabled property to true in the below mentioned manner and it started working. Hope this will be helpful for other who are facing the same issue.

<

 

loggingConfiguration name="Logging Application Block" tracingEnabled="truedefaultCategory="RollingFlatFileOnly" logWarningsWhenNoCategoriesMatch="true">

 

 

 

Jul 16, 2008 at 3:39 PM

Hi,

This setting would be necessary if you're only using the Tracer functionality. Do direct logging requests (i.e. Logger.Write()) work even if you set tracingEnabled to false?

Fernando


asrikant wrote:


asrikant wrote:
Hi All,

Even it is not working for me also. I have checked in IIS virtual folder the anonymous access is already checked with default ASP.Net User account details in it. Could you please let me know what else could be creating the problem? In my case, I am using the Rolling Flat File listener with the log directory pointing to an external dir out of the wwwroot folder , but within the same pc itself.

Environment:

Windows XP SP2, IIS 5.1, ASP.Net 2.0, entlib 3.1


I could solve the issue. I just set the tracingEnabled property to true in the below mentioned manner and it started working. Hope this will be helpful for other who are facing the same issue.

<

 

loggingConfiguration name="Logging Application Block" tracingEnabled="truedefaultCategory="RollingFlatFileOnly" logWarningsWhenNoCategoriesMatch="true">