Problem with TraceToDeveloper (SPG Drop 8)

Apr 21, 2010 at 10:11 AM

Hi,

I have the following problem on my SharePoint 2010 Dev environment with SPG Drop 8: TraceToDeveloper doesn't work when it's called from a webpart or an application page. My scenario in detail:

  • I have a console application and a webpart to test the SPG Logger; both are currently executed with admin-rights
  • Logging to the Event-Log works for both, the console application and the webpart
  • Logging to the ULS-Logs works for the console application but not for the webpart
  • stepping through the SPG Code didn't give me any hints; I get no exception, code steps through and ends with call of SPDiagnosticsServiceBase.WriteTrace
  • I guess, that it might be a permission problem, but giving full access to everyone on 14\LOGS didn't solve the problem

Thanks for help

Tobey

Apr 21, 2010 at 4:31 PM

Hi,

after some more investigation I suppose that the problem has to do with my virtual machine. I tested drop 8 on an older SharePoint 2010 machine and tracing worked.

The main difference (and the only difference I can think of) between the two machines is that the new one is Windows Server 2008 (Drop 8 doesn't work) and the old one is Windows Server 2008 R2 (Drop 8 does work). Apart from that the two machines should be identical (both installed according to the guidance from critical path training).

Do you have any insights whether SPG has known issues under Windows Server 2008?

Thanks for help

Tobey

Apr 21, 2010 at 5:03 PM
(I am just another use, I am posting because I am playing with the Logging at this time and figure I could be of help) I am running drop 8 on Windows Server 2008 and do not experience this issue. Have you tried turning all sharepoint logging on Verbose and see if your TraceToDeveloper statement causes anything interesting to happen in the logs?
Apr 22, 2010 at 8:57 AM

Hi,

thank you very much for your reply but turning the logging on verbose didn't help. Tracing from the console application works but the same code with the same verbose-levels doesn't work in a webpart. I am confused...

Tobey

 

Apr 23, 2010 at 3:54 PM

Hi,

I solved the problem. It wasn't a SPG issue but an issue with my machine. The database access account was not member of the local administrators group. It was my fault but I think this fact is not documented very well. The official documentation (http://technet.microsoft.com/en-us/library/ee662513%28office.14%29.aspx) doesn't mention that you have to add the account manually to this group.

Tobey

May 25, 2010 at 11:50 AM

Hi,

it seems that my issue is back again.

I have set up a new machine with separate accounts for the database access account and the application pool account. The database access account is in the local admin group but the application pool account is not. The application pool account has all required permissions according to http://technet.microsoft.com/en-us/library/cc678863.aspx.

With this configuration tracing into ULS doesn't work from a webpart (Event Log works). Tracing works only if I add the application pool account to the local admin group but that's of course not a solution for production.

Could you please provide details about the required permissions for the application pool account in order to make tracing work?

Thanks for help

tobey

Coordinator
May 25, 2010 at 3:48 PM

I agree with you that you should not need to set permissions to admin.  We are not able to reproduce this error in our farm or standalone, we have no trouble with ULS logging.  is it possible that you don't have the right permissions on the log directory for the ULS logs?  Is the default configuration set for this location?

May 26, 2010 at 11:27 AM

Hi,

permissions on the log directory are set to the default configuration. I tried to grant full control permissions to the application pool account step by step (file system, registry, database). But I am still not able to log to ULS.

Is your environment server 2008 or server 2008 R2? Mine is 2008. Could you test on a 2008 environment too?

Thanks

tobey

Coordinator
May 26, 2010 at 2:34 PM

OK, thanks Tobey.  We are doing our matrix testing this week, and we have not yet tested on 2008.  We will have ran our tests by end of week on 2008.

Another question, I'm assuming that you see all of the ULS traces working fine for the core product areas?

May 27, 2010 at 7:43 AM

Hi,

ULS traces for the core product areas are working fine. Only custom tracing via SPG doesn't work.

I appreciate your tests. Please post a message about your results.

Thanks

tobey

Coordinator
May 28, 2010 at 12:51 PM

We tested this under the following configuration, and it worked as expected:

OS : Windows server 2008 SP2

VS : RTM Standarad version of VS2010 ultimate.

 SP : RTM standard version with standalone 



We are continuing our tests with additional configurations.

There is one other possibilty that occurred to me but this would be a bit strange to have one working and not the other.  If you are testing from the sandbox, then we detect if the logging proxy is installed.  If it is installed, then we will log, if it is not installed, we will not log.  Logging and tracing are different proxies.  If the logging proxy is installed, but the tracing is not, and you are running from the sandbox, you would see this behavior as well.  Are you running from the sandbox?

Chris

May 28, 2010 at 1:02 PM

Hi,

thank you for testing.

I am not running from the sandbox.

I guess that the essential difference might be your standalone install. Could you test in a 2008 farm installation too? It might be a stupid misconfiguration on my side but I thought that I installed everything according to the official docs.

Thanks

tobey

Coordinator
May 28, 2010 at 1:06 PM

We'll try to get this into our matrix.  We do have testing with W2KR2 in the farm in the matrix.

Jun 3, 2010 at 3:55 PM

Hi,

did you get any more insights during testing?

Thanks

tobey

Coordinator
Jun 3, 2010 at 5:11 PM

We have the SQL Server 2008 configuration on our matrix, but it is the lowest priority and we have not hit it yet.  We will try to get to it but have not yet.  We have tested farm using R2 and it is working.

Jun 10, 2010 at 2:17 PM

Hi,

I have run tests on a 2008 server SP2 with SharePoint 2010 RTM Standalone and I can confirm that logging works with this configuration. Logging in a 2008 farm still does not work.

tobey

Coordinator
Jun 10, 2010 at 2:36 PM

OK, thanks for doing the validation Tobey.  I'll forward this to the test team.

Coordinator
Jun 18, 2010 at 1:59 AM

Tobey - we have not bee able to reproduce your problem.  We have tested on a farm configuration with the following setup successfully:

 System Configuration:

OS  : Windows 2008 SP2

SP   : Enterprise Edition with Server Farm and complete installation

VS   : 2010 Ultimate RTM

SQL : 2008 Enterprise edition.

 


Oct 12, 2010 at 9:13 AM
tobey wrote:

Hi,

I have the following problem on my SharePoint 2010 Dev environment with SPG Drop 8: TraceToDeveloper doesn't work when it's called from a webpart or an application page. My scenario in detail:

  • I have a console application and a webpart to test the SPG Logger; both are currently executed with admin-rights
  • Logging to the Event-Log works for both, the console application and the webpart
  • Logging to the ULS-Logs works for the console application but not for the webpart
  • stepping through the SPG Code didn't give me any hints; I get no exception, code steps through and ends with call of SPDiagnosticsServiceBase.WriteTrace
  • I guess, that it might be a permission problem, but giving full access to everyone on 14\LOGS didn't solve the problem

Thanks for help

Tobey

Hi Tobey.  I had a very similar issue.  Turns out I had to make the web application pool account a member of the 'Performance Log Users" group.  TraceToDeveloper worked from my Central Admin pool account which was a member of "Performance Log Users".  It didn't work from my content web app pool account until I made it a member of "Performance Log Users".  I did a quick online search for information on this group membership requirement for ULS logging but didn't find much.  My SPG discussion thread on this is: http://spg.codeplex.com/Thread/View.aspx?ThreadId=230312.

Cheers,
Steve