A View Inside My Head

Jason's Random Thoughts of Interest
posts - 68, comments - 168, trackbacks - 10

Sunday, November 08, 2009

Synchronizing Your Droid to Exchange Online (BPOS)

Motorola Droid - photo curtesy of MotorolaOver the weekend, I bought a Motorola Droid, a great new Android 2.0 phone on the Verizon network.  It's important to note that this is not only my first smart phone, but also my first hand-held device of this type (i.e., a PDA, etc), so I'm pretty stoked at the moment.

The device synchronizes with Google applications extremely well (like GMail, Google Calendars, Google Voice, Contacts, etc).  Setting this up is just a matter of creating a new Account on the phone, providing your GMail account and password, and then everything else just magically syncs.  And, since I'm primarily a GMail user (who uses multiple Google Calendars to keep our hectic family schedule organized), this was a killer feature for me.

But, I expect that this would be easy for Google content.  What about the real world?  What about synchronizing to an enterprise email and calendar, like Exchange?  And, since I'm a consultant, what about synchronizing to multiple Exchange servers at the same time?

Well, I'm happy to report that there's an application for that... Or, rather, a couple of them: Email (note, not the GMail app) and Corporate Calendar.

My company uses Lotus Notes for email.  Thankfully, though, our Microsoft Practice within the company has just started to use Exchange Online (as part of the Microsoft Business Productivity Online Suite, or BPOS), so mail sent to my company account gets forwarded to the Exchange Online server.

