Showing posts with label Architecture Design. Show all posts
Showing posts with label Architecture Design. Show all posts

Monday, January 04, 2016

Mastering Azure Architecture

Hi All,

I'd like to share a great resource for Architects, Engineers, Business decision managers on how to architect solutions at scale in Microsoft Azure.

The website contains architecture blueprints for architect solutions in 2D and 3D.


The website contains diagrams to build cloud solutions fast and scenarios that have been used to build various solutions in Azure so you can use those in building your solutions.


Website url: https://msdn.microsoft.com/en-us/dn630664.aspx 

Enjoy!

Monday, February 10, 2014

How to get the url for a SharePoint EndPoint hosted in a Service Application

Hi All,

This blog post is for SharePoint exposed EndPoints through Service Applications. If you are developing or deploying a custom Service Application in SharePoint 2010/2013 and you are exposing a WCF EndPoint Service EndPoint through the service application this blog post is helping you how to identify and get the Url for the exposed WCF EndPoint.

You need to test and make sure that the service application is working properly before checking any client application or webpart code that is consuming or integrating with this endpoint. Specially, if your endpoint might be having issues related to assembly dependencies or missing files that causes the service application to throw exceptions when it is being called from the client applications.

When you develop a service application in VS 2012/2013, the service application creates an application pool in the IIS, since you give it a name when you install it, and this expose a service instance where you can access it through a url!

To develop Service application for SharePoint 2010/2013, I strongly recommend this starter kit since it gives you a lot of ground work is done for you and you just need to code your logic in it.

http://chocolatey.org/packages/sastarterkitvs2012

Great shout out to Adam Toth !

So the question that needs an answer is:

What is the Url for the exposed WCF end point service that is hosted in a SharePoint Service Application?

1) You need to know the Service Application GUID that is installed in your farm, to do this Open SharePoint PowerShell and write below cmdlet:

Get-SPServiceApplication | select id,name

This will list all deployed service applications and provides the Service Application GUIDs.



2) Open IIS Manager, Expand SharePoint Web Services.
3) Look for the GUID that is associated with your service application.
4) Select the your endpoint and click on the browse from the IIS manager right pane.
5) Add the endpoint name "WcfEndPoint.svc" to the url !

http://localhost:32843/c20d8cbe444f4334a212ccba687dfbd7/MYWCFEndPoint.svc

Enjoy!









Monday, February 03, 2014

Web Part or Web Form Control on this Page cannot be displayed or imported. while adding a custom webpart in SharePoint 2013

Hi All,

I was developing a custom SharePoint web part for SharePoint 2013 using VS 2013, after i deployed the wsp and when i was adding the web part, i was getting the following error message:

Web Part or Web Form Control on this Page cannot be displayed or imported. The type could not be found or it is not registered as safe.


This is a common SharePoint error when you try to load custom user controls (or Visual Web Parts) into a SharePoint page. 

Any custom control has to be added as a safe control in SharePoint, before VS 2013 we used to add entries in the site web.config or code to add the safe control either programmatically to the site. but you do not need to do this in Visual Studio 2013 since it has a tool to add safe controls through a UI by specifying the namespace and the type and your control will be loaded with no issues or errors.

In VS 2013, follow these steps:

1) Double click on the package item.
2) Under Advanced tab.
3) If the custom control exists in an assembly so when you add the assembly that contains your user control click on add safe control button and specify your assembly & type for their user control.
Or even if the custom control is contained in a project within your solution, so when you add the project output in the package explorer UI, you can still add the user control as a safe control by specifying the namespace and type fields.

4) Safe the changes, build and deploy.
5) Refresh the SharePoint page.
6) Add your custom web part and you will not get the error message.

Enjoy!


Friday, March 29, 2013

How to enable MS Dynamics CRM 2011 to integrate with Windows Azure

Hi,

I'm writing this article to explain a good architecture design for integrating your Microsoft Dynamics CRM 2011 with windows azure.

Let's  say you have on-premise CRM 2011 instance, and you want to use Windows Azure Blob storage to store Customer's documents on the cloud. How would you do that ?

The example i'm giving is applicable to any other windows azure service such as: SQL Azure, Mobile Notification Service, AppFabric Features..etc.

Since Windows azure is a scalable Cloud platform, you can easily integration your CRM 2011 with the windows azure on the cloud in 4 main steps.

Before going through the details, I'd like to explain the architecture of the proposed solution.

MS CRM 2011 has a backend windows service called "CRM Asynchronous Service" this is the component that will be in charge to communicate with the windows azure through a service bus.

MS CRM 2011 has 2 types of plugins, out-of-the box (OOB) and custom plugins. The OOB plugins runs  with full trust but the custom plugins runs with partial trust, and we will develop a custom plugin to connect to a listener through azure service bus.

The solution has the following components:

1) Configure CRM to be Windows Azure Aware.

