CodeStock coming August 9th to Knoxville

CodeStock is coming August 9th to Knoxville, Tennessee and you should see the speaker line-up! Jeff Prosise will present the opening keynote and Alan Stevens will mediate the open spaces. There’s a ton of great presenters that will be at CodeStock including Steve Andrews, Rachel Appel, James Avery, Jason Follas, Amanda Laucher, Chris Love, Wally McClure, Jeff McWherter, and more! Be sure to check out the agenda at http://codestock.org/Pages/Agenda.aspx and register for the event today!

UPDATE: Unfortunately, I won’t be able to present or attend CodeStock due to a prior engagement. Hopefully Steve Andrews and Rachel Appel can still attend and make Pennsylvania proud.

Getting Started with the AjaxDataControls in Visual Studio 2005

Sonu Kapoor just posted about getting started with the AjaxDataControls in Visual Studio 2005. The AjaxDataControls can be found on CodePlex at http://www.codeplex.com/AjaxDataControls/. Included in the controls are a JavaScript version of the Repeater, DataList, and DataGrid. If you’d like to have AJAX functionality over your data with minimal coding, I’d definitely check this out.

AJAX Tip: Don’t forget about the Async Web Service Calls!

FireFox. Internet Explorer 8. Both have great JavaScript debugging tools. Thanks to those tools, I only spent 5 minutes on an issue that could have taken hours to figure out. It was one of those moments when you know its something simple but you can’t figure out what it is. I had a page that loaded web service data into an AjaxDataControl Repeater. After the web service call, I entered some JavaScript to grab a page parameter and choose the item on the page that was selected. When I ran the page, I received an error that the object was undefined. However, if I added an alert to check the parameter, the page loaded fine. After using one of the debug tools I saw that the data wasn’t populated yet. That’s because ASP.NET AJAX makes web service and WCF calls asynchronously. To resolve this issue, I moved the code from the page load method to the method assigned to the successful data binding.

Sometimes you need to take a step back, take a deep breathe and realize what you’re working with. Other times you have to rely on the tools at hand. :)

LINQ to SQL and MS Small Business Server 2008 Talks at .NET Valley

The next .NET Valley User Group event will be on June 18th at Scranton University in Scranton, Pennsylvania. There will be two talks that evening. The first will begin at 6pm and will be presented by Michael Murphy. Michael will talk about the ins and outs of Microsoft Small Business Server 2008. The second talk will begin at 7:15pm or so and will be presented by yours truly. I will be talking about LINQ to SQL. To register for the event, please visit http://dotnetvalley.com/events/eventdetails.aspx?eventid=59.

Performance Tip: Return Only Necessary Columns Using LINQ

I was running into an issue where one of my webmethods was taking a large amount of time to return a small set (5-10 objects). I was using LINQ to SQL. I noticed that the LINQ to SQL query was returning all of the rows. After looking into the table a bit further, I noticed that the table included some columns with a larger type (old text column, image column, etc). So, I decided to modify my select to contain just the columns I needed. It improved my response time from roughly 8 seconds to 250 milliseconds. Here’s a sample select statement:

From t In db.News _
Where t.NewsID = NewsID _
Select New With {.Title = t.Title, .Abstract = t.Abstract, .DatePublished = t.DatePublished)


Instead of enumerating these items as type NewsPosting, I had to build a list of type Object or create a new custom type. For my purpose, a Generic.List(Of Object) worked just fine.

A circular reference was detected while serializing an object of type ‘XXX’

I ran into an issue earlier when trying to return an entity class through a web service for use in an AJAX page. After some quick research, I came across a post by Darren Neimke that referenced Rick Strahl’s post about LINQ to SQL and Serialization. For me, performing the first work-around and setting the relationship to ‘Friend’ worked.

Thanks Rick and Darren!

DirecTV: The Saga Continues…

I received an email from DirecTV about my blog post. They gave a 1-800 number and a 4-digit code so I can reach their team directly. I tried using that number and sat in a queue for nearly 20 minutes. Finally, someone answered and had no clue what my situation was. She placed me on hold for 5 minutes to review my account. Once she came back, she told me that I should have never ordered service with only 1 line. After my head spun completely around, I proceeded to ask her how DirecTV was going to fix this issue. She told me that "their" solution would be for me to purchase a Single Wire Multi-Switch (SWM) out of pocket. However, my one receiver wouldn’t work with it so I’d also have to upgrade that receiver to a DVR or HD receiver. In all, I’d be out $400. But, since I was a loyal customer, they’d provide me a $10 credit each month for 6 months. So, I’d still be out $340. I asked her repeatedly if this was what they told other customers and she said they usually don’t provide any credit. At this point I was extremely irate. 20 minutes later she offered a $10 credit each month for 12 months. I asked her to review with her supervisor and come back with her best offer before I switch service and after being on hold for 2 minutes, I was disconnected.

So, how does it make sense for someone to ask me to remain being a customer by paying $280 out of my own pocket when I can go elsewhere and not have to pay a dime? I’m really getting frustrated and I think I’m going to look into my options a bit further.

Thanks to all for providing feedback thus far.

Original Story: http://weblogs.asp.net/jgaylord/archive/2008/06/02/directv-the-story-of-bad-customer-service.aspx

Need "Out of the Box" AJAX Functionality for Your Data Controls?

I’ve been using the Ajax Data Controls (ADC) for 9 months. I recently joined their development team to convert the controls to VS 2008/.NET 3.5. It’s a really cool control set that uses AJAX for the complete data transaction. The documentation is pretty deep and there are a few good examples. You should check it out by visiting http://dotnetslackers.com/projects/AjaxDataControls/. You can download the source and binary on CodePlex by visiting http://www.codeplex.com/AjaxDataControls.

If you have any suggestions, please pass them on. I’d prefer if they were submitted using the Issue Tracker on CodePlex.

Establishing a VPN on Windows Mobile 5

Many have found it difficult to establish a VPN connection on Windows Mobile 5. There are quite a few blog posts out there with instructions, but none are really that complete. Before you can establish a connection from your mobile device, you need to establish a VPN server. For my purposes, I’ve setup Routing and Remoting Access on a Windows Server 2003 box (Windows Server 2008 procedure). This is pretty simple to do and there weren’t any settings I needed to modify. Then, on the user account in my domain, I had to right-click and go to properties. There is a section under the Account tab called Account Properties.


 AccountOptions


Click the checkbox that says “Store password using reversible encryption.” Now that VPN is setup on our Windows Server 2003 box, we can setup our mobile device.


On your mobile device, click the Windows Flag/Start button, and go to Settings. Then click the Connections tab and the Connections icon.


Settings


Under My Work Network, Click Add a new VPN server connection


 Connections


Enter your public IP Address (not 192.168.1.1 but the address available from the outside) and choose the appropriate VPN connection type.


 New VPN Connection


Then enter your user credentials and choose Finish.


 credentials


Your VPN connection is now setup. When you want to connect to VPN, go back into Connections, choose Edit my VPN Servers, and click and hold the VPN until the context menu appears for Delete and Connect. Choose Connect to attempt your connection.


 Connect


I’ve noticed that the connection does drop from time to time, but the checkbox under your user profile above should minimize this.