wtf nth

  • Archive
  • RSS

You CAN change the referrer header on WP7

There are a few threads complaining that you can’t set the referrer header on an HTTP request from Silverlight in WP7:

HttpWebRequest and Referer field on a WP Silverlight App

Odd behavior with the Image control and the HTTP Referer Header

httpwebrequest and referer header

However, it’s currently possible relatively easily:

WebClient webClient = new WebClient();
webClient.Headers[HttpRequestHeader.Referer] = "http://foo.com";

If your calls to a web service are failing on the WP7 and not in a browser, this may be the cause. Silverlight on the phone automatically sets the referrer to be the installation on the phone:

Referer: file:///Applications/Install/ ... /Install/

Some web services consider this to be an ill-formed request.

    • #windows-phone-7
    • #silverlight
  • 8 months ago
  • 7
  • Permalink
  • Share
    Tweet

7 Notes/ Hide

  1. mountain962 liked this
  2. showcasinged liked this
  3. eisenhower402 liked this
  4. dictionaryde2 liked this
  5. emileeyou89 liked this
  6. wtfnth posted this
← Previous • Next →

About

stuff I learned the hard way

Pages

  • why
  • me
  • RSS
  • Random
  • Archive
  • Mobile

Effector Theme by Carlo Franco.

Powered by Tumblr