Copy the VHD from one Storage account to another Storage account in azure

Today i was looking to copy the VHD from one account to another account (user) . i was looking for the powershell option then i found the AzCopy was useful

Here is steps to do that

Download and install AzCopy

  1. Download the latest version of AzCopy, or the latest preview version.
  2. Run the installation. By default, the AzCopy installation creates a folder named AzCopy under %ProgramFiles(x86)%\Microsoft SDKs\Azure\ (on a machine running 64-bit Windows) or %ProgramFiles%\Microsoft SDKs\Azure\ (on a machine running 32-bit Windows). However, you can change the installation path from the setup wizard.
  3. If desired, you can add the AzCopy installation location to your system path.
  4. Synchronously copy files in Azure File Storage

With the new option /SyncCopy in 4.1.0-Preview version, user can copy files from File Storage to File Storage, from File Storage to Blob Storage and from Blob Storage to File Storage.

AzCopy /Source: /Dest: /SourceKey:key1 /DestKey:key2 /S /SyncCopy

To get the key in Azure portal
  1. In the Management Portal, click Storage, and then click the name of the storage account to open the dashboard.
  2. Click Manage Keys.Manage Access Keys opens.Managekeys
  3. To copy a storage access key, select the key text. Then right-click, and click Copy.


Delete a Team project from Visual studio online

Today i was trying to clean up my . I saw lot of un used project was created. I was thinking to delete the project. here are Steps to delete the team project from

Step 1 : Login to your “” website.
Step 2: Click on the settings Icon on the top bar . As shown below
Settings Icon

Step 3: It will open a new page as shown below . Click on “View the collection administration page

Control page
Step 4: Now You will see all your project List . Right-Click on the project you want to delete . You will see a delete button click on that . As shown below

Delete Pic

Step 5: You will get the Popup for confirmation. Once you confirm the project will be deleted, You will not cannot able to store it back

Confirmation window

Please comment me if you have any question. I am happy to help you


Post data to CRM 2013 from Infopath using XRM

There was ask form me to check, whether we can post data to CRM 2013 Via InfoPath 2013 form. I was aware that we can call a Custom WCF service which call CRM service and post the data to CRM from InfoPath form.

I was wondering whether we can use the custom code in the InfoPath to post the data to CRM. I did a small POC and found that it’s possible to post data using XRM sdk from InfoPath form

Here are the steps to follow

Step 1

Create an InfoPath Form



Go to File menu à Submit Options. In that select the option as shown in the Pic below



Step 3:

Click on the Edit code and VS Will open and add the below code in the FormEvents_Submit

var Contact = new Entity("Contact");
Contact.Attributes["name"] = "Test from crm";
Uri oUri= new Uri("https://<Orgname>");
//** Your client credentials
ClientCredentials clientCredentials = new ClientCredentials();
clientCredentials.UserName.UserName = <<username>;
clientCredentials.UserName.Password = <<Password>>;

//Create your Organization Service Proxy
OrganizationServiceProxy _serviceProxy = new OrganizationServiceProxy(oUri,null,clientCredentials,null);


And also refer the below XRm Dll’s

using Microsoft.Xrm.Sdk; (Microsoft.Xrm.Sdk.dll)
using Microsoft.Xrm.Sdk.Client; (Microsoft.Xrm.Sdk.dll)
using System.ServiceModel.Description; (System.ServiceModel.dll)

Build the code and close the VS


Step 4:

Give Full trust permission to the form. Go to file menu à Form Options.

Follow as per below diagram


Save the form and preview the form. And submit it, you can see the record is created in the CRM.

Happy Coding



CRM 2013 Sub-grid user experience for new record creation

We have an odd design choice in CRM 2013 with the new sub-grid design. By default, when you add a new 1: N sub-grid to a form to display a custom entity you will get the following user experience.  The user clicks the + icon to add a new child record via the sub-grid:


CRM reveals a lookup control to allow the user to browse for an existing record:


If user want to add a new record, the user clicks the + button and the lookup appears. They don’t want to search for a record but the only thing they can do to move forward is click on the magnifying glass, this executes a search and reveals the lookup control’s search results:


There is however a new “+ New’ button for user, so user need to press that. That gets where user want to be, popping the create form so user can create my new child record:


Saving that new record automatically closes the form and refreshes the parent form revealing new child record in the sub-grid:



I want to change the default behavior.  Now I used Ribbon Workbench and call up the Ribbon definition for my entity.  I right-click on the “Add Existing” and select Hide Button:


Ribbon Workbench is showing me 2 buttons, I am going to hide both. Then I publish the change:


Now the Behavior changed.

Here’s the user experience now…

The user clicks the + button:


And up pops up for create form:


It’s a supported way, we are just changing only the Ribbon button


Entity Images in CRM 2013

Another new feature is CRM 2013 is the ability to set a record specific image. This feature is useful for putting company logos on the account record, a person’s face on a contact record or an image for a product record  or add a image to a user record.

To update the image through the CRM 2013 user interface, simply click on the image and then select a file (less than 5mB) then click upload

To update the image via the SDK; it is very similar to updating any other attribute/field in CRM. Simply specify the ID of the record you want to update and then set the “entityimage” field to the actual bytes of the file.

Entity account = new Entity(“account”);

account[“accountid”] = _testAccountId;
account[“entityimage“] = File.ReadAllBytes(“c:pathtoimagefile.jpg”);


Entity Image data is stored in a new table called ImageDescripter which you can see below.

we can have images for custom entity, which i will show in the next post




First post from my mobile

Today was a great day. I had moved my blog to godaddy hosting and installed new theme. Planning to start my blog journey again.this time I plan to write on technical and also what is happening around me. Need to write at least two post in a week.
Let’s hope for the best
Have a great week

Shrink LDF file in SQL SERVER 2008

Reposting it again 🙂


Today i had a problem.  when i checked my database LDF file (log) file it’s some where around 25GB. I was trying to shrink the file it’s not possible. Could not able to shrink it from management studio. Found an workaround for that, Here the command for it.

First make the database to SIMPLE Recovery mode and do it.

– Truncate the log by changing the database recovery model to SIMPLE.
ALTER DATABASE [databasename]
– Shrink the truncated log file to 1 MB.
DBCC SHRINKFILE ([log file name], 1);
– Reset the database
ALTER DATABASE [databasename]

Let me know if any questions


Improve the single page visitor

Yesterday when i was looking at my website data i found most of the my visitor are single page visitor. Who came down to my 2 post one is for SQL server and another to Jquery page. Both the posts ranked well in the google. Now my problem is how to convert this visitor to see other posts ? .

Here is what i am planning to convert the visitor

1) Given the link to other corresponding pages in that post
2) Written couple of continues post for that topics

These will increase the visitor. will update the post again in another one month