Connect Azure web app to on premise database, hybrid

This short blog shows you to important elements to let you connect from Windows Azure back to on premise database.

Below is actually my journey to get the Hybrid between Azure Cloud and on-premise SQL Database working.

If you search the web by using google then you will get this link

Connect to on-premises SQL Server from a web app in Azure App Service using Hybrid Connections (https://docs.microsoft.com/en-us/azure/app-service-web/web-sites-hybrid-connection-connect-on-premises-sql-server).

When I read up to Create a Hybrid Connection and a BizTalk Service, unfortunately the New hybrid connection is not functioning.

I need to fold back to Azure classic portal following the instruction in Create and Manage Hybrid Connections (https://github.com/Azure/azure-content-nlnl/blob/master/articles/biztalk-services/integration-hybrid-connection-create-manage.md).

 

When I install the On-Premise Setup in my on-premise VM running Windows Server 2012 R2 without Active Directory and with Visual Studio 2015 installed. I have gotten an unsolved error “CmdletInvocationException: Could not load file or assembly ‘Newtonsoft.Json, Version=4.5.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed’ or one of its dependencies. The system cannot find the file specified.”,

 

I then changed to another VM that is running Windows Server 2012 R2 with Active Directory and run Visual Studio 2013. The On-Premise Setup  completed successfully.

 

clip_image002

 

I completed the creation of the Biztalk Service in classic portal, went back to the new Azure Portal to add the Biztalk Service.

 

I have then started the out of the box MVC application, changed my connection string. Download the Deployment profile from the Azure App Service. Deployed successfully to Azure App Service.

 

clip_image004

 

 

clip_image006

 

Posted in .Net, Cloud, Community, Computers and Internet | Tagged , , , | Leave a comment

Cisco VPN 5.0.0.7 0440 for Windows 10 1607

This short blog show you how to install Cisco VPN 5.0.0.7 0440 inn Windows 10 1607.

You will get message “This app can’t run on this PC” when you install Cisco VPN 5.0.0.6 0440 in Windows 10 1607.

 

clip_image001

Unzip your exe to a folder.

Trick the vpnclient_setup.msi to run as Previous version of Windows.

clip_image003

You need to find a copy of DNE software to install first, dneupdate64.msi. If not then you might not be able to completely setup.

After the installation change your registry.

Navigate to the following registry key:

HKLM\SYSTEM\CurrentControlSet\Services\CVirtA

Double click DisplayName and

 For x86, change the value data from something like “@oem8.inf,%CVirtA_Desc%;Cisco Systems VPN Adapter” to “Cisco Systems VPN Adapter”

For x64, change the value data from something like “@oem8.inf,%CVirtA_Desc%;Cisco Systems VPN Adapter for 64-bit Windows” to “Cisco Systems VPN Adapter for 64-bit Windows”

Posted in .Net, Community, Computers and Internet | Tagged , , , | Leave a comment

Add Visual C++ to Visual Studio 2015 installation

This short post showing you how to add Visual C++ into your Visual Studio 2015 previously installed without this C++ component.

You start a New Project, look for Visual C++ template then you will see Install Visual C++ 2015 Tools for Windows Desktop. Click on that.

It will then pop up a Install Missing Features dialog.

The Visual Studio Setup program will be launched.

You will get the warning to close the Visual Studio before continue (even though you have closed it).

You will then see the features that you have selected.

Click Next then click Update.

The installation will be started to add the features you have selected. Here is the Visual C++. For me, this will take more than 2 hours.

Click Close once the installation is completed.

You launch Visual Studio again and create new Visual C++ project, now you can.

Posted in .Net, Community, Computers and Internet | Tagged , , , | Leave a comment

Recursion in practise with C#

This blog showing you apply recursive function in your application.

For example, your manager has passed to you the following table and ask you to write a function.

Three ways you can achieve this:

1. Write many if … else statements.

2. Write a for loop.

3.  Using recursion.

Level

Min_range

Max_range

pay_amount

0

-1

499

0

1

500

699

0.35

 

2

700

899

0.45

 

3

900

1099

0.55

 

4

1100

1299

0.65

 

5

1300

1499

0.75

 

6

1500

1699

0.85

 

7

1700

1899

0.95

 

8

1900

2099

1.05

 

9

2100

2299

1.15

 

10

2300

2499

1.25

 

11

2500

5999

1.35

 

 

Below is the function using recursion to achieve the calculation on the above table.

static float CalcPayout(float boxMove, float rate, float payout)

{

    if (boxMove <= 0)

        return 0;

    else

    {

        if (boxMove >= 200)

        {

            payout = 200 * rate;

        }

        else

        {

            payout = boxMove * rate;

        }

        return payout + CalcPayout(boxMove – 200, rate + 0.1f, payout);

    }

}

Posted in .Net, Community, Computers and Internet | Tagged , , | Leave a comment

An error has occurred while connecting small: Unrecognized database format ‘ small.xlsx

This short blog is showing to how to resolve the error from SSIS saying “Unrecognized database format” when you connect the Microsoft Access 12 Database Engine to Excel file.

One of the major reason is you did not put Excel 12.0;HDR=YES; in Extended Properties.

clip_image002

Posted in .Net, Cloud, Community, Computers and Internet, Microsoft Office | Tagged , | Leave a comment

ORA-03134: Connections to this server version are no longer supported

By reading this blog you may save sometimes for download the unnecessary Oracle drivers for Visual Studio.

If you still have Oracle 9i and you want to download 32-bit Oracle Data Access Components (ODAC) with Oracle Developer Tools for Visual Studio land at http://www.oracle.com/technetwork/topics/dotnet/downloads/odacmsidownload-2745497.html.

Do not download ODAC 12c Release 4 and Oracle Developer Tools for Visual Studio (12.1.0.2.4). You will get the error “ORA-03134: Connections to this server version are no longer supported” after you installed no matter what.

If you think, you want to download older version close to Oracle 9i which is ODAC 10g. Don’t do that either because you will not be able to install it in your Windows 10.

Download the ODAC 11.2.

Posted in .Net, Community, Computers and Internet, Oracle | Tagged , , , | Leave a comment

Oracle sql developer not displaying time

When you send in a sql statement in Oracle SQL Developer you might only see the date but not the time in the datetime field.

Go to Tools -> Preferences -> Database – NLS then put in the Date format
DD/MM/YYYY HH24:MI:SS.

Reference:

http://stackoverflow.com/questions/12628385/sql-developer-is-returning-only-the-date-not-the-time-how-do-i-fix-this

Posted in Community, Computers and Internet, Oracle | Tagged , | Leave a comment