My Thoughts On Winter
February 15th, 2010 | Published in ASP.NET
February 15th, 2010 | Published in ASP.NET
February 4th, 2010 | Published in Mac, iPhone
I learn new tricks on my iPhone all the time. Sometimes I assume I’ve stumbled on some unknown nugget of brilliance and then I tell someone else and I realize that pretty much everyone has known about said feature since less than a week after they got their device.
So at the risk of once again claiming discovery on the obvious, here are some of my favorite iPhone tricks and tips that you may – or may not already know…
You can save any website you visit in Safari as an app to your phone. It puts an icon on one of your home screens and you have a shortcut directly to that site anytime you need it.
Simply click the + button in the toolbar on any web page and select "Add To Home Screen". The web page is saved as a convenient icon. Think of it as your ability to make custom apps out of any web page.
You can take a screenshot of whatever is on your iPhone at any moment. You can then MMS the message, or the next time you connect your iPhone, you can transfer the picture to your computer. It’s quite useful for lots of things, like writing posts on iPhone tricks for example.
Hold down the sleep button and without releasing, press the home button. You will hear a camera click and see a flash type effect on the screen. You can then find your screenshot by going to your photos and looking under camera roll.
When you are listening to the iPod on your phone, and you lock your phone to conserve power, you don’t have to unlock the phone to skip or pause a song. If you have the iPhone headphones, you can use the clicker, but if not, you can always simply double-click the home button whilst the phone is still locked, and you will get a set of music controls that drop down at the top underneath the time.
Your phone does in fact have an alarm on it, it’s just not in a quite-so-obvious place. Under the seemingly useless “Clock” application, pick the alarm icon in the toolbar. This will allow you to setup alarms with recurrence and change their sound. An interesting side note is that the alarm will still sound with your phone on vibrate. This is great because you don’t want phone calls waking you up, but you do want the alarm to.
I hope at least one of these is new to you. They were all new to me recently. The iPhone is such a great device in that it seemingly does everything and does most of it extremely well. I personally am looking forward to owning an iPad in the near future.
January 10th, 2010 | Published in ASP.NET
Mac people sometimes begin to believe that they are immune to normal PC problems. For the most part, this is very true. However, mac users will of course still experience the occasional setback from time to time. One that seems common to me is the old “My computer is slow” issue. If you have a PC, this is a much more convoluted issue as it could be any number of things from a virus, to a rogue program to a fragged disc. If you have a mac, the solution is likely much more simple.
Two things usually contribute to the slowness you experience on your mac. I’m not talking about slowness that comes from installing Leopard on an emac, or the slowness that comes from running pro tools on an ibook. I mean slowness where your mac is clearly slower than it was when you first had it.
1. Disc permissions
2. A Cluttered Desktop
Often times when your mac slows down, its because the permissions on your disc need to be repaired. This is really easy to do. Go to your disc utility in the Utilities folder in your Applications folder. Select your hard drive (Usually called Macintosh HD) and select “Verify Disc Permissions”. When this action has completed, select “Repair Disc Permissions”.
For some reason that I will never know, if you clutter the desktop of a mac – especially if its a G series mac running Tiger, the whole computer will slow down. Clear off your desktop. Put everything in folders somewhere in your home folder. You computer will look much better anyway after you do this.
After you have done these two things, you are going to do something that PC users do several times a week. Reboot. Don’t panic, it’s not going to become a habit.
Your mac should now be back to its normal speedy state.
BTW – I know I “sound” like an Apple Fanboi, but I’m not. I’m actually a PC. It’s a religious debate. I won’t start on it. Just know that I see the advantages in both systems and I choose PC.
November 20th, 2009 | Published in ASP.NET
I have been through this iteration twice now, so I wanted to share what I have found works for me in simple terms to get an ASP.NET site up and running on a set of load balance web servers.
I am not going to discuss the infrastructure site of this setup. That would include setting up your servers with a heartbeat and configuring your ASP.NET sites. The reason for this is that NLB strategies really vary from place to place depending on what hardware and network technology you are using. Setting up IIS sites is frankly very straight-foward, and there is nothing you will do out of the ordinary here.
Lets focus on what we need to do to the application first to get it ready.
If your application uses any sort of Session State objects at all, it is wise to put your session information in SQL Server. The reason behind this is that it really provides the best and most reliable source for keeping session information integrity between your two servers. Besides that, since you are load balancing your application, you need a source for the session state that is available to ALL servers in the farm.
Start out by creating your ASPState database on your database server. There is already a great article you can follow on how to do this here.
Its a rather long article, so let me outline the important stuff…
Now that the ASPState database is created, we setup our ASP.NET application to use it. In your web.config file, you will provide an entry that looks somewhat like the following…
<sessionState
mode=”SQLServer”
sqlConnectionString=”data source=yourDatabase;user id=dbuser;password=pwd”
cookieless=”false”
regenerateExpiredSessionId=”true”
timeout=”30″
/>
The documentation for what all these options do is located here..
http://msdn.microsoft.com/en-us/library/h6bb9cz9(VS.71).aspx
The sessionState block needs to go inside of the system.web section.
Now the next thing we need to do is to handle our View State between all the servers in our farm. The ViewState is tied to the machine on which it is generated. This information can be shared across servers, but it needs to be encrypted and decrypted. Fortunately, this is very easy.
Go to the following site, make no changes to the default settings and let it generate the web config setting that you need for you.
http://aspnetresources.com/tools/keycreator.aspx
Now put this tag in the web config immediately following your sessionState information.
You are now ready to publish your application to each of the load balanced servers.
November 20th, 2009 | Published in ASP.NET
In IIS 7, should you get this message, you are quite possibly dealing with an error in your web.config file(s). One way to know for sure is to set up your application under the Default Web Site (if you can) and try and view it from there. It will give you a more specific error if its under a site that can in fact be started. Its probably a syntax error like a missing tag or something of that nature.
There are other reasons for receiving this error as well. Here are some additional links regarding this error…
http://forums.iis.net/t/1149051.aspx
http://www.eggheadcafe.com/software/aspnet/31530837/iis7-support-for-isapi-fi.aspx
October 13th, 2009 | Published in ASP.NET
Josh Smith On WPF And MVVM
http://msdn.microsoft.com/en-us/magazine/dd419663.aspx
Josh Smith On Events And Commanding
http://joshsmithonwpf.wordpress.com/2008/03/18/understanding-routed-commands/
Shawn Wildermuth On Silverlight And MVVM
http://msdn.microsoft.com/en-us/magazine/dd458800.aspx
Kaxaml
XamlPad (Installed with Visual Studio)
C:\Program Files\Microsoft SDKs\Windows\v6.0A\Bin
A special thanks to Matt Slay for providing me with these additional links…
Linq To SQL changes in 4.0
http://damieng.com/blog/2009/06/01/linq-to-sql-changes-in-net-40
And for those of you out there lucky enough to still be working with FoxPro, here is a linq provider for dbf’s.
October 5th, 2009 | Published in ASP.NET | 10 Comments
I’ve had the annoying problem ever since I got my iPhone that I finally resolved today. Basically, we have a corp0rate wireless network that is WPA secured. My iPhone detects the network automatically, but when I put the TKIP password in, it says it can’t join the wireless network.
I tried to create a manual one under “Other”, but I kept getting the same error.
I couldn’t tell the iPhone to “forget” the network since I hadn’t joined it yet.
The secret here is to reset all your network settings by going to Settings / General / Reset.
In this menu, select “Reset Network Settings”. Accept the warning and a reboot will happen.
Now, go back into wireless settings and even though your network might be picked up automatically, do not configure it. Go to Other and set it up manually selecting the appropriate type of WPA authentication. That should do it.
Now I can connect my iPhone to SharePoint. Perfect.
September 21st, 2009 | Published in ASP.NET
I got this error this past week when working with a vendor who was exporting data in a .dbf (FoxPro). It turns out that this can happen for a bunch of reasons, but most often its because there is an overflow in the field. In other words, you may have a numeric field with a character in it. Or maybe a date field with a bad date in it.
I’m sure that this oddity makes perfect sense to FoxPro, but it causes the OLEDB provider to throw up all over itself – in the form of an error similar to “The Provider Could Not Determine The Decimal Value”.
In fact, if you open up the dbf and look at its contents, you will most likely find the offending row and column contain ** for the value. This would signify and overflow of some kind.
The solution is to either clean out the data in that column, or just don’t use the column. As long as you don’t reference the column, all your CRUD operations will work fine.
August 14th, 2009 | Published in ASP.NET
There seems to be much misconception about what my actual name is. This is due partially to the fact that I have let it go on unaddressed for some time out of a compulsion to not have to explain myself over and over.
So before further proliferation occurs, here is the real story.
My name is Thomas Burke Holland. The title of this blog reflects that. I am known to everyone (mostly everyone) as Burke. It’s what I’ve always been called. Unfortunately, my first name proceeds me in terms of corporate email account, and therefore many people call me Thomas.
I will gladly answer to both, but the preference is Burke.
I take full blame for not setting the record straight earlier on, and for even introducing myself as Thomas to those in my professional circle thus exacerbating said misunderstanding.
So a huge apology to all, and an open admittance that this does constitute an odd set of circumstances, but needed to be cleared up.
July 28th, 2009 | Published in ASP.NET | 2 Comments
As a developer, i so loathe the task of form validation. It’s a necessary evil for all developers at some point. I just wish it weren’t so painful.
Fortunately, the asp.net validators will do at a very simple level just about all of the validation that you need on a form.
I am going to be focusing in this post on the custom validator.
My advice for getting on top of these ASP.NET validators is to do two things. First and foremost, get to know javascript and how to use it to manipulate your form objects. Secondly, get familiar with the asp.net validators client API. ASP.NET validators will validate on the server, but lets be frank – you should not have to post back a page to validate it. That is time consuming, resource intensive, and interrupts the users experience. it’s also incredibly 2000 and late.
The custom validator is great, because you basically just pass it the name of a function where you will use javascript to do some validating.
Suppose we have a set of radio buttons, and a textbox. If the person selects “Yes”, we want the textbox to be required. If they select “No”, then the textbox is not required. This is very easy to do with the custom validator. Our HTML is going to look like this…
<asp:RadioButton ID="rbYes" runat="server" GroupName="TestGroup" Text="Yes" /> <asp:RadioButton ID="rbNo" runat="server" GroupName="TestGroup" Text="No" /> <br /> <asp:TextBox ID="TextBox1" runat="server"></asp:TextBox> <asp:CustomValidator ID="CustomValidator1" runat="server" ClientValidationFunction="validatePage">*</asp:CustomValidator> <br /> <asp:Button ID="Button1" runat="server" Text="Submit" />
Notice that we did not specify an error message in the custom validator. The error message is what shows up in the validation summary (should you choose to use one). The text attribute is simply what shows up on the page next to the control that fails validation.
Now we need a client function to validate the page.
function validatePage(source, args) { // get references to our page items var no = document.getElementById("rbYes"); var yes = document.getElementById("rbNo"); var txt = document.getElementById("TextBox1"); // check to see if they checked yes. if they did, // check to make sure the textbox is filled in with some // text. if (yes.checked) if (txt.value == "") { // setting the args.IsValid = false will tell our // custom validator that we failed validation args.IsValid = false; // optionally, we can set the error message portion // of the source object (the validator) source.errormessage = "You selected YES, so you must fill in the textbox"; } }
This will validate our form conditionally based on the selected radio button. See how easy that was? If you want to get fancy with your validation feedback, the asp.net validators fall a bit short. As long as you are content to stick with the basics, they are pretty much all you will need in your validation toolbox.