Amazon Web Service – VPC with Public and Private Subnets – Practical

This post and the attached document will provide you all the required information you need to know about Amazon VPC and how to set up VPC with Public and Private Subnets. The document is enriched with screenshot taken from live AWS console.

Download the document from link and enjoy, do let us know your views and feedback if any.

Amazon Web Services – VPC with Public and Private Subnets – Practical

Thanks

Hardeep

External ASPNET Membership Database & Sitecore

This blog explains how to integrate external aspnet membership database (EAMDb) with Sitecore.

If your sitecore implementation requires,

  • Integration with external aspnet membership database.
  • You do not want to import / merge your users and roles from EAMDb into core database.

Then this blog will help you achieving it. Inspiration to write this blog was from one of the post in sitecore forums . Thanks for Vik Jairath for raising such a post.

Configuration

I have divided the implementation into following steps,

  • Adding Domain in domains.config
  • Adding a Connectionstring
  • Adding domain-provider mappings in web.config
  • Configuring the providers in web.config

Adding Domain in domains.config

Add and entry into app_config\security\Domains.config file for e.g. as follows,

<domain name=”extaspnet” ensureAnonymousUser=”false” />   

Adding a connectionstring

In order to connect sitecore to the EAMDb specify a connection string into app_config\ ConnectionStrings.config. It should be something like,

<add name=”dbaspnetmembership” connectionString=”user id=****;password=****;Data Source=****;Database=****”/>

Adding Domain-Provider mappings in web.config

In web.config file browse to <sitecore >/<switchingProviders>/ element.

This section contains two groups for the three membership providers i.e. <membership> and <roleManager>. Add following line to <membership> group

<provider providerName=”memproextaspnetdb” storeFullNames=”false” wildcard=”%” domains=”extaspnet” />

Add following line to <role> group

<provider providerName=”memproextaspnetdb” storeFullNames=”false” wildcard=”*” domains=”extaspnet” />

Note: If you want your AD Roles and Users to appear before sitecore roles and users the definition should precede the sql provider mapping. Hence the order of the mapping decides in which order roles and users will be seen in the Role Manager and User Manager in Sitecore.

Domains attribute value should match with value of name attribute that was specified in domains.config file.

Your <switchingProviders> section might look like

switching providers

Configuring the Providers

Configuring membership provider

Open web.config file and browse to <system.web>/<membership>, create a new entry as follows,

<add name=”memproextaspnetdb” type=”System.Web.Security.SqlMembershipProvider” connectionStringName=”dbaspnetmembership” applicationName=”sitecoredbaspnet”  requiresQuestionAndAnswer=”false” requiresUniqueEmail=”false”  minRequiredPasswordLength=”1″ minRequiredNonalphanumericCharacters=”0″ />

Configuring the Role Provider

Open web.config file and browse to <system.web>/<roleManager>, create a new entry as follows,

<add name=”memproextaspnetdb” type=”System.Web.Security.SqlRoleProvider”  connectionStringName=”dbaspnetmembership” applicationName=”sitecoredbaspnet”  />

Note: The applicationName attribute plays a vital role in such implementation and it should match to the value specified in the “aspnet_Applications” table of your external aspnet membership database.

Hence if in your aspnet_Applications table you do not have entry for applicationName, users and roles will not be visible or accessible in sitecore

Now you should be able to see all the users and roles in sitecore User Manager and Role manager respectively from your external database.

ASPNet Membership - Application table

Sitecore can be configured with Active directory, Custom Provider as well as default sitecore membership provider all in a single go.

More documentation and blogs

You can further quench your technical thirst for membership providers and sitecore integration with following resources.

Sitecore Forums Know-How

One fine day on Sitecore forums I received a request to do a private message. It took me some time to find out how to do it. I enquired with my colleague Varun Shringarpure for it and he was like he has done it earlier but cannot recall how. Well private messaging is always catchy to eyes on the post, but somehow we were not able to see it. This made me think why not to write a blog that covers various aspects for posting messages on Sitecore forums. So let’s jump and see how Sitecore forums can deliver to the Sitecore developer’s community and makes a Sitecore learner’s life easy. Sitecore Forum is an implementation of YetAnotherForum.Net which is an open source solution. Sitecore YAF, a module available on Sitecore Market Place allows YAF integration with Sitecore implementation.

Best browser I have found for using sitecore forums with all RTE capabilities is FireFox.

Forum Features

Registration

For accessing Sitecore forums you need to register at Sitecore Developer Network. The registration process involves email verification, validation and profile updating. SF-1

Once registered successfully you can now login to Sitecore Developer Network. For accessing forums click on “Forum” link you will be taken to below screen.

SF-2

Most of the information and sections on the forum are self-explanatory hence I will avoid going into minute details for those.

The information that is available on the forum page is,
1) Filters:
a) Active – List of posts with recent activity
b) Unanswered – List of posts that are unanswered
c) Not Read – List of posts that you have not read
d) My Forums – List of posts and threads you have participated in
e) Private messages – Private messages sent to you from other forum members

