• Blog
  • Info Support
  • Career
  • Training
  • International Group
  • Info Support
  • Blog
  • Career
  • Training
  • International Group
  • Search
logo InfoSupport
  • Latest blogs
  • Popular blogs
  • Experts
      • Alles
      • Bloggers
      • Speakers
  • Meet us
  • About us
    • nl
    • en
    • .NET
    • Advanced Analytics
    • Agile
    • Akka
    • Alexa
    • Algorithms
    • Api's
    • Architectuur
    • Artificial Intelligence
    • ATDD
    • Augmented Reality
    • AWS
    • Azure
    • Big Data
    • Blockchain
    • Business Intelligence
    • Cloud
    • Code Combat
    • Cognitive Services
    • Communicatie
    • Containers
    • Continuous Delivery
    • CQRS
    • Cyber Security
    • Dapr
    • Data
    • Data & Analystics
    • Data Science
    • Data Warehousing
    • Databricks
    • DevOps
    • Digital Days
    • Docker
    • eHealth
    • Enterprise Architecture
    • Hacking
    • Infrastructure & Hosting
    • Innovatie
    • Integration
    • Internet of Things
    • Java
    • Machine Learning
    • Microservices
    • Microsoft
    • Microsoft Bot Framework
    • Microsoft Data Platform
    • Mobile Development
    • Mutation Testing
    • Open source
    • Pepper
    • Power BI
    • Privacy & Ethiek
    • Python
    • Quality Assistance & Test
    • Quality Assurance & Test
    • Requirements Management
    • Scala
    • Scratch
    • Security
    • SharePoint
    • Software Architecture
    • Software development
    • Software Factory
    • SQL Server
    • SSL
    • Start-up
    • Startup thinking
    • Stryker
    • Test Quality
    • Testing
    • TLS
    • TypeScript
    • Various
    • Web Development
    • Web-scale IT
    • Xamarin
    • Alles
    • Bloggers
    • Speakers
Home » Connecting Windows Phone 7, Zune, a Proxy Server and an Intranet Web Service
  • Connecting Windows Phone 7, Zune, a Proxy Server and an Intranet Web Service

    • By Erno de Weerd
    • Mobile Development 10 years ago
    • Mobile Development 0 comments
    • Mobile Development Mobile Development
    Connecting Windows Phone 7, Zune, a Proxy Server and an Intranet Web Service

    While developing a Windows Phone 7 application I ran into a tricky problem. The RESTful Web Service that was to be called by the application was still in development and therefore not available on the internet. The service was hosted on an intranet server. The Windows Phone emulator was able to connect to the service but I couldn’t get the Phone device to connect to it.

    The device was connected to the network using a USB cable and I disabled its Wi-Fi connection to make sure all network traffic went through my PC which is part of the windows domain. Using the phone’s browser to browse to the service I got 502 HTTP results: Bad Gateway

    At the same time my PC was able to browse to the same address without a hitch. So something in between the phone and my PC was messing things up. that something in between was Zune. Zune is the program that allows the phone device to communicate with the PC and it directs network communication. One of the things it does is detecting the proxy servers on the network and that was what went wrong. The name of the server had a format (dev.www.ourwebsite.net) that triggered Zune to use the Proxy Server. Our proxy server only serves internet addresses so the request for the intranet server was lost.

    These are the solutions I tried and that failed me:

    1. Get the server renamed or aliased – no go. Renaming might cause problems for others and IIS refused an extra host name/alias
    2. Configure Zune better – no go. Except for some shady registry settings I can not find an official way of configuring the behavior of Zune
    3. Use Fiddler to intercept the traffic of the phone and redirect the calls to a fake address to the intranet server – no go. I couldn’t get Fiddler to intercept the traffic. I even tried using the WPAD server fiddler extension. I’d love to get this to work because it can be very useful for other scenarios such as monitoring bandwidth
    4. Writing a WCF 4 Router – no go. A WCF Router can only route WCF WS services by using SOAP headers.

    This is what worked:

    I installed Application Request Routing for IIS 7 on my PC using the Microsoft Web Platform Installer

    In the IIS Manager I selected my machine (top node on the left) and clicked Application RequestRouting Cache:

    image

    On the left I selected Server Proxy Settings:

    image

    And then checked Enable Proxy:

    image

    Then I added a Virtual Directory to the Default Web Site, I named it DEVNET, and selected it:

    image

    The selected URL Rewrite:

    image

    And clicked Add Rule(s):

    image

    Selected Reverse Proxy:

    image

    Entered the server name (dev.www.ourwebsite.net) and checked Rewite the domain names of the links in HTTP responses:

    image

    An Inbound and Outbound rule had been added to the URL Rewrite configuration.

    I opened the Inbound rule and added the path on the web server to the Rewrite URL:

    image

    And I added the same path to the Outbound pattern:

    image

    Hit Apply:

    image

    And there you go! The Phone app will use URLs such as http://myPC/en/categories and these requests will be routed to http://dev.www.ourwebsite.net/ISTraining.External/trainingservice/en/categories

    This way it is also easy to setup a mocking services for the phone app. Both the emulator and the device use the same URLs now which makes development much easier.

    Share this

