Blog Archives

Prevent CSRF (Cross Site Request Forgery) Attacks in SharePoint Application Pages.

Cross-Site Request Forgery (CSRF) is an attack outlined in the OWASP Top 10 whereby a malicious website will send a request to a web application that a user is already authenticated against from a different website.  Much detailed & better

Posted in C#, Sharepoint 2010

Get maxPwdAge for a Domain in AD.

Get Domain level directory entry with username/password, get the property value for ‘maxPwdAge‘ (which would be System.__ComObject) Convert System.__ComObject to datetime/int. We have to use COM Interop Libraries for this one, ActiveDs.dll (you can find it on the web) For

Posted in Active Directory, C#

Anonymous Custom Application Pages in SharePoint Sites.

We sometimes want custom application pages in SharePoint solution , which needs to be enabled for anonymous access, for example: SiteLogin.aspx or AppError.aspx. By default, when we create an custom application page in visual studio in a SharePoint 2010 solution,

Posted in C#, Sharepoint 2010