Configuring the Droid to synchronize with Exchange Online is probably not much different than synchronizing with any Exchange server.  It all starts with creating a new Account on the Droid:

  1. From the Settings application, touch "Accounts & sync". 
  2. Touch the "Add account" button at the bottom
  3. Choose "Corporate" as the type of account to create.
  4. You'll be prompted for a Email Address and Password.  Enter the same email account and password that you use to log into BPOS, and then touch the "Next" button.
  5. The next page is where it tried to be smart about what you entered on the previous page.  Basically, only the Password will be correct (at least in my case).
  6. Replace the Domain\Username with the same email that you entered on the previous screen.  It's okay to have the backslash as the first character.
  7. For the Exchange server, refer to the Mobile Device URLs for your region that are listed on the "URLs for Microsoft Online Services" page.  For my account, I had to specify:  red001.mail.microsoftonline.com
  8. I also have "Use secure connections (SSL)" and  "Accept all SSL certificates" checked.
  9. Click Next to go the the Account Options screen.
  10. Set the "Email checking frequency" and "Amount to synchronize".  I used Automatic (Push) and One week, respectively. 
  11. You can also choose to "Send email from this account by default" (I don't), "Notify me when email arrives" (I do), and "Sync contacts from this account" (I do).
  12. Click Next to go to the final screen.  Give the account a friendly name, and enter your name (to be displayed on outgoing email).  Then touch the "Done" button.

By default, it doesn't seem that Calendar sync'ing is automatically added to a new account.  I had to go into the Corporate Calendar app, after which it detected the new Corporate Account and started sync'ing the calendar (which can be verified by opening the account information from Settings). 

Also, I'm sure that this is a bug at the moment, but it seems that only one Corporate Account (only the first one) is able to synchronize its calendar.  That is, the Corporate Calendar application does not seem to recognize when additional Corporate Accounts are added.  As a test, I deleted my first Corporate Account and then started the Corporate Calendar again, at which time it detected a new account (which was originally the second account) and added the Calendar sync to that.  But, recreating the original first account didn't result in an automatic Calendar sync.  Definite weirdness!

 

posted @ Sunday, November 08, 2009 10:25 PM | Feedback (0) | Filed Under [ Articles ]

Wednesday, July 15, 2009

Windows 7: Still No Love for Consultants

I'm a consultant.  I travel from client network to client network, sometimes within the same day.  My job involves interacting with various corporate servers using my trusty laptop, solve real-life business problems, and then move on to the next gig.  It's not practical for me to have my computer join a Windows Domain only to have to do it again and again with each new environment that I visit.  This is also not feasible because I cannot have my different clients become administrators on my company-provided laptop or have domain policies pushed down to my laptop, which is a byproduct of joining a domain.

So, as a result, I'm forced to log onto my laptop as a local user.  This proved not to be a problem with Windows XP because I could set up a password rule (within the User Accounts control panel) to associate a username and password to use for each distinct domain that I access.

But, beginning with Windows Vista, Microsoft's security model became what can only described as bi-polar.  If your machine was domain-connected, then everything worked fine.  But, if your machine was not domain-connected, then a different set of rules seemed to apply, and it suddenly became a frusterating chore to perform simple tasks against domain-protected resources. 

Part of the problem stemmed from an apparent bug in the "Manage Network Passwords" interface that would seemingly not accept domain wildcards, either in the classic format (DOMAIN\*) or the FQDN format (*.DOMAIN.COM).  So, there was no way to instruct Windows to use a particular set of credentials for "any resource on this domain".  The best that you could do was save a password for each individual resource (server) that you needed to access.

I've been experimenting with Windows 7 for a couple of weeks now to see how well it fits into the life of a consultant working within an enterprise environment.  I'm happy to report that the "Manage Network Passwords" bug appears to be fixed (using the FQDN wildcard format), so my network password list is not littered with scores of entries.  However, other things still remain broken or impossible to do.

As an example, one of the tools that I use the most is SQL Server Management Studio (SSMS).  Out of the box, relying on a password rule to connect to a SQL Server protected by domain security simply does not work, and there is no other way to specify a Windows username/password as part of the Connect dialog.  I have to resort to using custom RUNAS shortcuts for each environment that I'm in (I previously blogged about this under Vista)

Also, anything that uses Kerberos (i.e., for delegated authentication from a web application to a secondary server) simply does not work if your computer is not domain-connected.  Though, to be fair, I think that this was an issue for Windows XP machines that were not domain-connected as well, and is the result of how Microsoft implemented Kerberos security (their design assumes that all of the participating machines are domain members).

Overall, the experience of using a standalone Windows 7 machine as a consultant within a corporate environment has proven to be better than Vista.  But, it's still not as good of an experience as XP was, and I totally blame this on the "enhancements" that were made to the underlying security model.  This is particularly disheartening because I'm in love with Windows 7 as an operating system and actually want to use it for my day-to-day tasks.

I welcome commentary from the OS team about what can be done to improve this experience! 

 

 

 

posted @ Wednesday, July 15, 2009 12:34 PM | Feedback (0) | Filed Under [ Articles ]

Friday, July 10, 2009

Bill Gates Thought it was a Good Idea, Too!

This morning, I came across this news article about some patents that Bill Gates filed to stop hurricanes.

Sure, I never patented the idea or did any work to further elaborate on it, but I did blog about the same concept in 2005!

http://jasonf-blog.blogspot.com/2005/09/preventing-hurricanes.html

Bill, you can buy me a Diet Pepsi the next time that you see me... 

posted @ Friday, July 10, 2009 11:36 AM | Feedback (0) | Filed Under [ Me! ]

Wednesday, July 01, 2009

The Lounge

Those of you who visit my blog's website will notice a new type of ad in the sidebar, replacing the AdSense skyscraper that was there previously.  I'm proud to be associated with the list of other .NET developers who are all part of The Lounge's .NET Small Publishers Room.

posted @ Wednesday, July 01, 2009 5:35 AM | Feedback (0) | Filed Under [ Me! ]

Wednesday, May 20, 2009

Speaking at Microsoft SQL Server User Group in Columbus, June 5

On June 5th, I'll be in Columbus (Ohio) speaking to the Microsoft SQL Server User Group (Result Data) about using the XML data type in SQL Server.

XML Capabilities of SQL Server 2008

Jason Follas, Microsoft MVP for SQL Server, will lead a discussion on the XML capabilities of SQL Server 2008.  XML-based data is very prevalent in today's data world to the point that every database developer should know how to work with XML. Middle-tier translation of XML into relational data may be inflexible, and often leads to a loss of fidelity over time. One solution is to move the XML handling into the database itself in order to improve overall integration. SQL Server 2008 provides powerful XML processing features that allow easy access to data stored within XML without sacrificing any of the original fidelity.

Partitioning in SQL Server 2008

Andy Thissen, Database Administrator at BMW Financial Services, will lead a discussion of the use of partitioning in SQL Server 2008.
 
Agenda
 
12:45    Check-In
1:15       Introduction & Announcements
1:30       XML Capabilities of SQL Server 2008
2:30       BREAK
2:45       Partitioning in SQL Server 2008
3:30       Q&A
3:45       Raffle – Door Prize

https://www.resultdata.com/training/schedule/register.aspx?id=198020

posted @ Wednesday, May 20, 2009 11:00 AM | Feedback (0) | Filed Under [ SQL Me! ]

Saturday, April 04, 2009

Microsoft Solver Foundation

Warning: Only 3 people who read this may actually understand it.

This morning, after actually considering what the effort might be to port lp_solve from C over to .NET, I stumbled upon this:

http://code.msdn.microsoft.com/solverfoundation

About 4-5 years ago, I worked on a project that used a Frankenstein'ed "lp_solve 2.0-ported-to-Java-then-ported-to-C#" solver, which was great because it was free and it was a completely managed solution (no native components).  What I was doing wasn't particularly that heavy of a problem, but still required a solver to quickly and reliably minimize a cost given a bunch of user-provided constraints.

Solver Foundation appears to satisfy both of these "requirements" (i.e., being Free and being completely managed).

Now, if I can build a Silverlight 2.0+ app that is able to use MSF, then I essentially get infinite scaleout of my optimizer without requiring infinite server infrastructure.  <evil laugh>

 

posted @ Saturday, April 04, 2009 7:53 AM | Feedback (0) | Filed Under [ .NET ]

Wednesday, March 04, 2009

For Jeff: Spatial Querying

A quick sample of usage as requested by my friend Jeff McWherter:

Querying for all data in a table where the "zip code polygon" is within 20 miles of a geocode point (must convert 20 miles to meters in the predicate)::

select * 
from dbo.fe_2007_us_zcta500 
where Boundary.STDistance('POINT(-79.8884595930576 43.2609696686268)') < (20 * 1609.344) 

posted @ Wednesday, March 04, 2009 6:08 PM | Feedback (1) | Filed Under [ SQL Spatial ]

Wednesday, February 25, 2009

How To Force SSRS To Use Latest Data

SQL Server Reporting Services is great in the fact that it comes with a handful of different rendering (export) formats out of the box.  If a particular report is intended to be paginated and printed, then from my web applications, I will often link to the report with a parameter instructing the render format to be PDF - this way, the user is never taken to the report viewer (they just get an Open/Save As dialog for the PDF itself).

The URL for such a link may resemble the following:

http://server/ReportServer?/path/reportname&rs:Command=Render&rc:LinkTarget=_blank&rs:Format=PDF&SomeParameterValue=1

There are other interesting things that you can do with the rs:Format parameter.  For instance, say that you create a tiny report that only contains a chart.  Why not have this report rendered as an image, and then you can show this chart on your website (i.e., no extra charting component would be necessary on your web server).  Simply specify the URL to your report in an IMG tag's SRC property, and include the following parameters in that URL:

rs:Format=IMAGE&rc:OutputFormat=PNG   (or GIF, or JPG, etc)

One problem with not going through the default web-based report viewer, though: the report server likes to cache the output for your browser session.  Therefore, if the underlying data changes, re-running these reports will not show the updated information unless you close your browser and hit the page again.

After a bit of headscratching and searching on the Internet, I found an easy solution that can be used to always force the reports to query the database.  Simply include the following parameter in your report's URL:

rs:ClearSession=true

Of course, you will take more of a hit on your database (because the report will always requery its datasets).  But, perhaps in your solution, you can selectively use this parameter if the user wants to force a refresh of a report that is automatically rendered to PDF or an image - that's a design decision that you'll have to make. 

I'm just happy that a mechanism exists to get around the default behavior!

 

posted @ Wednesday, February 25, 2009 2:02 PM | Feedback (1) | Filed Under [ Articles SQL ]

Tuesday, February 24, 2009

Name Twin?!!

My surname is relatively unique, and in all my life, I have never known of another "Jason Follas".  Well, that changed today when I got a vanity alert from Google that "Jason Follas is on Facebook". 

I am on Facebook, but it seems that there's another from the New Zealand clan of Follases (there's quite a few of "us" down under)!  I'm going to befriend him for the novelty aspect.  :-)

