System.Net Tracing and SharePoint Crawl September 2, 2012
http://support.microsoft.com/kb/947285
Scenario 2: Troubleshooting search and crawl issues
When you troubleshoot search and crawl issues, you may receive one or both of the following error messages in the Crawl log:
- Create a text file that is named Owstimer.exe.config in the following folder:
%CommonProgramFiles%\Microsoft Shared\web server extensions\12\BIN
- In the Owstimer.exe.config text file, paste the following XML data.
<configuration>
<system.diagnostics>
<sources>
<source name=”System.Net” tracemode=”includehex” maxdatasize=”1024″>
<listeners>
<add name=”System.Net”/>
</listeners>
</source>
<source name=”System.Net.Sockets”>
<listeners>
<add name=”System.Net”/>
</listeners>
</source>
<source name=”System.Net.Cache”>
<listeners>
<add name=”System.Net”/>
</listeners>
</source>
</sources>
<switches>
<add name=”System.Net” value=”Verbose”/>
<add name=”System.Net.Sockets” value=”Verbose”/>
<add name=”System.Net.Cache” value=”Verbose”/>
</switches>
<sharedListeners>
<add name=”System.Net”
type=”System.Diagnostics.TextWriterTraceListener”
initializeData=”network.log”
/>
</sharedListeners>
<trace autoflush=”true”/>
</system.diagnostics>
</configuration>
System.Net configuration for network tracing.
System.Net Tracing February 13, 2012
http://msdn.microsoft.com/en-us/library/bb885203.aspx
asmx tracing.
http://msdn.microsoft.com/en-us/library/ms733025.aspx
WCF tracing
<system.diagnostics>
<sources>
<source name=”System.Net” tracemode=”includehex” maxdatasize=”1024″>
<listeners>
<add name=”System.Net”/>
</listeners>
</source>
<source name=”System.Net.Sockets”>
<listeners>
<add name=”System.Net”/>
</listeners>
</source>
<source name=”System.Net.Cache”>
<listeners>
<add name=”System.Net”/>
</listeners>
</source>
<source name=”System.ServiceModel.MessageLogging” switchValue=”Warning, ActivityTracing, Verbose” >
<listeners><add name=”ServiceModelTraceListener”/>
</listeners>
</source>
<source name=”System.ServiceModel” switchValue=”Warning,ActivityTracing”>
<listeners>
<add name=”ServiceModelTraceListener”/>
</listeners>
</source>
<source name=”System.Runtime.Serialization” switchValue=”Warning,ActivityTracing”>
<listeners>
<add name=”ServiceModelTraceListener”/>
</listeners>
</source>
<source name=”System.Web.Services.Asmx”>
<listeners>
<add name=”AsmxTraceFile” type=”System.Diagnostics.TextWriterTraceListener” initializeData=”C:\temp\asmx.log” traceOutputOptions=”LogicalOperationStack, DateTime, Timestamp, ProcessId, ThreadId” />
</listeners>
</source>
</sources>
<switches>
<add name=”System.Net” value=”Verbose”/>
<add name=”System.Net.Sockets” value=”Verbose”/>
<add name=”System.Net.Cache” value=”Verbose”/>
<add name=”System.Web.Services.Asmx” value=”Verbose” />
</switches>
<sharedListeners>
<add name=”System.Net” type=”System.Diagnostics.TextWriterTraceListener” initializeData=”C:\temp\network.log”/>
<add initializeData=”C:\temp\wpf.svclog” type=”System.Diagnostics.XmlWriterTraceListener” name=”ServiceModelTraceListener” traceOutputOptions=”Timestamp”/>
</sharedListeners>
<trace autoflush=”true”/>
</system.diagnostics>
<system.net>
<defaultProxy>
<proxy usesystemdefault=”False” bypassonlocal=”True” proxyaddress=”http://127.0.0.1:8888“/>
</defaultProxy>
</system.net>
http://mkdot.net/blogs/dejan/archive/2008/10/23/wcf-tracing-and-message-logging.aspx
And to get message details logged as well then need an additional node.
<configuration> <system.serviceModel> <diagnostics> <messageLogging logEntireMessage=”true” logMalformedMessages=”true” logMessagesAtServiceLevel=”true” logMessagesAtTransportLevel=”true” maxMessagesToLog =”1000″ maxSizeOfMessageToLog=”524288″/> </diagnostics>
http://stevenhollidge.blogspot.com/2011/03/how-to-enable-tracing-for-wcf-service.html
Generate the required WPF trace entries in web.config by using Visual Studio project.
<system.diagnostics> <sources> <source name=”System.Net” tracemode=”includehex” maxdatasize=”1024″> <listeners> <add name=”System.Net”/> </listeners> </source> <source name=”System.Net.Sockets”> <listeners> <add name=”System.Net”/> </listeners> </source> <source name=”System.Net.Cache”> <listeners> <add name=”System.Net”/> </listeners> </source> <source name=”System.ServiceModel.MessageLogging” switchValue=”Warning, ActivityTracing”> <listeners> <add type=”System.Diagnostics.DefaultTraceListener” name=”Default”> <filter type=”" /> </add> <add name=”ServiceModelMessageLoggingListener”> <filter type=”" /> </add> </listeners> </source> <source name=”System.ServiceModel” switchValue=”Warning,ActivityTracing”> <listeners> <add name=”ServiceModelTraceListener”/> </listeners> </source> <source name=”System.Runtime.Serialization” switchValue=”Warning,ActivityTracing”> <listeners> <add name=”ServiceModelTraceListener”/> </listeners> </source> </sources> <switches> <add name=”System.Net” value=”Verbose”/> <add name=”System.Net.Sockets” value=”Verbose”/> <add name=”System.Net.Cache” value=”Verbose”/> </switches> <sharedListeners> <add name=”System.Net” type=”System.Diagnostics.TextWriterTraceListener” initializeData=”C:\temp\network.log”/> <add initializeData=”C:\temp\searchservice.svclog” type=”System.Diagnostics.XmlWriterTraceListener” name=”ServiceModelTraceListener” traceOutputOptions=”Timestamp”/> <add initializeData=”c:\temp\app_messages.svclog” type=”System.Diagnostics.XmlWriterTraceListener, System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089″ name=”ServiceModelMessageLoggingListener” traceOutputOptions=”Timestamp”/> </sharedListeners> <trace autoflush=”true”/> </system.diagnostics> <system.net> <defaultProxy> <proxy usesystemdefault=”False” bypassonlocal=”True” proxyaddress=”http://127.0.0.1:8888″/> </defaultProxy> </system.net> </configuration>
http://msdn.microsoft.com/en-us/library/aa751795.aspx
Walk through of WCF tracing. With screenshots. To explain the output.
http://msdn.microsoft.com/en-us/library/ms751526.aspx
Tracing web.config entries.
Remote Access Alternatives Using SharePoint January 29, 2012
http://blogs.msdn.com/b/stcheng/archive/2008/12/17/wss-use-rpc-protocol-to-access-wss-v3-site.aspx
RPC examples.
Trace SharePoint Designer
http://sharepointinterface.com/2009/12/28/sharepoint-webdav-and-a-case-of-the-405-status-codes/
Interesting problem with WebDav calls not working because IIS7 had web dav publishing enabled.
http://www.microsoft.com/download/en/details.aspx?displaylang=en&id=17481#instructions
GetUsage BLOB RPC call.
http://sharepointfieldnotes.blogspot.com/2009/09/uploading-content-into-sharepoint-let.html
(1) Copy.asmx file upload.
Byte array can have contiguous memory allocation problems on the server.
(2) WebDav (WebClient) file upload
No metadata can be uploaded.
(3) RPC (FrontPage) file upload
However, it does not support sending any metadata long with the file content. This can be a major problem if the document library has multiple content types, so the new file will be put into the document library with the default content type. Another big issue is if the default content type has required fields. The file will remain checked out until the fields are populated. This prevents other users from seeing the document or from being returned in any searches. It is a great solution if you are just bulk migrating data from an external data store to SharePoint. You more than likely will have to do extra work afterwards. Adding metadata after uploading will also cause the creation of extra versions of the document being created unnecessarily. The fact that it does not use the soap protocol but straight http makes it more scalable than the copy web service. Unfortunately, it still suffers from the fact that it uses a byte array to upload the file. So sooner or later you will run into “out of memory “ exceptions. So how can I create a folder before using WebDav? You can use the lists web service to accomplish this:
WCF Debugging September 25, 2011
http://support.microsoft.com/kb/947285
How to enable System.NET tracing for the Office SharePoint Server Search service
// To enable System.NET tracing for the Office SharePoint Server Search service (OSearch), follow these steps:
- Create a text file that is named Mssdmn.exe.config in the following folder:
%ProgramFiles%\Microsoft Office Servers\12.0\Bin
The contents of the Mssdmn.exe.config file are the same as the example of the Owstimer.exe.config, except for the initializeDataattribute. Rename this attribute to create a log file name that is specific to the Mssdmn.exe process, as in the following example.
initializeData="C:\\Tracing\\MSSDMN_SNtrace.log"
- Restart the Office SharePoint Server Search service. To do this, either use the Services MMC snap-in or type the following command in a Command Prompt window:
net stop osearch & net start osearch
<system.diagnostics>
<sources>
<source name=”System.Net” tracemode=”includehex” maxdatasize=”1024″>
<listeners>
<add name=”System.Net”/>
</listeners>
</source>
<source name=”System.Net.Sockets”>
<listeners>
<add name=”System.Net”/>
</listeners>
</source>
<source name=”System.Net.Cache”>
<listeners>
<add name=”System.Net”/>
</listeners>
</source>
</sources>
<switches>
<add name=”System.Net” value=”Verbose”/>
<add name=”System.Net.Sockets” value=”Verbose”/>
<add name=”System.Net.Cache” value=”Verbose”/>
</switches>
<sharedListeners>
<add name=”System.Net”
type=”System.Diagnostics.TextWriterTraceListener”
initializeData=”d:\temp\network.log” />
</sharedListeners>
<trace autoflush=”true”/>
</system.diagnostics>
http://www.3guysonsharepoint.com/?p=240
<system.diagnostics> <sources> <source name="System.ServiceModel.MessageLogging" switchValue="Warning, ActivityTracing" > <listeners><add name="ServiceModelTraceListener"/> </listeners> </source> <source name="System.ServiceModel" switchValue="Warning,ActivityTracing"> <listeners> <add name="ServiceModelTraceListener"/> </listeners> </source> <source name="System.Runtime.Serialization" switchValue="Warning,ActivityTracing"> <listeners> <add name="ServiceModelTraceListener"/> </listeners> </source> </sources> <sharedListeners> <add initializeData="C:\temp\searchservice.svclog" type="System.Diagnostics.XmlWriterTraceListener" name="ServiceModelTraceListener" traceOutputOptions="Timestamp"/> </sharedListeners> </system.diagnostics>Tracing for Business Connectivity Services August 31, 2011
http://technet.microsoft.com/en-us/library/ff700209.aspx
Enable Business Connectivity Services tracing
To enable Microsoft Business Connectivity Services tracing you create a custom data collector set, specify the trace providers that are related to Microsoft Business Connectivity Services, and provide the location for saving the trace logs.
WCF Tracing August 20, 2010
http://msdn.microsoft.com/en-us/library/ee517292.aspx
Web.config change.
http://tnbluesboy.wordpress.com/2010/07/15/how-to-enable-tracing-for-sharepoint-2010-claims/
Download and install the Service Trace Viewer Tool (SvcTraceViewer.exe). This will be available with the .Net 3.5 or 4.0 SDK.
Navigate to C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\14\WebServices\Root\.
This is the location of the Web.Config file for the IIS Web Site that hosts the SharePoint 2010 Secure Token Web Service.
Open Web.Config in your finest XML editor. I prefer Visual Studio 2010.
Add the following lines of config code:
FIM Trace Log July 23, 2010
http://msdn.microsoft.com/en-us/library/ff357801.aspx
The following guidelines are specific to using the tool with FIM:
•When you open a trace file, you might receive an error that is caused by the fact that the XML Trace Source does not write the closing XML tags until FIM closes. You can ignore this warning.
•FIM activities have an ID of “000000000” in the Service Trace Viewer. FIM activity tracing is not enabled. The other activities come from Windows Communication Foundation (WCF), and they relate to message transactions.
After you make changes to the Microsoft.ResourceManagement.Service.config.exe file, save the configuration changes and restart the FIM service.









