Floating FB popout byF5debug

Installing and Configuring MongoDB on Windows Azure Virtual Machine - Part 2 – #Meet Azure Edition


In our earlier article we have seen how to install and configure the MongoDB on to a Windows Azure Virtual Machine and access it locally with in the server. Now we will see how to configure the end points and get the access to the outside environment by setting the appropriate end points. Please refer to Part 1 of this article to see how to Install and Configure the MongoDB on Windows Azure Virtual Machine to get some continuation of the process.         [more]

Steps:

Now we have the MongoDB ready to use and can be accessed locally, we need to configure it such that it can be accessed from the external systems to communicate. Let us start with setting up the inbound rules, to do that click on Start and go to Administrative Settings and select Windows Firewall with Advanced Security as shown in the screen below.

image

Click in the Inbound Rules and create a new Rule as shown in the screen below. We can see a wizard where we need to configure the Inbound Rules that are allowed to connect to the database.

image

We can see a Wizard opens and have the option to select a Program or a port that are to be configured. We can select a particular program level rule to configure or we can configure it based on the port. Let us do it by Port, to do that select PORT option and click on Next to proceed further as shown in the screen below.

image

We need to set the Port on which the MongoDB listens to. MongoDB uses the port 27017 port which is over the TCP protocol that is used by the database. So select TCP and enter the port 27017 and click on Next as shown in the screen below.

image

Next screen provides option to how the connection to be secured. Select Allow Connection option from the list and click on Next button as shown in the screen below.

image

We can see next a list of options to which the rule should apply, since by default it applies to all the options click on Next directly without changing any option as shown in the screen below.

image

Now we are the final stage, specify a valid name to the port like MongoDBPort or something which best describes the requirement of the port configured and click on Finish as shown in the screen below.

image

We can see the port is configured and a new Rule is added which is listed in the list of available rules as shown in the screen below.

image

So we are done with enabling a port where the MongoDB listens to the server, next is to configure the Endpoints which can be done from the Management Portal. Login to the Management portal and go to the Virtual Machine environment and select the virtual machine where we are going to configure the end point as shown in the screen below.

image

At the bottom menu click on Add Endpoint option which basically provides a screen to add the end point to which we have configured the port in the server as shown in the screen below.

image

Enter the port which we configured in the server (27017) by providing the required fields as shown in the screen below and click on Finish to add the end point to the virtual machine.

image

Now we have made a port where the MongoDB is accessible from the server. So essentially all the rules are provided to access the port through which we can access the Database. That’s it from this tutorial, we will see in detail on how to use this DB in real time in a ASP.NET application and host it to the Azure environment in our upcoming sessions.

About Author: Karthikeyan Anbarasan, Microsoft MVP (Most Valuable Professional) in ASP.NET/IIS Architecture. He is the Founder and Chief Editor of the www.f5debug.net website and has authored books on Windows Phone and Business Intelligence(SSIS). He is also a Passionate Speaker and a Blogger on Microsoft Technologies.

You can Join Me On: Facebook, Twitter, Google Plus, LinkedIn

Pingbacks and trackbacks (1)+

Add comment

  Country flag

biuquote
  • Comment
  • Preview
Loading

Recent Posts

Random Posts

Most Viewed

URL Shortner

Create your own short urls!!!

Site Counter

free counters

Disclaimer

This is a personal weblog. The opinions expressed here represent my own and not those of my employer. For accuracy and official reference refer to MSDN/ TechNet. I have documented my personal experience on this blog.

Protected by Copyscape Web Plagiarism Finder

Site Meter