Posts Tagged ‘IIS’Microsoft Exchange 2003 Direct Push and the Apple iPhone 3GWednesday, July 16th, 2008Like any good technophile I picked up a new iPhone 3G on Friday the 11th and the very first thing I did when getting back to the office was to try to get my Exchange Server to do Direct Push. I have had some small frustrations from the wide distribution of documentation on the subject so hopefully this post will save someone some time. For the sake of simplicity this article will deal with the simple case of:
Frankly if your setup is more complicated than that you probably already know how to do this and aren’t reading this anyway. Moving right along… This is what you’ll need before you get started:
Background Direct Push works because the internet is slow. That’s the headline. Basically the iPhone will make an HTTPS connection to your Exchange Server’s “Microsoft-Server-ActiveSync” virtual folder (most likely on the default web site). It will hold each connection open as long as possible, or until some pre-configured timeouts occur. Should you receive an email during this open connection, Exchange will send notification down to the iPhone which will tell you that you have new mail. Simple as that. The reason it works is because the internet protocols were designed to not receive an instant response from the server when making a request (see “slow” above). Direct Push takes advantage of this extended open connection. To prevent your battery from draining in 25 minutes flat the chatter on the connection is kept to a minimum. It’s very clever. Before You Start If you have a Wi-Fi connection active on the phone it won’t work. Direct Push only works over the air (the 3G connection). This is because the Wi-Fi radio will kill your battery. With Wi-Fi enabled I believe the phone reverts to a pull model, based on observation, but I can’t confirm that. Setup Is your iPhone’s Wi-Fi off? Step 1. Router/Firewall Setup
Step 2. Domain Name Setup
Step 3. Exchange 2003 SP2 Setup
Step 4. Configure Your Users
Step 5. Configure IIS
Step 6. Test Your Server Setup
Step 7. Setup your iPhone
That’s it – should be up and running now. Send yourself an email and see. Troubleshooting In my brief time setting this up here are the places where you might come unstuck:
Helpful Links Some of the pages that helped me: Microsoft – Enterprise firewall configuration for Exchange ActiveSync Direct Push Technology Exchange Team Blog – Direct Push is just a heartbeat away Brian M Posey (Exchange MVP) – Microsoft Exchange Direct Push Technology (seems to be broken) Apple’s less that complete instructions (don’t worry, it’s Apple, it just works! Right?)
Public proxied access to SharePoint (WSS or MOSS)Wednesday, April 30th, 2008We use Microsoft Office SharePoint 2007 internally to manage all kinds of work and share documents. It’s a very effective tool. We also use it to manage our software registration database. To facilitate customer software registrations we have a public-facing web service that uses SharePoint APIs to communicate with our registration site. The configuration of SharePoint required some fiddling to make this work. The problem was that we had SharePoint configured with no anonymous access, and obviously the users of our software that would be registering would not have credentials for our network – we didn’t really want to enable anonymous access so a creative solution was required. In order to achieve this we used the web.config <identity /> element in our public-facing website to set the identity of the thread to a fixed user account created just for the task. The web service application pool is configured in IIS to run as “Network Service”. The SharePoint API seemed to pick up the user from the HttpContext.Current.User object, rather than from the thread which means that all our communications were failing with 401.5 errors. I was a little surprised to discover that despite the <identity userName=“user” password=“pass” impersonate=“true” /> in the web.config file, the HttpContext.Current.User was still anonymous. The two tricks that made it work were:
The Global.asax trick ensures that the context carries the same user account as the impersonated thread. The AllowUnsafeUpdates is required when impersonating.
Flash FLV over IISWednesday, April 4th, 2007Recently I was deploying a web site with Flash video on. The Flash SWF files and associated FLV files (these are the ones containing the video that is streamed back to the user) were all in the correct directories however the videos still would not play. Instead I simply saw a blank screen. Windows IIS only serves files for which a MIME type is configured. There are several levels you can configure these including for the whole server (right-click server > Properties > MIME types) for a particular site (right-click site > Properties > HTTP Headers > MIME Types) or even for a folder beneath the site. You will notice that the settings are inherited, so specifying the value for the server negates the need to specify it for each site, and so on. Set the MIME type as follows: Extension: .flv MIME Type: video/x-flv (other MIME type settings may also work) If you altered the MIME setting on the server you will need to restart with “iis_reset” but if you only altered the setting for a given site then simply stopping and starting that site is enough.
|
ArchivesTag Cloud |
