Friday, August 21, 2015

AX2012 R3: DIXF Could not load assembly error

While working on DIXF there can be scenario where you may face errors where assemblies are not able to load properly. Like below:

"Could not load file or assembly 'microsoft.dynamics.ax.framework.tools.dmf.previewgrid.dll'"

In this case you can use 2 options:

1. You can reinstall DIXF Client.
2. You can copy the dll file mentioned in the error from one AOS where it's working properly and paste it to the AOS where the error is coming. The file location is "C:\Program Files (x86)\Microsoft Dynamics AX\60\Client\Bin".

SSIS 2012: Access is denied error

While connecting to SSIS in SSMS, you may face an error of "Access is denied". It can be resolved by following the below steps:
  1. If the user is not a member of the local Administrators group, add the user to the Distributed COM Users group. You can do this in the Computer Management MMC snap-in accessed from the Administrative Toolsmenu.
  2. Open Control Panel, double-click Administrative Tools, and then double-click Component Services to start the Component Services MMC snap-in.
  3. Expand the Component Services node in the left pane of the console. Expand the Computers node, expandMy Computer, and then click the DCOM Config node.
  4. Select the DCOM Config node, and then select SQL Server Integration Services 11.0 in the list of applications that can be configured.
  5. Right-click on SQL Server Integration Services 11.0 and select Properties.
  6. In the SQL Server Integration Services 11.0 Properties dialog box, select the Security tab.
  7. Under Launch and Activation Permissions, select Customize, then click Edit to open the Launch Permissiondialog box.
  8. In the Launch Permission dialog box, add or delete users, and assign the appropriate permissions to the appropriate users and groups. The available permissions are Local Launch, Remote Launch, Local Activation, and Remote Activation. The Launch rights grant or deny permission to start and stop the service; the Activation rights grant or deny permission to connect to the service.
  9. Click OK to close the dialog box.
  10. Under Access Permissions, repeat steps 7 and 8 to assign the appropriate permissions to the appropriate users and groups.
  11. Close the MMC snap-in.
  12. Restart the Integration Services service.
Reference: https://msdn.microsoft.com/en-us/library/aa337083.aspx

Delete company in AX2012 using SQL

Sometimes we are not able to delete company from AX due to existing transactions then SQL comes to the rescue and does the job beautifully.

There is a Stored Procedure in "master" database named "sp_MSforeachtable". Use the below commands:


This will delete all the transactions from all the tables related to that particular company:


EXEC sp_MSforeachtable 'delete from ? where ?.DataAreaID = "CEU"'


This will delete the company name from the company list in AX:


DELETE FROM DATAAREA WHERE DATAAREA.ID = 'CEU'

Thursday, July 2, 2015

Hide any file inside an image file

This a small steganography hack that is fun and sometime really useful,  when  you want to send some file over internet, but upload of only image  file  are allowed on that server.
First here is the definition of stenography from Wikipedia. 
Steganography   (Listen) is the art and science of writing hidden messages in such a   way that no one, apart from the sender and intended recipient, suspects   the existence of the message, a form of security through obscurity.  The  word steganography is of Greek origin and means “concealed writing”  from  the Greek words steganos (στεγανός) meaning “covered or  protected”, and  graphei (γραφή) meaning “writing”.    

In  short, when you  see the file it's just a normal image, but it has some  hidden message  inside it, or in general it can contain anything, even a  whole movie.

There  are lots of tools available for this  purpose, but we can do it using  what we already have just the command  prompt in windows.
The requirement
  • The image file
  • The file to be hidden, the zip file
  • Command prompt
The image I will be using is this
​

and I want to hide a Ms word file and a Pdf behind this image, Select both the file and send to a Zip file.

Steps..
  1. Place the zip file and the image in a folder , I am placing it on the desktop.
  2. Open   cmd(command prompt) and then go to the directory where both the files   are. Like for example, in this case, it's "desktop". So you might need   to type cd desktop 
  3. Now type copy /b imagefilename + zipfilename [filename with extensions], here is the image for clarity.
    ​
  4. Now   the size of the image will increase, what this is doing is simple,  just  appending the second file to the first file and that /b is to  specify  that it is a binary file.
Opening The file
After   copying, the image file size will only increase, but it can be opened   normally and no difference will be seen except the size. To open the  Zip  file, open this image with any Zip tool like 7zip, winrar, or winzip and you can find all the files there, just extract it wherever you want.

Creating wifi hotspot in Win7 or Win8

You don't need connectify or any other software for it. Also, you can save yourself from that 90 minutes counter in connectify. 

All you need to do is run the following two commands in cmd - 

Open cmd with Run as Administrator.

1) netsh wlan set hostednetwork mode=allow ssid=wifiname key=wifipassword

2) netsh wlan start hostednetwork

Best solution - Make a batch file of it and just run the file every time when you start the pc. 

To make a batch file -

First write the commands on a notepad

Then save it with the extension bat.  e.g. wifi.bat

Your batch file is made and now execute the file with Admin Privileges.

Important - For this to work, your sharing should be on in network properties for   the network/ethernet connection that you want to share through your   wifi:

Go to Open Network and Sharing Centre ->Change Adapter Settings(On left panel)

Your wifi hotspot would be Microsoft Hosted Network Virtual Adaptor in the Network Connections.

Go to the properties of the LAN/ethernet/WiFi connection and make the changes accordingly.





Your wifi hotspot would be ready. :)

To stop the wifi hotspot - 
Write the following in command prompt : netsh wlan stop hostednetwork.

For those having trouble with creating hotspot on their dongles:
If you have tried the above steps and its still not working for you then you will have to unlock your dongle. Unlocking simply means downloading any other third party dialer which will work on all network operators.

Just   change the file format [(mp3|wma|aac|flac) part] to your required   format and you will get a search result of sites containing direct   download links to your search query. Enjoy!

View restricted content in Youtube

For the best experience, full screen is the best mode, but it has an inherent drawback that we can't switch to other tabs during this mode with one click.

The remedy is to replace "watch?v=" with "v/" in the video URL, to get the full screen tabbed viewing mode:


For example, 
instead of: www.youtube.com/watch?v=7z9NUV_YrOo&feature=relmfu, type: www.youtube.com/v/7z9NUV_YrOo&feature=relmfu.

You can also use this trick to view the restricted content, without signing in!

Download Videos

Some sites don't allow to download their video content without signing in or do not have facility to download at all.

So without using any extension or downloader, here is how to do this..


  1. Goto that page.
  2. Press ctrl+shift+i or right click and select Inspect Element.
  3. Select the Network tab and refresh the page & play the video to get content status.
  4. You can sort the content by TYPE (tab), to easily get the video link at the bottom under the NAME(tab).
  5. Double click the video link. Voila, your download will start.
Works fine with many sites. Enjoy :)