Erno de Weerd

View profile

Related IT training

Go to training website

Related Consultancy solutions

Go to infosupport.com

Related blogs

  • Bye PCL, Hello .NET Standard

    Bye PCL, Hello .NET Standard Info Support - 4 years ago

  • War of the tanks - Logboek 07

    War of the tanks - Logboek 07 Maarten de Penning - 5 years ago

  • War of the tanks - Logboek 06

    War of the tanks - Logboek 06 Maarten de Penning - 5 years ago

Related downloads

  • Beslisboom voor een rechtmatig ‘kopietje productie’

  • Klantreferentie: Remmicom zet wetgeving om in intellige…

  • Klantreferentie RDW: Samenwerken voor veilig en vertrou…

  • Klantreferentie BeFrank: Strategische IT voor een innov…

  • Wie durft te experimenteren met data in de zorg?

Related videos

  • mijnverzekeringenopeenrij.nl

    mijnverzekeringenopeenrij.nl

  • Winnaar | Innovation Projects 2017

    Winnaar | Innovation Projects 2017

  • Explore | Info Support & HAN & Poliskluis

    Explore | Info Support & HAN & Poliskluis

  • LifeApps bij HagaZiekenhuis

    LifeApps bij HagaZiekenhuis

  • Info Support | Bedrijfsfilm

    Info Support | Bedrijfsfilm

Nieuwsbrief

* verplichte velden

Contact

  • Head office NL
  • Kruisboog 42
  • 3905 TG Veenendaal
  • T +31 318 552020
  • Call
  • Mail
  • Directions
  • Head office BE
  • Generaal De Wittelaan 17
  • bus 30 2800 Mechelen
  • T +32 15 286370
  • Call
  • Mail
  • Directions

Follow us

  • Twitter
  • Facebook
  • Linkedin
  • Youtube

Newsletter

Sign in

Extra

  • Media Library
  • Disclaimer
  • Algemene voorwaarden
  • ISHBS Webmail
  • Extranet
Beheer cookie toestemming
Deze website maakt gebruik van Functionele en Analytische cookies voor website optimalisatie en statistieken.
Functioneel
Altijd actief
De technische opslag of toegang is strikt noodzakelijk voor het legitieme doel het gebruik mogelijk te maken van een specifieke dienst waarom de abonnee of gebruiker uitdrukkelijk heeft gevraagd, of met als enig doel de uitvoering van de transmissie van een communicatie over een elektronisch communicatienetwerk.
Voorkeuren
De technische opslag of toegang is noodzakelijk voor het legitieme doel voorkeuren op te slaan die niet door de abonnee of gebruiker zijn aangevraagd.
Statistieken
De technische opslag of toegang die uitsluitend voor statistische doeleinden wordt gebruikt. De technische opslag of toegang die uitsluitend wordt gebruikt voor anonieme statistische doeleinden. Zonder dagvaarding, vrijwillige naleving door uw Internet Service Provider, of aanvullende gegevens van een derde partij, kan informatie die alleen voor dit doel wordt opgeslagen of opgehaald gewoonlijk niet worden gebruikt om je te identificeren.
Marketing
De technische opslag of toegang is nodig om gebruikersprofielen op te stellen voor het verzenden van reclame, of om de gebruiker op een website of over verschillende websites te volgen voor soortgelijke marketingdoeleinden.
Beheer opties Beheer diensten Beheer leveranciers Lees meer over deze doeleinden
Voorkeuren
{title} {title} {title}