Take the 2-minute tour ×
SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. It's 100% free, no registration required.

I am developing a Silverlight application which is to be hosted on a sharepoint 2010 page using the out of the box Silverlight webpart control. I want to log any exceptions to the sharepoint ULS logs which arise from the silverlight webpart.

I tried using the SharePointDiagnostics.SendClientScriptErrorReport method. However, I am getting an error regarding client certificate.

What do I need to do to fix this?

share|improve this question
add comment

1 Answer

You could use the Diagnostics service (http://YourSite/_vti_bin/Diagnostics.asmx) as explained here http://msdn.microsoft.com/en-us/library/websvcdiagnostics.sharepointdiagnostics.sendclientscripterrorreport.aspx from any Client technology (Silverlight or Javascript), but it seems you would need to add the clientaccesspolicy.xml to allow access to the web service as explained here (http://msdn.microsoft.com/en-us/library/cc197955(VS.95).aspx) containing

<?xml version="1.0" encoding="utf-8"?>
<access-policy>
 <cross-domain-access>
   <policy>
     <allow-from http-request-headers="*">
       <domain uri="*"/>
     </allow-from>
     <grant-to>
       <resource path="/" include-subpaths="true"/>
     </grant-to>
   </policy>
 </cross-domain-access>
</access-policy>

in your C:\inetpub\wwwroot\wss\VirtualDirectories\80 (assuming you run on port 80)

share|improve this answer
    
Initially had to Hard code the Credentials as it was giving me an 401 Unauthorized error . Later on it works fine and SendClientErrorReport method from the Diagnostic service seems to complete with no error but the error is not logged in the 14\Logs folder –  Manoj Jun 27 '12 at 6:07
    
have you tried sending logs via a Console - just to validate that indeed Logging is properly functioning. –  C. Marius - MVP Jun 27 '12 at 15:13
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.