Saturday, August 16, 2014

Download Torrent File From Magnet Uri

As the name suggets its a simple desktop app that takes "Magnet-Uri" as input & download the "Torrent" file associated with it. I created this because I use multiple PC & I hate searching for same TORRENT file multiple times, thats why I created this.

Check it Out: https://github.com/KhanZeeshan/MagetUri_TorrentFile

Wednesday, May 21, 2014

WCF problem with POSTs using ssl (https)

I recently faced a problem in one of my WCF projects with HTTPS data packet size, you can change the data packet size only for HTTP binding in WCF but not for HTTPS binding, if you want to know how to do change HTTP binding click here. To send large data on HTTPS you just have to add the following line in your HTTP binding tag then that setting will work for HTTPS too.

<security mode="Transport"> 
Just an FYI after adding this line in your webconfig file you are forcing user to use HTTPS now for that specific binding.

Wednesday, January 22, 2014

SQL Azure Bacpac - Local Restore

If you need to export a SQL Azure database and then import it into a local SQL 2008 R2 server (Note I am also using Visual Studio 2010). Microsoft certainly went out of their way to make this a painful task, however, I was able to do it by doing the following:

Goto this link http://msdn.microsoft.com/en-us/jj650014 and install the SQL Server Data Tools for Visual Studio 2010

This will install on your local drive. In my case here is where it put it: C:\Program Files (x86)\Microsoft SQL Server\110\DAC\bin

Browse to this via the command line or powershell

You are going to want to execute the SqlPackage.exe

Open up this link to see a list of all the parameter options for SqlPackage.exe (http://msdn.microsoft.com/en-us/library/hh550080(v=vs.103).aspx)

Here is my command line that I needed to execute to import a .bacpac file into my local SQL 2008 R2 server:

.\SqlPackage.exe /a:Import /sf:C:\mydatabasefile.bacpac /tdn:NorthWind /tsn:BINGBONG

/tdn is the name of the database you want your bacpac file to restore to. /tsn is the name of your SQL server.

You can see all these parameter descriptions on the link from #5.