WHAT'S NEW?
Loading...

Creating a local SSL certificate for local.mysite.com

Index

  • Intro
  • Solution
  • References

Intro



I've been working on the integration of a payment service provider (Amazon) and oAuth system (Facebook, Twitter, Google,...) for different projects and in some cases, you are forced to provided a different URL than "localhost" to those provider in order to get access to their API.

In this tutorial I'll show you how to create a local SSL certificate and how to host your web site in a different URL than https://localhost:XXXX.

Solution

Create local SSL certificate and configure VS:
  1. Add entry to hosts file
  2. 127.0.0.1 local.mysite.com
  3. Edit project applicationhost.config and add new binding
  4. Run in VS developer command prompt (ensure you run as an administrator):


  5. Start > Run > MMC.exe
  6. File > Add/remove snap-in
  7. Select certificates and then local computer
  8. Find the certificate under Personal > Certificates
  9. Double click and get the thumbprint under the details tab. It should look like below:
  10. 68 98 9c 08 09 70 88 67 1c 0f 08 a5 9b 0a 74 9a 9b 1e a5 65
  11. Remove all spaces e.g.
  12. 68989c08097088671c0f08a59b0a749a9b1ea565
  13. Back in developer command prompt, run (ensure the certhash is replaced with the one you got from above. The AppId can be anything so keep it the same as below)


  14. Add urlacl entry (important to keep trailing slash on url)

  15. Move the certificate in MMC.exe from the personal to trusted folder
  16. Test the URL https://local.mysite.com:44300/. It should now work with a valid SSL certificate

That's all for today folks! I hope you found this interesting and helpful in your next projects. See ya!

References

Migrate data to Azure SQL

Index

  • Intro
  • Problem
  • Solution
  • References

Intro

Today I want to show you a handy way to move data between databases hosted on premise/cloud providers.


Problem

Normally, I host my databases locally on my development machine. This is the typical approach for every single developer in the world I guess, unless you need to tackle a replica for the  production environment.

At some point, I have to take that database and restore it on the cloud or other data storage service provider. For this particular example I'll show you how to use a tool to move data from a local MSSQL server instance to an Azure SQL database.

Solution

BCP tool is a commnad line application which enables you to export and import data from SQL instances. I found this tool very useful when uploading data to Azure SQL database is required. The performance provided by BCP is great allowing me to upload 60.000 rows from my laptop to Azure in less than a minute. This always might depend on the speed of your network connection.

Following a couple of examples for export/import data.
  • Export


See in this previous example how I export all the information hosted in the table called "MyTable" into a .dat file within a temporary file called "data.dat".

With "-T" I'm defining "Integrated security" as this is a local host database.
  • Import


In the example before I'm using basic authentication with the parameters "-U" for user and "-P" for password.

See here a list of option you can use with BCP command line tool:

bcp [database_name.] schema.{table_name | view_name | "query"
    {in data_file | out data_file | queryout data_file | format nul}
  •    [-a packet_size]
  •    [-b batch_size]
  •    [-c]
  •    [-C { ACP | OEM | RAW | code_page } ]
  •    [-d database_name]
  •    [-e err_file]
  •    [-E]
  •    [-f format_file]
  •    [-F first_row]
  •    [-h"hint [,...n]"]
  •    [-i input_file]
  •    [-k]
  •    [-K application_intent]
  •    [-L last_row]
  •    [-m max_errors]
  •    [-n]
  •    [-N]
  •    [-o output_file]
  •    [-P password]
  •    [-q]
  •    [-r row_term]
  •    [-R]
  •    [-S [server_name[\instance_name]]
  •    [-t field_term]
  •    [-T]
  •    [-U login_id]
  •    [-v]
  •    [-V (80 | 90 | 100 | 110 | 120 | 130 ) ]
  •    [-w]
  •    [-x]
  •    /?


References

Download Microsoft Command Line Utilities 11 for SQL Server
Microsoft Blog tutorial
Tutorial for using BCP

Today I'm in... The Microsoft Enterprise Mobility event

Intro


I'll be meeting today with some engineers from Microsoft about enterprise mobility. The main topic for the day will be Identity, Devices, Apps & Security, so I'm sure there's a whole bunch of things to talk with these folks.

Agenda

TIMINGS:
AGENDA:
09:00-10:30
Microsoft Azure Active Directory - Identity & Access Management In The Cloud
10:30-10:45
BREAK
10:45-12:15
Microsoft Intune – Mobile Device & Application Management
12:15-12:45
LUNCH
12:45-14:15
Microsoft Azure Rights Management - Protect Your Information Wherever It Goes
14:15-14:30
BREAK
14:30-16:00
Microsoft Azure RemoteApp - Run Windows Apps Anywhere


After the meeting...

Please see here enclosed the overview of the presentation with a list of the services provided: