Posts

Showing posts with the label w3wp

SharePoint 2010 / Debug - Locating Active SharePoint Process (W3WP.exe)

Often times you may be looking at debugging SharePoint custom code and need to attach the debugger to a process. The process list may list several instances of W3WP.exe. To locate which instance you are particularly using, you can go to the command prompt and run "%systemroot%\system32\inetsrv\appcmd list wps". The following cmdlet loops to allow me to quickly refresh the net services list, which is useful after an IIS reset. :loop cls %systemroot%\system32\inetsrv\appcmd list wps pause goto loop

SharePoint 2010 / MSOCAF - Use the Anti-XSS library to properly encode the data before rendering it

If you have the following error: Use the Anti-XSS library to properly encode the data before rendering it You will need to visit the Microsoft Download Center and download and install, at least, AntiXSS Library v4.2, from http://www.microsoft.com/download/en/details.aspx?displaylang=en&id=28589 . In your solution, you will need to add the reference, for AntiXSSLibrary, located wherever it was installed, in my system, at "C:\Program Files (x86)\Microsoft Information Security\AntiXSS Library v4.2\NET35\AntiXSSLibrary.dll". using Microsoft.Security.Application; // AntiXSS.HtmlEncode, has been recently deprecated. string strProperty = Encoder.HtmlEncode(Request["Property"]);