2) Developer Talk: Contains various discussion threads (Sitecore Certified Developers, General Discussion, Snippets, Installation, Sitecore Shared Source Modules etc…) and is the most active group.
3) End User Talk: End user related questions, using Sitecore interfaces.
4) Who is online: Shows statistics about the number of users that are currently accessing the forum, their names and also it links to the member’s profile page.
5) Forum statistics: As the name suggest it provides information about Sitecore Forum statistics, displaying total registered users, threads and posts. It also shows the newest member who have signed up recently with sitecore forums.

Most Active Members: This section gives information about the last 10 active members along with the total latest threads the member has replied.

Once you enter a discussion thread you will see list of Topics / Threads. The recently updated thread will appear at the top.

Below screen gives information on various links

sf-3

How to subscribe for email alerts?

At the bottom of a forum page, clicking on the options link, expands “Forum Options” and “Forum Statistics”.

Forum Options has features like sorting, filtering and subscribing to a thread.

Forum Statistics informs about number of members currently browsing the forums with their Names.

sf-4

I will now cover various UI elements and its usage.

RSS Feed for a forum

Each of the forum has its own RSS feed and you can subscribe to it by clicking the RSS link available at the bottom of a forum page.

sf-5

Private message

Here comes the one that motivated me to write this post. Use “pm” link available at the bottom of a post, in case you want to send a private message to a forum member. One of the usage of this feature can be sharing personal details.

private message

Website link

“www” link will appear for those members who have specified a website url in their profile. Ideally it would be link to member’s blog or their company website. Edit and watching profile is covered in “Members details” section of this post.

website

Reply

Use it to reply a post in a thread.

Reply

Quote

You can carry forward reply of other forum member while replying to a post. Use it when you want to comment, reply or add few more insight for an already replied post.

Delete

It appears only on the post which you have replied and as the link says it will allow deleting of your reply to a post. Deleting has been restricted no Sitecore forums and you have to contact the moderator for deletion.

Delete permissions

Edit

For making corrections to your previous replies use the edit link, it appears for the replies made by you.

Report

For any concerns related to a post use this link to report it to the forum moderator.

Search

Free text search within forum. Link is present at the top left of each thread.

Search

Notify

For subscribing to email alerts when a post is added to a particular thread, available at the top left of a thread.

Notify

Member details

Member's details

Taking “John West” member details is intentional, look at the posts he has made. It makes me think can I reach such a number one day and hence it motivates me to keep posting and sharing knowledge on SDN.

On the left side of a post a summary of member’s profile is visible with Name, Avatar, Ranking, and member’s joining date to Sitecore Forum and the total number of post by that member.

Clicking on the Name of a member will take you to the member’s profile page having more details about the member.

Member profile

Signature

It will appear at the bottom of every reply that you make.

Post Rank

It is calculated based on the number of post you have made.

Editing your profile

Edit profile link

For updating our profile we can make use of the greeting message displayed at the top right side on the forum. Below screen depicts member profile page for updating.

user profile

RTE

You should notice the message posted at the top of the forums as

Browser usage notification

If ignored you will be having less capabilities with RTE when you want to reply to a post. File attachments can be made via File upload box present at the bottom of the RTE.

As per my experience FireFox is the best suited browser for having all RTEditing capabilities.

RTE

References

YetAnotherForum.Net

YetAnotherForum Features

– The screen grabs in the post are taken from Sitecore forum

Sitecore 7.2 Changes

I will try to highlight the changes that have been introduced in sitecore 7.2. Most of these changes are mentioned in the Release History (Sitecore CMS 7) on SDN, so I will try to dissect how these changes affect our existing code.

General Link field

What changes are made to General Link field?
Below is an extract from Release History (Sitecore CMS 7),

  • General Link field
    • A new LinkField.GetFriendlyUrl() method has been introduced. The method makes it easy to output a valid URL no matter what type of link the field contains. For internal links, the method returns a URL from LinkManager.GetItemUrl(). For media links, the method returns a URL from MediaManager.GetMediaUrl(). For external links, anchor links, e-mail links, and JavaScript links, the method returns the value of the LinkField.Url property. (400051)
    • Changes in the General Link field
      • When you use the General Link field and create an internal link or a media link, Sitecore no longer adds a “url” attribute to the xml that is stored in the field. The “url” attribute is still added when you create other types of links, for example, external links. (388400)

Below is the raw value from sitecore 7.1 and sitecore 7.2 for general link field,

GeneralLinkField

How does it impacts?
Mostly we will use the “url” property of the LinkField to create a url for a page.

GeneralLinkField1

In case, if you are migrating from sitecore 7.1 or earlier to sitecore 7.2 and you refer to “url” property then in such cases your code will break.
Alternate Solution
One of the solution to overcome this change is,

GeneralLinkField2

I will try to list more changes as and when I come across them.

Setting up EC2 Server With Elastic Load Balancing

In this post I’ll try to show you how to setup multiple EC2 servers along with Elastic Load balancing.

Amazon Virtual Private Cloud (Amazon VPC) lets you define a virtual networking environment in a private, isolated section of the Amazon Web Services (AWS) cloud. Within this virtual private cloud, you can launch AWS resources such as, ELB load balancers and EC2 instances.

This section covers information that is specific to creating and managing your load balancers launched within Amazon VPC and provide procedural instruction and examples to set it up along with EC2 Instances.

If you got any question, feel free to ask.

Setting EC2 Server with Elastic Load Balancing

Happy Learning

Hardeep