Azurati

Using an iOS device with SharePoint Host header values

05/05/2012 | By | 1 Reply More

Simply put, iOS devices don’t have a hosts file that can be edited to point to host header values without being jailbroken and that is not something that would be supported in a corporate IT environment.

I realise I will likely come in for stick for admitting this but at home I’m an Apple Mac user and have been since before coming to Australia. My desktop and laptop are both pieces of fruit.

I run a PC dedicated to hosting several VM so that I can learn, use and test SharePoint and whilst I can easily remote into this from my iMac and MacBook Pro, I have found it increasing more difficult to use the iPad with sites hosted on the VM host, especially where I’m using host header names and port numbers.

Looking into this further I was able to solve this issue without creating a separate wireless network for the VM machine.

 

Configure a Mac to use Host Header value

There are a number of ways of editing the Hosts file on a Mac via the Terminal application but I prefer to have something simple and easy. I came across an application called Gas Maskhttp://code.google.com/p/gmask/ that allows me to edit multiple host files and switch between them.

Gas Mask Editing Hosts File with Host Header Values

Gas Mask Editing Hosts File with Host Header Values

In addition to finding this application, I found another issue with editing the hosts file within OS X 10.7 in  that entries at the bottom of the file are some unknown reason ignored. I came across this post:

http://thecoredump.org/2011/09/editing-the-hosts-file-in-mac-os-x-lion/

After finding this and moving my entries above # Host Database I started to get ping responses.

dscacheutil -flushcache can be used to clear the DNS cache on the machine.

With the Hosts file entries created, you now need a means to get the iPad to use these values. For this, I used Charles web debugging proxy:

Charles Proxy Application

After installing Charles, you need to configure the application to start capturing details of all traffic:

Charles OS X Proxy

Charles OS X Proxy

The proxy is configured to run on port 8888:

Charles Proxy Settings

Charles Proxy Settings

You will need to add any external devices to the Access Control Settings so that they can use Charles. The application will prompt the first time another device tries to use it but is just easier if you add the device IP now:

Charles Access Control Settings

Charles Access Control Settings

With the Hosts file entries completed and Charles recording traffic, the work on the Mac is done. Scroll down to get the iPad config.

Back to top

Please Continue Reading This Post: 1 2 3

Tags: , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , ,

Category: iOS

About the Author ()

I’m a husband, father of two amazing little girls and acting IT Senior Systems Analyst. I have a keen interest specifically in SharePoint and iOS platforms but also have an interest in other technologies that can be used to enable collaboration and mobility.

Comments (1)

Trackback URL | Comments RSS Feed

Sites That Link to this Post

  1. Hosts file + iPad | Michael Fields | 10/12/2012

    Leave a Reply