Thursday, December 21, 2017

Fix : Could not load file or assembly “System.Net.Http, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a”

Even though there are several answers on stackoverflow, nothing helped me to solve this issue and found the solution as follows,

1. Update Visual studio if you have older version to 15.5.4 (Optional)
2. Remove all binding redirects from web.config
3. Add this to the csproj file:
     
4. Build.
5. In the bin folder, there should be a `(WebAppName).dll.config` file.
6. It should have redirects in it. Copy these to the web.config
7. Remove the above snipped from the csproj file again
8. It should work

Tuesday, December 19, 2017

Angular2 - DatePipe period in lower case.

There are several occasions customer would have requested to change the date format in your application to be in small case as follows.

Tuesday, December 19, 7:00 am 
Since the date format does not support the above format, either we can display entire thing in small case with the  lowercase pipe

Since it converts the whole format in lowercase, you can split it in two and apply the lowercase only for the period as follows

{1234567 | date:'EEEE, MMMM d, h:mm '} {1234567 l date:' a' | lowercase }

that's it, it is easier rather than using a custom pipe! Here is the working demo

Tuesday, December 12, 2017

Start using Azure Logic apps and save your time

This is my first blog and Azure and i am inspired to write this one after attending the Microsoft's workshop "App innovation day".

There was a cool technology "Windows Workflow Foundation" provided by Microsoft with dot net framework to create workflows to cater business logic in dot net applications. With Azure, The Logic Apps service fulfill the purpose to have business processes or workflows take shape of an app. It required no coding just simple logic that needs to placed in a right way to have right business flow. It was also meant for the purpose of integrating 3rd party apps like Facebook,YouTube, Twitter and Evernote etc. All we need to have is the dynamic work flow.

There are different benefits and different use cases in which we can apply azure logic apps. Let's discuss some of the benefits when using logic apps!

Rapid development

Logic Apps is great for rapid development.With ever growing list of connectors, we can easily create a workflow to monitor invoice, send for approval to a admin, upload to dropbox and send email notification in matter of few seconds.

Solutions with Hybrid cloud

5 years back ,Lot of businesses have invested heavily in on premises solutions and hardware, so it’s not possible to move everything to the cloud. With Logic Apps, it’s easy to have a hybrid cloud during this transition. With its on premises data gateway, you can easily connect your on premises database, file share, BizTalk server to Azure cloud.

It is the new way of Automating business process. You can build long running business process, that orchestrate data and services across all cloud services and not just Azure. It's not only for the developers but for everyone. The best bit you need to write code , you can use Visual editor to build your orchestration.

Lets Dive into Simple Demo

Use Case: Filter twitter feeds with specific hashtags and post the specific tweets on the Facebook wall.

In this example , i just created a process that repeats every few minutes to pull some data from twitter feed and post it on your Facebook wall. Even though this feature is already supported with Facebook, here its slightly different since it is filtering only the specific keywords which is a custom filtering.

The entire flow i described about is composted of 3 simple steps , that you can build using a Visual UI.

Step 1: Select Logic App click "Create" and give a specific name ,resource 



 Step 2: There are number of workflow templates will be shown as below and select the appropriate one , in this case i will use "when a new tweet is posted"


also authorize with your twitter account from which you want to fetch the feeds


Also configure the conditions by mentioning the filters and the timeline you want to trigger the action.


Step 3: Next step is to post on facebook wall , click "Add step"  


Search for Facebook and authenticate will your Facebook account as follows,


Click post to my timeline


Also you can map the fields that you want to fetch from the feed and post it on the wall as below,


That's it folks, once all fields are mapped you need to save the Logic app with the save button.



With the above 3 steps posting a filtered tweet on Facebook wall is configured and can be scheduled as you need. If the above particular feature needs to be developed without azure means it will need a huge development time and cost, which can be avoided using the Logic app as shown above.

That's the demo. You can explore several steps and several templates provided in the portal without 
writing a single line of code. I will be writing a separate blog on how to configure custom logic app 
in the upcoming blog posts. Happy connecting with app logic!