Another Me

posted @ Tuesday, February 24, 2009 7:18 AM | Feedback (0) | Filed Under [ Me! ]

Monday, February 23, 2009

Enterprise ASP.NET Application Performance Tip

Microsoft Regional Director (and friend) Steven Smith has a great talk about ASP.NET performance tips - I've seen the presentation probably a handful of times already, and always seem to walk away with something new to try that I didn't quite "grok" previously. 

But, here's one additional tip that I can offer that is easily overlooked, yet very important for enterprise development.

Enterprise web applications (at least in my world) tend to use Integrated Security in order to provide Single Sign-On capability (i.e., automatically authenticating the user according to their Active Directory credentials).  As such, Anonymous access to the web application is usually disabled directly in the metabase using the IIS MMC.  But, with sites that use a lot of small images, there's a serious performance hit that you take when Anonymous access is disabled!

A web browser will always try to submit a request anonymously.  In the case that I described where Anonymous access is disabled, the web server will generate a 403 response (and include a list of possible ways that the client can authenticate itself).  The web browser will then either prompt the user for credentials, or in the case of using Internet Explorer in the Intranet Zone with an application protected by Integrated Security, will automatically provide a response to the NTLM challenge.  The point being that it takes two separate requests for each resource (not to mention a higher computational cost, since there's a challenge/response included).  Multiply this by however many little images your page might have, and your load time increases significantly.

Just today, I was asked to diagnose a load-time issue for a 3rd party web application that my client uses.  The site looks nice because it uses little images all over the place - to the effect of hundreds per page!  But, the price of these aesthetics was really aweful load times, especially over a VPN connection.

For images and other resources that do not necessarily need authentication, you can get an immediate performance improvement by enabling Anonymous access to the resource directories/files themselves (leaving Anonymous access disabled for the rest of the application). 

posted @ Monday, February 23, 2009 2:15 PM | Feedback (0) | Filed Under [ Articles .NET ]

Powered by: