download - Dave's Blog

Search
My timeline on Mastodon

Changing the User Agent string in UWP WebView

2018 Oct 23, 9:32

There's no perfect way to change the user agent string for the UWP WebView (x-ms-webview in HTML, Windows.UI.Xaml.Controls.WebView in XAML, and Windows.Web.UI.Interop.WebViewControl in Win32) but there are two imperfect methods folks end up using.

The first is to call UrlMkSetSessionOption. This is an old public API that allows you to configure various arcane options including one that is the default user agent string for requests running through urlmon. This API is allowed by the Microsoft Store for UWP apps. The change it applies is process wide which has two potential drawbacks. If you want to be able to have different UA strings set for different requests from a WebView that's not really possible with this solution. The other drawback is if you're using out of process WebView, you need to ensure you're calling into UrlMkSetSessionOption in the WebView's process. You'll need to write third party WinRT that calls UrlMkSetSessionOption, create the out of proc WebView, navigate it to some trusted local page, use AddWebAllowedObject or provide that URI WinRT access, and call into your third party WinRT. You'll need to do that for any new WebView process you create.

The second less generally applicable solution is to use NavigateWithHttpRequestMessage and set the User-Agent HTTP header. In this case you get to control the scope of the user agent string changes but has the limitations that not all sub resource downloads will use this user agent string and for navigations you don't initiate you have to manually intercept and re-request being careful to transfer over all POST body state and HTTP headers correctly. That last part is not actually possible for iframes.

PermalinkCommentsuser-agent uwp webview

Retweet of radix42

2015 Aug 9, 8:55
She said "daddy I can't download this" and I looked and said "I'm so sorry we're living in a @doctorow novel" and had to explain :-(
PermalinkComments

ifc: This week on Comedy Bang! Bang! - Michael Cera!

2012 Jun 27, 3:38


ifc:

This week on Comedy Bang! Bang! - Michael Cera!

PermalinkCommentshumor comedy-bang-bang michael-cera video

Changing Windows Live IDs

2012 Jun 6, 2:54

Use of my old Hotmail account has really snuck up on me as I end up caring more and more about all of the services with which it is associated. The last straw is Windows 8 login, but previous straws include Xbox, Zune, SkyDrive, and my Windows 7 Phone. I like the features and sync'ing associated with the Windows Live ID, but I don't like my old, spam filled, hotmail email address on the Live ID account.

A coworker told me about creating a Live ID from a custom domain, which sounded like just the ticket for me. Following the instructions above I was able to create a new deletethis.net Live ID but the next step of actually using this new Live ID was much more difficult. My first hope was there would be some way to link my new and old Live IDs so as to make them interchangeable. As it turns out there is a way to link Live IDs but all that does is make it easy to switch between accounts on Live Mail, SkyDrive and some other webpages.

Instead one must change over each service or start over depending on the service:

Xbox
In the Xbox 360 system menu you can change the Live ID associated with your gamertag. This worked fine for me and I got an email telling me about the transfer of my Microsoft Points.
Zune
There's no way to do this for the Zune specifically, however changing over your Xbox account also transfers over all your Zune purchased content. I don't have a Zune Pass so I can't confirm that, but all of my previously purchased television shows transferred over successfully.
Windows 7 Phone
To change the main Live ID associated with your phone, reset your phone to factory default and start over. All purchased applications are lost. Had I purchased any applications I would have been pissed, but instead I was just irritated that I had to reset my phone.
Mail
I don't use my Hotmail account for anything and it only sits and collects spam. Accordingly I didn't attempt switching this over.
SkyDrive
I didn't have much in my SkyDrive account. I downloaded all files as a zip and then manually uploaded them to the new account.
PermalinkCommentshotmail domain win8 skydrive technical windows live-id

Internet Archive - Downloading in bulk using wget

2012 Apr 26, 2:08PermalinkCommentstechnical internet-archive wget http archive cli

Another Comedy Bang Bang preview clip this time with Zach...

2012 Apr 18, 6:02


Another Comedy Bang Bang preview clip this time with Zach Galifianakis.

PermalinkCommentszach-galifianakis comedy-bang-bang video humor preview scott-aukerman tv clip

paulftompkins: shahruz: Promo on IFC for the upcoming Comedy...

2012 Feb 29, 10:13
[Flash 10 is required to watch video.]

paulftompkins:

shahruz:

Promo on IFC for the upcoming Comedy Bang Bang TV show!!!

BE EXCITED.

I am excited Paul.

PermalinkCommentshumor video comedy-bang-bang

I made this Classic NES Valentine’s Card (free download in...

2012 Feb 7, 12:17


I made this Classic NES Valentine’s Card (free download in comments). - Imgur

PermalinkCommentshumor megaman metroid valentines video-game

Django Reinhardt-01-10 : Django Reinhardt : Free Download & Streaming : Internet Archive

2012 Jan 22, 4:40

This is Django Reinhardt’s Gypsy swing from the 30s and 40s on archive.org and it is all in the public domain. I didn’t know the term for the genre so it took me a while to find this.

PermalinkCommentsmusic public-domain django-reinhardt jazz gypsy-jazz

I Know What You Downloaded on BitTorrent… (torrentfreak.com)

2011 Dec 10, 6:49

Public site that tracks who (by IP address) downloads what and lets anyone view this.

PermalinkCommentsprivacy torrent technical

Swiss government keeps downloading legal after piracy study

2011 Dec 4, 2:28

“One in three people in Switzerland download unauthorized music, movies and games from the Internet and since last year the government has been wondering what to do about it. … The overall conclusion of the study is that the current copyright law, under which downloading copyrighted material for personal use is permitted, doesn’t have to change.” Wow, that sounds like almost reasonable and understandable copyright law.

PermalinkCommentstechnical political swiss copyright law legal

Nighty Night | Amanda Palmer

2011 Apr 27, 4:10PermalinkCommentsmusic download amanda-palmer ben-folds neil-gaiman damian-kulash ok-go mp3

Download a new Radiohead concert film for free | Music | Newswire | The A.V. Club

2010 Sep 4, 8:10"Reminiscent of the Beastie Boys "Awesome; I Fuckin'Shot That", more than 50 Radiohead fans captured the band's Aug. 23 show in Prague on Flip cameras, with the resulting footage later assembled into the new Live In Praha DVD."
PermalinkCommentsradiohead music video youtube

Windows 7 Accelerator Platform COM / C# Interop

2010 Aug 20, 11:20

For a new project I'm working on involving IE's installed Accelerators and OpenSearch search providers via the Windows 7 Accelerator Platform, I've created a C#/COM interop class for those APIs.

Download the osinterop.cs interop file here.

PermalinkCommentstechnical accelerator csharp com

DVD Ripping and Viewing in Windows Media Center

2010 Aug 17, 3:05

I've just got a new media center PC connected directly to my television with lots of HD space and so I'm ripping a bunch of my DVDs to the PC so I don't have to fuss with the physical media. I'm ripping with DVD Rip, viewing the results in Windows 7's Windows Media Center after turning on the WMC DVD Library, and using a powershell script I wrote to copy over cover art and metadata.

My powershell script follows. To use it you must do the following:

  1. Run Windows Media Center with the DVD in the drive and view the disc's metadata info.
  2. Rip each DVD to its own subdirectory of a common directory.
  3. The name of the subdirectory to which the DVD is ripped must have the same name as the DVD name in the metadata. An exception to this are characters that aren't allowed in Windows paths (e.g. <, >, ?, *, etc)
  4. Run the script and pass the path to the common directory containing the DVD rips as the first parameter.
Running WMC and viewing the DVD's metadata forces WMC to copy the metadata off the Internet and cache it locally. After playing with Fiddler and reading this blog post on WMC metadata I made the following script that copies metadata and cover art from the WMC cache to the corresponding DVD rip directory.

Download copydvdinfo.ps1

PermalinkCommentspowershell wmc technical tv dvd windows-media-center

Amanda Palmer Performs The Popular Hits Of Radiohead On Her Magical Ukulele | Amanda Palmer

2010 Jul 21, 3:08"Amanda Palmer Performs The Popular Hits Of Radiohead On Her Magical Ukulele" "Immediate download of 7-track album in your choice of 320k mp3, FLAC, or just about any other format you could possibly desire. Buy Now $0.84 USD or more"PermalinkCommentsamanda-palmer audio download mp3 music radiohead ukulele

RFC 5854 - The Metalink Download Description Format

2010 Jun 1, 6:46"Metalink describes download locations (mirrors), cryptographic hashes, and other information. Clients can transparently use this information to reliably transfer files."PermalinkCommentstechnical internet download web url xml metalink

Beastie Boys - Doublecheck Your Head

2010 May 4, 4:50Beastie Boys remixed with more Beastie Boys.PermalinkCommentsmusic beastie beastie-boys download free mashup mp3 remix

Download A Piece of Internet History | The Changelog

2010 Apr 29, 11:53"I wrote Gopherbot, a spidering archiver for Gopherspace. I ran it in June 2007, and saved off all the documents and sites it could find. That saved 40GB of data, or about 780,000 documents." Now available as a compressed 15GB torrent.PermalinkCommentstorrent gopher internet web technical history archive

Incompetech

2010 Apr 5, 4:08Kevin MacLeod licenses all his music under Creative Commons Attribution 3.0 license and available for free on his site. Seems like lots of good instrumentals for background video game music or podcast intros etc.PermalinkCommentsmusic creativecommons cc creative-commons free download archive kevin-macleod mp3
Older Entries Creative Commons License Some rights reserved.