2) We need to configure a service bus on Azure with an endpoint to communicate with the CRM server.

3) A listener hosted in Windows Azure to communicate with the asyncrhounous service, specificially listening to CRM assembly "Microsoft.Xrm.Sdk" with RemoteExecuteContext defined. so we need to develop a listener and deploy it on windows azure.

4) A custom CRM Plugin to communicate with the Windows Azure Listener.


How To accomplish, configure and develop this solution:

1) To accomplish step 1 , "Configure CRM for Integration with Windows Azure" :
http://technet.microsoft.com/en-us/library/gg328249.aspx

2) To accomplish step 2, "Configure Windows Azure ACS on Azure" :
http://technet.microsoft.com/en-us/library/jj863635.aspx

3) How to write a windows azure listener:
http://technet.microsoft.com/en-us/library/gg309615.aspx

C# Sample code - Listener:
http://technet.microsoft.com/en-us/library/gg309657.aspx

4) To accomplish step 4, "How to write Azure Aware CRM Plugin":
http://technet.microsoft.com/en-us/library/gg328194.aspx

Note, if you want to develop a custom workflow activity:
http://technet.microsoft.com/en-us/library/gg327854.aspx

Registration step - FINAL:
http://technet.microsoft.com/en-us/library/gg328524.aspx


**Here is some sample code for all what i mentioned above "listeners & plugins":
http://technet.microsoft.com/en-us/library/gg334712.aspx

Note: you should be having CRM SDK and Windows Azure SDK 1.7 or higher to be able to exercise and develop the solution.

Hope this helps.


Reference:
-Azure Extensions for Microsoft Dynamics CRM 2011:
http://technet.microsoft.com/en-us/library/gg309276.aspx



 

Wednesday, November 02, 2011

User Profile Synchronization in SharePoint 2010 Facts

Hi Folks,

I'd like to share with you some important facts about User Profile synchronization in SharePoint 2010. SharePoint 2010 has User Profile Service application which provides a two-way synchronization for users/groups from your directory services or any external system in sync with SharePoint 2010 users and groups profiles.

Terms used in this post:
* UP: User Profile.
* UPSSA: User Profile Synchronization Service Application.
* UPSS: User Profile Synchronization Service.

Here are some facts you should be aware when you start planning for user profiles in SharePoint:
1) SharePoint 2010 has User Profile Service Application which manage the synchronization process between SP and AD or any external system that contains users & groups.

2) SP 2010 provisions a version of Microsoft Forefront Identity Manager to participate in synchronization.

3) UPSSA can only have one user profile synchronization service.

4) A UPSS is associated with connections and mappings.

5) We divide connections in UPSS into two types: connections to directory services, and connections to business systems.

6) When you setup a connection in UPSS to connect to directory services, You specify which containers to be included in the synchronization. You can specify filters to exclude service or disabled accounts.

7) Mapping is a step to map SharePoint user profile fields to directory services/external system user profile master data fields.

8) Upon each synchronization, SharePoint deletes SP users who have been deleted from Directory services.

9) Upon each synchronization, SharePoint add and updates SP user profile's fields as configured in the UPSS.

10) IMPORTANT: If you have multiple directory services, each directory services MUST provide unique users. You can't synchronize a single user with multiple directory services.

11) IMPORTANT: You can populate properties from any existing business system. You can't create new user profiles from an external system, and you can't write data back to a business system.

12) To synchronize properties from external system, First you should create an external content type to bring data from the business system into SP 2010. Then you will be able to synchronize these users into SP.

13) You should have a key field to be used for mapping between SP user profiles and your external system. You can use employee's work email as the identifier of your external content type. In this case, SP will synchronize information which matches employee's email to be captured in your synchronization records.

14) You can build a custom solution using SP object model to create user profiles in SharePoint.

Hope this helps.


References:
1) Profile Synchronization overview in SP 2010:
http://technet.microsoft.com/en-us/library/gg188041.aspx
2) BCS Overview in SP 2010:
http://technet.microsoft.com/en-us/library/ee661740.aspx



Friday, May 28, 2010

Developing/Deploying ASP.NET Web Application in SharePoint 2007 under _layouts folder

Hi Folks,

This post i will walkthrough the steps required to create and deploy asp.net web application under _layouts folder in sharepoint 2007. Also note that this application is different than the MSDN article to build asp.net 2.0 website in sharepoint 2007, since this article only works if you copy the whole project ( with .cs files ) under website folder in layouts directory which is not recommended and not a best practice.

In this article i will go through the steps to create a web application with sharepoint master page and to deploy the web application dll in GAC as well.

1) Open your VS 2008, and select ASP.NET web application template.
2) Add Microsoft.Sharepoint.dll in your project references.
3) Create a folder in your project called _layouts, the purpose of this project is to have a dummy masterpage that let you develop your custom pages with sharepoint site master page and the pages will pick the site masterpage at runtime.
4) To get a dummy application.master, get it from this link:
http://cid-4bc94054914a6469.skydrive.live.com/self.aspx/Blog%20Code/application.master

