2

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?

1 Answer 1

2

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)

2
  • 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
    Commented Jun 27, 2012 at 6:07
  • have you tried sending logs via a Console - just to validate that indeed Logging is properly functioning. Commented Jun 27, 2012 at 15:13

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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