Show SharePoint User Profile Image Without My-site Login


 Assume that you have a team site in the following URL and you have my-site web application at the following URL

 When you open your team site at without login to my-site, all users’ profile images will be shown as a cracked images until you logged into my-site web application or the windows authentication will be requested twice for the same reason. Continue reading

Use Signalr with SharePoint Webparts


Update 1: Download sample source code at!Ao7Q-78sQy60gcdrmHFyndmR_HWEMQ

Last month I got a task to make Signalr working on SharePoint environment. As all developers used to do on starting new tasks, I started my task with a search on Google to know how people made this task. I have found a lot of blogs speaks about that , however I didn’t get my answer as all people use SharePoint App-part in doing such scenario but no one made it on SharePoint web-part

It is totally different scenarios to use Signalr in app-part and web-part. App part simply is a separated ASP.NET and you can easily configure it away from SharePoint environment. To use Signalr in web-part or SharePoint user control you have to make extra configurations for Signalr and OWIN that are configured by default on ASP.NET web application. This made me deep dive into Signalr and OWIN architecture and make it work on SharePoint

Continue reading

Necessary of SharePoint Specific Antivirus Product


To ensure your website is secure from viruses and other malicious files, you must install an effective antivirus product. Malicious files could be uploaded via any missing validation on upload file controls or any other Vulnerability.

All antivirus monitor the hard disk and scan files periodically for any changes then alert you about these viruses. This is a good idea to make your website files safe, but what if your website saves the uploaded files into database? The answer is antivirus has no control on these files and you can’t detect you have a malicious files on you website

SharePoint saves contents including files into content database so you need to install SharePoint specific antivirus product that scan the files before saving it into the content database. Microsoft Forefront has such plugin that protect your SharePoint farm against malicious files. Continue reading

Service Locator Pattern In C#


Have you ever use ASP.NET membership provider? All ASP.NET developers know what is the membership and what is the membership provider. They can easily use one of the providers shipped with .NET framework, they can use a provider shipped with a certain product or they can build their own provider. The behind scene for this functionality is a design pattern called Service Locator. Service Locator Design Pattern is a very useful design pattern to make your software extensible and maintainable. Actually  there are many benefits push you to use this approach especially on the big systems as you can separate any part (Service) of your system and test it, re-implement it and deploy it without affect other running parts of the system because of the loosely-coupled relationship between Application and Service Implementation. We can summarize some its benefits as following:

  1. Perform unit-test in a easier way even on the production servers
  2. Make your Application extensible by a third parties
  3. Maintain your Application in a easier way
  4. Provide your customer by updates and hot-fixes that can be deployed without a complete new build

Continue reading

SharePoint Logging Mechanism


 Logging useful information, Events and Exception is a core value for all software applications. Imagine that on a real world there are one organization used to log every information within a defined business process for reporting and another one leverage ad-hoc process which allow employees to deal with situations without any defined procedures for reporting to higher management. In the first style, management can monitor and improve its weaknesses by defining their weaknesses and failure points flagged by continuous monitoring  and back to the causes of these weaknesses. On the other side the second style, management never improve its weaknesses simply because they never know what are their weaknesses, when one weakness eventually is raised they couldn’t treat it although it might cost organization lot of money and loose customer trust.

 Software Applications are similar to organizations no one can know what happen inside it unless there is a rich dashboard to monitor its performance. In a software application system administrators are the top management of the product and the dashboard is the tools that help them to  monitor and define weaknesses and failure points.

 SharePoint has a very efficient technique to provide system administrator with the required information to monitor the system and provide developers with tracing information to use in solving issues. Developers also can use the SharePoint Logging System in their own customized  solution to provide system administrators a greet vision of monitoring and tracing. In this post we will speak on a brief about structure and how to use SharePoint logging System. Continue reading