5) Right click on your project to sign your assembly of the web application, since this dll will be in GAC.

6) Open the default.aspx page that you have and update the following:



<%@ Assembly Name="<span style="font-weight:bold;">ASSEMBLYNAME</span>, Version=1.0.0.0, Culture=neutral, PublicKeyToken=<span style="font-weight:bold;">b1be248cde129fd5</span>" %>

<%@ Page Language="C#" AutoEventWireup="true"  Inherits="<span style="font-weight:bold;">NAMESPACE</span>._Default" MasterPageFile="~/_layouts/application.master" %>



<asp:Content ID="Content1" ContentPlaceHolderId="PlaceHolderMain" runat="server">

    <div>

    Title of this site: <asp:Label ID="LabelTitle" runat="server" Text="Label">

    </asp:Label>

    </div>

</asp:Content>

<asp:Content ID="Content2"

ContentPlaceHolderId="PlaceHolderPageTitleInTitleArea" runat="server">

Test My ASP.NET Web Application

</asp:Content>




To download the sample page, here is the link:
http://cid-4bc94054914a6469.skydrive.live.com/self.aspx/Blog%20Code/home.aspx


Note: all your pages have to have 3 content controls that mimics the contentplaceholder that you have on your custom masterpage or sharepoint out of the box master page.

Tip: to get the public key token, just drag and drop your dll in GAC and right click on your assembly in your gac folder ( c:\windows\assembly) and you will get the public key token that you need to paste on all your pages.

7) To change the master page to your pages to the sharepoint master page, write the following method on your .cs file of your page:

protected override void OnPreInit(EventArgs e)
{
base.OnPreInit(e);

SPWeb Web = SPContext.Current.Web;
this.MasterPageFile = Web.MasterUrl;
}



8) One you are done, publish your website using publishing feature on your web application, right click on the web application and click on publish.

set the url of the web application to be under LAYOUTS folder in sharepoint.


9) Last, Deploy the web application dll file in GAC, you can create a feature for that, for development purposes, just drag and drop the webapplication.dll in your GAC under c:\windows\assembly folder.


10) Navigate to your test page and will see it works perfect, url for example :
http://SHAREPOINTSITE/_layouts/WEBSITEFOLDER/home.aspx


Hope this helps.

Regards,
Mostafa Arafa

Tuesday, December 29, 2009

SharePoint Saturday - EMEA Event

Hi All,

Good News !!! First SharePoint Saturday @ EMEA will be held on 23 Jan 2010, If you are a sharepoint fan/developer/architect or Administrator, I encourage you to attend SharePoint Saturday online event, here is the link for the registration:

http://20100123-spsemea.eventbrite.com/

Speakers List:
http://www.sharepointsaturday.org/emea/Pages/speakers.aspx


I'm going to be a speaker on this event, meet you there.

My Session Info:

Session Topic : SharePoint 2010 Development Tips & Tricks
This session will cover the new development model for SharePoint 2010 and the new architecture design for the sharepoint foundation and the client object model.
The session will cover also other tips and tricks when developing sharepoint solutions and the best practices to following when developing sharepoint custom components and more....

Meet you there. Thanks.

Wednesday, January 28, 2009

ASP.Net MVC RC1 is available now

Hi all,

Long time waiting for this new baby,ASP.Net MVC (Model View Controller) RC1 is available now to download,and the final release will be there soon,this is a big SHIFT for all web developers.

New Architecture design for our web application will be implemented using this new pattern,i suggest if you didn't know enough information about Model View Controller Pattern,see below link :

http://www.c-sharpcorner.com/UploadFile/napanchal/MVCDesign12052005035152AM/MVCDesign.aspx

once you understand the purpose and the use of it for your enterprise project,here you can see the new features for RC1:

http://weblogs.asp.net/scottgu/archive/2009/01/27/asp-net-mvc-1-0-release-candidate-now-available.aspx

Happy times with .Net

Regards,
Mostafa arafa

Friday, January 16, 2009

New Edition of Patterns and Best Practices Application Architecture Guide

Hi Folks,

New Edition V2.0 has been released from patterns and best practices application architecture Team,This Guide is very important for Architect & senior Designer and Developer who are building and design Complex Enterprsie Projects and Application using .Net Technology.

The book is showing the following:
1) Different patterns for design your applications (Web,Mobile,RIA).
2) Layering and Tiers in .Net.
3) SharePoint LOB Applications.
4) How to build Services using different technologies in .Net.
5) Deployment scenarios in .net.

Download link:
http://www.codeplex.com/AppArchGuide/


I recomment every one to read it to follow the best practices and avoid common pitfalls in your design.

Regards,
Mostafa arafa