If you want to embed source code (e.g. C#, HTML..) to your blog post I recommend to use Gist https://github.com/. Especially if you want to give your readers the opportunity to copy and paste your code.
I guess you must be familiar with what is HttpModule and how can we leverage it for our web applications. But if not, better have a good read of this article . SharePoint is built on top of .NET, so it has all the rights to use the beauties of .NET. Here I want to demo a simple case of httpmodule on SharePoint. Say if in a company it has lots of site collections and user 'Picky Docky' has access for all of them, for a reason farm administrator want to block him for one of the specific site without change his SharePoint permissions. Here are the steps to do it:-) Create a empty SharePoint solution add a class file to it named CustomSecurityModule.cs , code as below Create a feature and scope to "WebApplication" Create a feature receiver. Code as below When activate the feature it will create a modle in the web.config file for the SharePoint web applicaiton you deployed to as below: Enjoy!
Comments
Post a Comment