Microsoft's Enterprise Library

I recently received a questions regarding the best practices for doing data access.  My company has our own internal data access architecture and code generator that works great.  However, if you are starting a new project and don’t have an established architecture, I would take a serious look at Microsoft’s Enterprise Library as a starting point.  It contains many best practices regarding data access, logging, exception handling and more.  What’s better is you get the source code so you can tweak it as needed.  

There is also some great and affordable training on Enterprise Library available from Innerworkings.  I’ve blogged about Innerworkings before (here).  They have mastered e-learning.  Just go to the catalog on their site and you can find the Enterprise Library training in either VB.Net or C#.  I think the two part series will run you about $60.  Not a bad way to get a quick start in this stuff.

Posted in | 3 comments

JavaScript Performance

I subscribe to the Jeff Atwood’s Coding Horror blog and he posted this yesterday about JavaScript performance.  He also mentions that the browser market is getting more and more competitive so if you have a public facing web application make sure it looks good on all the latest browsers.  Sometimes us ASP.Net coders forget there are other browsers out there  

 

Posted in | 0 comments

ASP.Net 3.5 Extensions and ASP.Net Dynamic Data Support

I also installed the ASP.Net 3.5 Extensions yesterday.  I figured I might as well take the plunge on all this stuff.  I’m hoping to install and play with the ADO.Net Sync Framework sometime soon as well.  Anyway, the CTP for ASP.Net Extensions is an easy install.

The best source for information on this is Scott Guthrie’s blog.  If you don’t subscribe to his blog you should.  He post great stuff for developers of all skill levels.  Below are a couple of cool posts he’s done lately related to the Extensions CTP.

What’s Included in the ASP.Net 3.5 Extensions CTP

ASP.Net Dynamic Data Support

Posted in | 0 comments

Installing the Latest Version of the ADO.NET Entity Framework

Last night at the Installfest in Denver we got a quick look at the ADO.Net Entity Framework.  It looked interesting to me so I researched it a bit more today.  The overview here is a pretty good place to start.  I’d read through that first to get an idea of what we are trying to accomplish.  Then make sure you have Visual Studio 2008 installed and follow these steps to install the add-ons that allow you to start playing with the Entity Framework:

  1. Make sure you uninstall any previous versions of the ADO.Net Entity Framework.
  2. Install this hot fix for Visual studio 2008.  Honestly, I could not find much documentation on why this is needed.  For what it’s worth, I installed it and it didn’t break anything that I can see.
  3. Install the ADO.Net Entity Framework Beta 3.
  4. Install the ADO.Net Entity Framework Tools.
  5. Install the ADO.Net Entity Framework Samples.
  6. Check out this additional documentation.

If you were using the old version of the framework you might want ot check out this post about the breaking changes between Beta 2 and 3.

Other than that happy coding!  Please let me know how it goes and any cool things you find with this stuff.

Posted in | 0 comments

Visual Studio 2008 Installfest

Last night we had a great event in Denver.  It was called an ‘Installfest’ and included a free version of VS 2008, free drinks, great food, networking and great demos of the new features in VS 2008.

If you’d like to take a look at some of the stuff we discussed here is a link to Rob Bagby’s post with the info.

We also talked about many things that are not in these demos.  We spent some serious time on LINQ.  If you want to learn more about link you can get started by downloading my presentation and demos here.  Scott Guthrie’s blog also has a whole series on LINQ.

Finally, we touched on a couple of new things that look really cool.  The Entity Framework and the Sync Framework.  I did a bit more research on these two topics today.  I also installed all the extensions and add-ons to get these things working.  I will put the installation steps in a different post shortly so those folks looking just for the steps can find them.

Overall, it was a great event and I recommend going to an Installfest in your area.

Posted in | 0 comments

Software Developers Lifecycle

I’m a fan of Jeff Atwoods Coding Horror blog.  He does not just blog about technology, he also includes good information about the best practices and overall philosophies of being a software developer.  A great example is this post about the two types of programmers in the world.  If you didn’t read it please take a few minutes to read through it before continuing on.

I’d like to think that I’m in that top 20%, but in reality I’m probably in the top 20% of the 80% group Jeff describes.  I love coding, but I also enjoy many other things like spending time with family and friends.  Being the father of two children under the age of 5 (and another expected soon) when I get home it’s time to be a dad not a coder.  I also enjoy watching sports (This is my reality TV), playing sport, playing video games and generally getting out and enjoying life.  So, I rarely code on the weekend for fun.  I do it every now and then just to keep up with the latest and greatest .Net releases but it’s few and far between.

Right now your probably thinking who cares?  The reason I mention all this is that I believe just like the phases of the software development lifecycle, we as software developers also go through a ‘lifecycle’.  When I was fresh out of college I was all about the latest and greatest technology and spend much of my free time coding and researching.  I even took a weekend crash course in .Net 1.0 beta that took up my every weekend for 2 months.  It was fun.  At this point I was in the top 20%. 

However, once I got a family my free time diminished and I took a corporate job that allowed me to put in my 40 hrs a week and go home to my family.  At this point I fell into the 80% range.  Not that there is anything wrong with that. That is where I was at in the Software Developer Lifecycle.

Now, my kids are getting a bit a older and I’ve gotten back into the realm of consulting which gives me more flexible hours to ‘play’ with technology.  I’m trying to get back into the top 20%.

The moral of this post is depending on your life priorities you might have to change your perspective on the kind of developer you are.  Just like in the Software Development Lifecycle, you might have to drop into maintenance mode for awhile.  Then once your priorities change, you can add new features to your career or start back over at requirement gathering…

Posted in | 0 comments

Float DBParam to a Money column

I ran into a very interesting issue today.  I was passing in 0.0100 as a parameter to an SP.  When I ran it through debug it did not bring back any records.  However, when I called the exact same SP with the exact same params from SQL Server management Studio it worked fine.  I fixed it by adding a specific cast to my SP in SQL.  The Example is below:

where ShippingCostApplied = Cast(@ShipRateByCube as Money)

I think it might have something to do with the type conversion from .Net into SQL.  There is not a money data type in C# that I know of.  So, I was storing the data in code as a float.  Not sure why the float was not getting converted right, but keep this in mind when messing with the money data type.

Posted in | 3 comments

LINQ Slides and Demos

I’d like to thank everyone who attended my LINQ talk at the South Colorado .Net Users Group on Tuesday.  I thought it was a good discussion.  I’m still finding my way around LINQ myself and your questions and comments will help me become a LINQ master..

Below are the zip files from the meeting.  One is the presentation in both Office 2003 and 2007 format.  The other is all the demos.  You will need Visual Studio 2008 Beta 2.  You will also need to download and install the Entity Framework.  Enjoy!

I will do some research to answer some of the questions we could not answer and post my results.

File Attachment: LINQ Presentation.zip (1685 KB)

File Attachment: LINQ Demos.zip (1745 KB)

Posted in | 0 comments

Visual Studio 2008 Releases by the End Of The Month

Tim Heuer the .Net Evangelist out of Phoenix just spilled the news.  Read about it here.  I’m excited to start using it.  I’ve been using the betas off and on for about 2 months now and I really like it.

I’m also doing all my LINQ demos with the Beta 2 version tomorrow night at the South Colorado .Net User Group.  Stop by if you want a preview of LINQ or a quick look at Visual Studio 2008 in action. 

Posted in | 0 comments

LINQ talk at the South Colorado .Net User Group on Tuesday

Sorry for the recent draught of post out here, but I’ve busy preparing a talk I’m giving on Tuesday Nov. 6th at the South Colorado .Net User Group.  The group meets in Colorado Springs.  My talk is on LINQ (Language Integrated Query).  I’ve been doing research and creating samples and demos so I’ve had no time to post.  However, once I complete the talk I should have some time to blog about my LINQ discoveries as well as some CRM stuff I’m been hearing about.  Until then, I hope to see you all at the user group meeting.

Posted in | 2 comments

More On The ASP.NET MVC Framework

Here is Scott Hanselman’s take on it.

Posted in | 0 comments

ASP.NET MVC Framework

Having a small passion for Design Patterns I’ve been playing with the model-view-controller (MVC) pattern for awhile now.  Microsoft is working on a MVC framework for ASP.Net.  See Scott Guthrie’s post on it here.  This looks like a really cool thing and I can’t wait to play with it. 

Sometimes I see MVC being very useful for creating an application framework.  However, other times I see it being very cumbersome for making simple changes.  So, the one caveat I have to the ASP.Net MVC framework is to do some design first and see if it is necessary for your application.  For large enterprise applications this will be great.  For smaller web applications this may be overkill.

Posted in | 0 comments

DefaultButton Attribute in ASP.Net

I just found a cool attribute that you can use on many of the ASP.Net 2.0 and above controls.  Its the DefaultButton attribute.  You can use this on the Form tag to make one default button for the entire page or you can use it in the ASP Panel to make one default button for just that area of the page. 

It’s quit simple to use.  I had two different areas where users can enter values in a text box.  I found myself typing in values and hitting Enter to submit.  Well, the Enter key would cause a refresh of the page, but my handlers were not firing.  I added a panel around these two areas, set the DefaultButton attribute and bam, it works great now!

Posted in | 0 comments

Open Source vs. Proprietary

Here is a link to an article I found on the benefits and draw backs of these two software development philosophies.  There were only 228 companies surveyed, but the results are interesting. 

My take on this topic is that open source is anything but free once you take into consideration the cost of initial installation and maintenance.  However, with all the toolkits, extensions, SDKs, etc. that have to be installed these days to develop with proprietary systems, the gap is closing.

After developing so long on the proprietary side of things I find it hard to make the switch to open source.  So, many of the things I take for granted in the proprietary world just aren’t there in open source.

Posted in | 0 comments

Tools For Web Developers

I haven’t needed to use Fiddler for awhile and I noticed there is a 2.x version available here.  For those of you that have never used Fiddler it is very useful to debug Web Apps.  It allows you to view what is being passed between the server and the client.  Even the Ajax callbacks.  If you have not used it try and let me know what you think.

There are some additional links on the Fiddler install page that are useful for web development as well.  I use the IE Developer Toolbar often to debug CSS\style issues.  I have not used any of the IE Powertoys for WebDevs.  I’m installing it now.  I’ll let you know what I think.  Again let me know what you think of these tools.

Posted in | 0 comments

Follow-up on My Locking Issues

I finally was able to fix the issue in my previous post.  The problem was not the locking hint on the queries, but the fact that the column I was using in my where clause was not indexed.  So, even though only the row was being locked the next update needed to do a complete table scan to find the next row to update.  This table scan was blocked until the previous update finished.  Since these updates were all happening in the same transaction, deadlock occurred.  Once I indexed that column the issue went away.

Posted in | 0 comments

Being on the Bleeding Edge...

Just a quick post about being on the bleeding edge.  I’ve recently been working with Windows Workflow using the Service Broker to queue up my workflow requests asynchronously.  This is a great concept, but I’ve been amazed at the lack of quality information on these two pieces of technology.  Sure there is plenty of information about the theories of these technologies and how to get started.  However, there is a huge void of information about how to debug and fix things when they break.

This is one of the problems with working with new technologies right out of the gates.  Sure there will always be a learning curve when using technology that you are not familiar with.  However, the magnitude of that curve is far greater when the technology itself is in it’s infancy.  It takes much longer to get past an issue when you have to dig and use trial an error as opposed to searching the web and finding documentation, articles and\or blog posts on it.

This is the bane of my existence these days and I think there are many developers out there that would agree.  As soon as I get over the learning curve for a piece of technology the new version of, or a replacement for, that technology is released and I have to go through it all over again.  So, in essence I’m in a learning curve that never hits the down ward side of the curve!!!

In order to fulfill the demands of our clients we need to use the latest and greatest technologies (I’m getting pretty comfortable with all the Ajax stuff, now everyone wants to use Silverlight).  Don’t get me wrong, I really like learning and using new technologies.  Plus I take pride in being one of the first implementors of these new technologies.  However, it would be nice to sit back and write ‘Hello World’ apps every once and awhile…

Posted in | 0 comments

SQL Locking

Recently my database has been experiencing some deadlock issues.  The issues are due to some automation we’ve created to update inventory levels.  This automation is close to real time.  Meaning the inventory table is constantly getting updates and inserts.  This caused all kinds of locks and blocking.  To start with check out this MSDN article on Locking Hints.

In my case, I started by using row locks when doing my updates.  Here is a sample of my changed SQL:

Update Inventory WITH (ROWLOCK) set CountOnHand = @CountCurrentOnHand, Price = @Price, InventoryDesc = @InventoryDesc where InvID = @InvID

That reduced the deadlocks, but did not solve them.  So, I also added the NOLOCK to the queries that access the inventory table on a regular basis.  Here is a sample of the SQL:

Select * from Inventory with (NoLock)

This can be risky because doing so is a ‘Dirty Read’.  This means I could read data that has not been committed and might possibly be rolled back. In my case the inventory levels are important, but they are also verified and corrected on checkout.  So, for the time being we are running in this manner and keeping an eye on things.  Any comments are welcomed.    

Posted in | 0 comments

A couple cool free apps I've been using

I have not had a chance to blog about a couple apps I found online.

The first one is called Quest Comparison Suite for SQL Server.  This is an alternative to using Red Gate SQL Compare.  I have used Reb Gate in the past and it is great, but it is pretty pricey.  This tool is pretty impressive for a free tool.  It was written using the .Net 1.1 framework but still works well.  The only issue I’ve had with it is the way it creates the SQL scripts.  Sometimes it inserts transaction and rollbacks that cause some issues.  I turned those off and use this to create a SQL script that I then go in and modify a bit to get the job done.  Overall it is a great tool and it’s free!

The second is one I just downloaded and installed this week.  It’s called Synergy.  This is a great tool that let’s you share a mouse and keyboard between machines.  I know this doesn’t sound like anything to blog about, but let me explain how it works.  Most people know about KVM switches.  Well with this tool you can do the same thing that a KVM switch can do without the switch.  It uses the network instead.  So, as long as the two machines are on the same network you can setup Synergy to switch machines when your mouse hovers over any edge of your screen.  You configure which side of the screen goes where. 

I use Synergy because I have a laptop that I use to develop from home and a desktop that I use at work.  So, when I’m at work I can set this up so I can use the same keyboard and mouse and switch between my desktop and laptop.  It works like I have dual monitors setup but it actually switches from my desktop screen to my laptop screen and back.  It’s hard to explain, but it is cool. The only downside is the UI for this tool.  Setting it up is a pain through the UI, but once it is setup it is great.  If you want to try it be sure to read the documentation.  We all read the documentation before we use stuff right  

Posted in | 1 comments

Comments On Last Nights Design Patterns Talk

Last night I presented on simple design pattern at the Denver .Net User’s Group.  Here are a final comment:

During the presentation I received a very valid questions.  ‘Why use a pattern when I can just code the new functionality right into my concrete object?’  The answer I gave last night was you CAN code the functionality right into the base object.  That would work just as well as using a pattern to do it.  I stick by that answer.  If there was a cookie cutter solution for every software issue out there, we would all be out of a job.  From all the announcements on job posting before the meeting we can all see this is not the case.  What I’m trying to say here is that design patterns are not meant to be the end all be all of OO design.  So, don’t try to ‘fit’ your solution or design into one of these patterns.  Instead, focus on the underlying philosophies of these patterns to solve the problem.  The most common philosophy in patterns is coding to an interface.  Use interfaces and base classes as much as possible to provide flexibility and ease of maintenance.  So, when your out there researching and learning design patterns, try to think outside the box and by all means modify the pattern to solve your issue.

I got some great feed back from Brad Wood (Thanks Brad!).  He sent me a great link to Jeff Atwood’s blog post on the Gang of Four book and how it is misused in some cases.  It relates to what I said above.  I will let you read it and try not to skew your opinions of it.

The title on my blog is Keep it Simple Stupid.  I try to use that every day when I design and code.  Some design patterns are overkill for many issues.  So, the challenge we all have is to learn these patterns back to front so we know when a pattern is the right solution and when it is overkill.

Also, I forgot to mention this when I posted the samples and demos but if any of you have your own blogs feel free to post and link to my blog if you deem it worth.  That is all I’m going to say on it.

Posted in | 3 comments

Slides and Samples From My Presentation At The Denver .Net User Group 07/23/2007

This zip file contains everything from my presentation last night.  If you were not able to make it please check out the Power Point because I made it a point to be pretty descriptive on my slides to allow people to review the patterns and make sense out of the demos.  If you have any questions feel free to email me at BenH@coloradotc.com or just comment on this blog.

A couple of things about the demos.

  1. If you have attended this talk in the past at another user group or code camp, you might want to get and look over this presentation again.  I re-did all the demos and made extensive changes to the slides.  So, take a look.
  2. You must run the script in the “DBScript” folder against you SQL server if you are going to use the SQL server provider.  This script will create the DB, the tables, the stored procedures and finally fill in all the sample data.
  3. After you run the DB script to create your DB you will also have to change the connection string in the SQLDAL.cs file to connect to your SQL server.
  4. I used Access 2007 in the demo, but I have also provided an Access 2003 version for those of you who do not have Access 2007 yet (Shame on you if you don’t… :-))
  5. Again, if you want to use the Access provider you will have to change the connection string in the MSAccessDAL.cs file to point to the proper file.
  6. I had a problem with my Add Vacation decorator demo.  I have not had a chance to fix that yet.  Once I do get it fixed I post the file again to this site.  Hopefully, I will do that in a couple days.

Other than that happy coding.  Please add my blog to your aggregator.  I have already received some good feedback from last night’s talk and I have a few comments of my own that I will be adding out here shortly.

File Attachment: DesignPatterns.zip (1223 KB)

Posted in | 0 comments

Troubleshooting SQL Server 2005 Service Broker

My latest project has not only required me to use Workflow but also to create and use a Service Broker on SQL Server 2005.  Service Brokers are similar to MSMQs (Microsoft Simple Message Queues) except they are managed by SQL Server 2005.  For a great introduction to Service Brokers check out this intro on The Code Project.

Service Brokers are pretty simple to understand.  There are also many articles out there on how to set one up.  Most of this is pretty simple to setup as well.  However, there is not much out there on how to troubleshoot if something goes wrong.  In my case, I’m still not 100% sure what did go wrong..   However, I do know it is fixed now. 

The frustrating thing is that when I actual started the conversation and sent the message I got no errors.  All I knew was that the queue was still empty and my receiver never got the message. 

I stumbled across a great article on troubleshooting here.  This article helped me put together a series of queries that ultimately led me to determine the errors I was getting.  Here is the query I created:

-- This query get's incremented if your msgs are having errors

select p.*

from sys.objects as o

join sys.partitions as p on p.object_id = o.object_id

where o.name = 'sysxmitqueue'

 

-- Error messages in the queue are located in the transmission_status field

SELECT *

FROM sys.transmission_queue

 

SELECT conversation_handle, is_initiator, s.name as 'local service',

far_service, sc.name 'contract', state_desc

FROM sys.conversation_endpoints ce

LEFT JOIN sys.services s

ON ce.service_id = s.service_id

LEFT JOIN sys.service_contracts sc

ON ce.service_contract_id = sc.service_contract_id;

These queries give you all the system related info about the brokers.  Hopefully you can use this to troubleshoot your own Service Broker.  

Posted in | 3 comments

Been Learning Windows Workflow

Sorry for the lack of posts lately!  I’ve been working on a project involving Windows Workflow and it’s been consuming all my time.  I’ve also had a run of personal events that have been taking up any free time that I’ve had.  The nice weather of the spring season has also been calling me to get outdoors.  Anyways, I’m back and ready to blog all my experiences with Workflow.  So, be ready for many new posts in the next few days.

Posted in | 0 comments

Interesting Concept - BungeeConnect

I thought I would pass this on.  I have not had time to go through all the screenshots and videos, but basically this is web development environement where the IDE is actually an online website.  So, you can develop web pages from within a web page!  Kind of ironic.  They also let you deploy your web site to thier infrastructure so you don’t have to worry about hosting and such.  SAAS for the web developer.  Who’d of thought.

Posted in | 1 comments

New Release of the MS CRM SDK

Just wanted to let everyone know that they released a new version of the CRM SDK on May 1st.  Download it here.  Also, learn more about customizing and developing with MS Dynamics CRM 3.0 here.  Enjoy!

Posted in | 0 comments

Microsoft Stoled .Net?

I had to put this out here.  In short a company is suing MS for patent infringement saying they have a patent on using XML to define web sites.  I think this is a move to get some free press and nothing more. 

It does bring up an interesting point about patents and software.  How can you patent software?  It is so easy to grab sample code from the net and tweak it to work in your application.  So, does the code have to be an exact match for it to be patent infringement?  Or is it sufficient to say that if software solves the same problem in the same way it is an infringement?  I think there is some gray area there.  Any Comments?

Posted in | 0 comments

E-Learning With Innerworkings

I found this offer from Innerworkings today and wanted to pass it along.  It’s a free trial of their new Ajax learning for ASP.Net.

I had the opportunity to work with some of Innerworking’s object oriented related courses (innerworkings calls them drills) when I was doing some supplementary web casts on the same topics for FDC.  I have to say their e-learning methods are top notch.  Instead of everything being web based, they have you install their client interface.  It is a great interface and the drills really walk you through the processes of solving real world problems. 

If you are a manager\team lead and are trying to get your people up to speed with new techniques\technologies, Innerworkings is a great way to go.  It is also great for the software professional who is just trying to upgrade his\her skills to the latest technology.

Obviously, I highly recommend them.

Posted in | 0 comments

Grasshopper 2.0 CTP

I must admit that I bleed Microsoft and the .Net Framework when it comes to software development.  So, I’m not very familar with the J2EE or Linux platforms but I recently came accross a link to a plug in for Visual Studio that will let you deploy and convert your projects to these platforms.  I thought it was interesting so if you want to know more click here.

Posted in | 0 comments

Software Factory For WCF

This has been out for a few months, but I just ran across it.  This is an update to the Web Services Software Factory that was released by the Patterns and Practices group last year.  This one includes loads of stuff that will help you use WCF and also migrate your current asmx web services over to WCF.  Check it out!

http://msdn2.microsoft.com/en-us/library/aa480534.aspx

Posted in | 0 comments

ASP.Net Tutorials

I recently found some ASP.Net tutorials out on Scott Guthrie’s blog.  These are great if you would like to walk through some of the ins and outs of using data in ASP.Net.  Obviously, you also get some exposure to ASP.Net in general since you must be pretty familar with ASP.Net in order to start working with data.  Click here for Scott’s post.  

Posted in | 2 comments

Nice WPF/E (I mean SilverLight) Post

David Yack and I presented at the Utah Code Camp last weekend.  Dave’s presentation on WPF/E was tremendous!  He has a great post with tons of links to good WPF\E resources.  Check it out here.  Also, check Dave’s blog for updates on WPF/E, which has now officially been renamed Microsoft SilverLight.

Posted in | 0 comments

Windows Workflow Foundation (WF)

Unfortunently, one of the presenters scheduled for the Spring Utah Code Camp had a dirt bike accident and could not do his presentation.  So, Pat asked for someone to step in and I volunteered to fill in with a talk on Windows Workflow Foundation (WF).  I was surprised that many of the people that attended the session had never really heard of WF.  I was, however, relieved that my talk had the right audience.  This presentation is aimed at those developers that had never seen or worked with WF.  It is pretty high level and the demos are pretty simple.  That being said it is great way to get familiar with WF and the benefits it brings to the table.  There is tons of information and samples on WF out there on the web, but this presentation and demo is a great way to spend 1 – 2 hours getting your feet wet with WF.  The presentation and demos are below.  There are two files. One that is over 35 MB and includes all the demo videos I got with the Launch Kit for WF.  These videos are also great ways to get up to speed with WF and I recommend talking the time to watch them.  If you want to simply get the slide deck and the demos, that file is only 1.5 MB.  So, choose wisely…

File Attachment: WF With Video Demos.zip (34795 KB)

File Attachment: WF No Video Demos.zip (1718 KB) 

Posted in | 0 comments

Simple Design Patterns

I presented on Design Patterns at the Spring Utah Code Camp today in Salt Lake City.  Thanks to all of you who attended and thanks to Pat Wright for allowing me to attend and present.  I love learning new stuff as well as passing on my experiences with .Net to other people.  The talk was only one hour so I had to limit myself to the patterns I thought were the most useful.  However, there are so many cool and useful patterns out there that I ran out of time.  I’ve included all my demos and the slides in the zip file below.  Please feel free to add any questions or comments to this blog entry or email me at benh@coloradotc.com.

File Attachment: Design Patterns.zip (1451 KB)

Posted in | 0 comments

Deploying A WCF Service As A Virtual Under An Existing ASMX Site

I’ve been working on a new system that will report system health both from the health of the server (CPU Usage, Memory Usage, Disk Space, etc…) and the health of the application (# of Orders, # of Errors, Inventory Levels, etc…).  The system uses a WCF service to collect all the data.  I recently got it working great on my machine.  However, deployment has been an adventure.  If you are going to use WCF please read through the following documentation before you try to deploy:

http://msdn2.microsoft.com/en-US/library/aa751792.aspx

http://msdn2.microsoft.com/en-us/library/b044b1c9-c1e5-4c9f-84d8-0f02f4537f8b.aspx

Also, remeber that you can only have one address per binding in a WCF service.  This bit me because you cannot have a WCF service hosted in IIS if you have multiple Host Headers\IP addresses defined for the the site.  I wanted to have an internal address for my WCF service so I could call the servers in my cluster individually to determine thier health.  That caused the following error:

This collection already contains an address with scheme http.  There can be at most one address per scheme in this collection.
Parameter name: item

So, if you ever get this error check your bindings and make sure you do not have multiple Host Headers\IP addresses defined in IIS.  Also make sure you only have one address defined per binding.

Posted in | 0 comments

Code Camp In Utah

As I mentioned in an earlier post, David Yack and I are both attending and presenting at the Code Camp in Uah.  Here are all the details:

What: Utah Spring Code Camp

When:  April 14th 2007 9:00-5:00

Where: Neumont University

Registration: http://utahcodecamp.eventbrite.com

 

The local .NET Users Group and SQL Server Users Group is conducting a “Code Camp” for local software programmers next month at Neumont University.  The code camp is by the community for the community.  Always free and Always for the community.

 

The Saturday, April 14th event is scheduled from 9:00 AM to 5:00 PM. The conference is free please register at. http://utahcodecamp.eventbrite.com

Lots of Sponsors and Lots of software and Tech Gadgets to giveaway!

You can check out www.msutahevents.com  for a session schedule and speaker list for the Code Camp.

 

Posted in | 1 comments

South Colorado .Net User Group Vista and Office 2007 Launch

I’d like to say thanks to everyone who attended the South Colorado .Net User Group’s Vista and Office 2007 launch.  I think everyone had a great time.  Unfortunently, I did not have enough time to get thru all the stuff I had planned.  No big deal.  I’ve attached a zip file with the presentaion and all the demos to the bottom of this post.  So, please download that and take a look at everything.  There is a bunch of good info and samples  in there.  Many of the WPF samples included media so the download is big (approx. 30mb).  Here are a couple of pictures as well:

DSCF0001 DSCF0014

DSCF0012 DSCF0004

DSCF0007 DSCF0008

Download Developer Slides and Demos

Posted in | 0 comments

Quick Update On My Upcoming Events

Hopefully many of you are planning on joining us tomorrow at the Southern Colorado .Net User Group meeting for the Vista and Office 2007 Launch.

Also, my talk on Design Patterns scheduled for the May .Net User Group meeting has been changed to the July meeting.  The May meeting has been cancelled due to the Memorial Day Holiday.

Posted in | 0 comments

"Access Denied" JavaScript Error

I ran into an interesting issue this morning with one of the sites I’m working on.  I’m using Ajax and some JavaScript to do multiple things on my site.  We rolled the site out to production and started getting “Access Denied” JavaScript errors all over the site.  We were NOT getting these errors in test and I could not understand why.  I searched online to see if I could get any clues about how to fix this.  I found one article that discussed this error being related to security when working on window objects that are in two different domain (ie. trying to use “http://www.mydomain.com” and “http://mydomain.com” as config values on the same site).  So, the problem turned out to be that we were doing some domain forwarding and cloaking through zoneedit.com.  The cloaking displays “www.mydomain.com” in the address bar no matter what page you go to in the site.  Turning the cloaking off fixed the problem.  Cloaking is not a real high requirement for us so just turning that off is OK for us.  I’m not sure if there is a fix to get both the cloaking and the JavaScript to work.  Our site is working fine now so I’m not going to pursue it, but if someone finds the answer to that question please post that comment here for future reference.

Posted in | 1 comments

FYI For Vonage Users

This has nothing to do with .Net, but I thought there might be a bunch of people out there with Vonage that might be affected by this.

Vonage Patent Infringement

Posted in | 2 comments

Validator Control Errors when Upgrading to RTM Version of Ajax

Many of you may have already seen this and fixed it.  I know that I had dealt with this once before, but I could not remember the fix.  So, I figured I’d blog it so if\when I come accross it again I can use this post as a reference to the workaround.  Here is the scenario:

We have been using the CTP version(s) of Ajax for many months now.  The RTM version was released and the validation controls were moved to a different release and were not included in the RTM version.  These controls that were left out caused the following error:

Could not load type 'System.Web.UI.Compatibility.CompareValidator' from assembly 'System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35'.

There is a great post here or here that explains this error in more detail, but I will give you the cliff notes version real quick.  This error is directly related to these Web.Config entries:

<tagMapping>

<add tagType="System.Web.UI.WebControls.CompareValidator" mappedTagType="System.Web.UI.Compatibility.CompareValidator, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/>

<add tagType="System.Web.UI.WebControls.CustomValidator" mappedTagType="System.Web.UI.Compatibility.CustomValidator, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/>

<add tagType="System.Web.UI.WebControls.RangeValidator" mappedTagType="System.Web.UI.Compatibility.RangeValidator, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/>

<add tagType="System.Web.UI.WebControls.RegularExpressionValidator" mappedTagType="System.Web.UI.Compatibility.RegularExpressionValidator, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/>

<add tagType="System.Web.UI.WebControls.RequiredFieldValidator" mappedTagType="System.Web.UI.Compatibility.RequiredFieldValidator, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/>

<add tagType="System.Web.UI.WebControls.ValidationSummary" mappedTagType="System.Web.UI.Compatibility.ValidationSummary, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/>

</tagMapping>

If you are not using any of these controls then you can simply remove these entries.  They are located in the <pages> section in the Web.Config.  I would try this first and recompile to see if this fixes the issue.  If you are using the Validation controls then you will need to download this dll and reference it from your web project.  You will aslo need to change the Web.Config settings from above to look like this:

<tagMapping>

<add tagType="System.Web.UI.WebControls.CompareValidator" mappedTagType="Sample.Web.UI.Compatibility.CompareValidator, Validators, Version=1.0.0.0"/>

<add tagType="System.Web.UI.WebControls.CustomValidator" mappedTagType="Sample.Web.UI.Compatibility.CustomValidator, Validators, Version=1.0.0.0"/>

<add tagType="System.Web.UI.WebControls.RangeValidator" mappedTagType="Sample.Web.UI.Compatibility.RangeValidator, Validators, Version=1.0.0.0"/>

<add tagType="System.Web.UI.WebControls.RegularExpressionValidator" mappedTagType="Sample.Web.UI.Compatibility.RegularExpressionValidator, Validators, Version=1.0.0.0"/>

<add tagType="System.Web.UI.WebControls.RequiredFieldValidator" mappedTagType="Sample.Web.UI.Compatibility.RequiredFieldValidator, Validators, Version=1.0.0.0"/>

<add tagType="System.Web.UI.WebControls.ValidationSummary" mappedTagType="Sample.Web.UI.Compatibility.ValidationSummary, Validators, Version=1.0.0.0"/>

</tagMapping>

This should fix the problem.

Posted in | 0 comments

My Upcoming Speaking Events

Just wanted to put a quick update out here to let everyone know my schedule for the next couple of months.  Below is a list of my upcoming speaking engagements:

April 3rd: Launch Speaker at the Vista and Office 2007 Launch for the South Colorado .Net User Group

April 14th: Simple Design Patterns That Solve Real World Development Issues at the Code Camp in Salt Lake City Utah

May 21st: Simple Design Patterns That Solve Real World Development at the Denver .Net User’s Group

Please join me at these events to learn about .Net and have some fun as well.

Posted in | 0 comments

Vista Remote Desktop

Once you install Vista you start getting some annoying security messages when trying to remote from Vista to Servers or PCs that do not have the latest version of Remote Desktop.  I found a cool post on Scott Forsyth’s blog that discusses how to turn this off and the risks\rewards of doing so.  Check it out here.

Posted in | 1 comments

Test with new Version of Blog Jet

I just upgraded to the 2.0 version of Blogjet to see if i can get it to connect to my blog correctly.  Here are a few test pictures:

Vader Me

Posted in | 0 comments

A few things I learned about Vista yesterday

Just wanted to share a couple of things I learned about Vista yesterday. The first is the search capability. I had been getting to my files the old XP way. Opening Windows Explorer and navigating to the folder where the files reside. With Vista, if you open the Start Menu, you will see a search text box at the bottom. I guess I just ignored this or though it would use Windows Live to run an internet search. This search will search your computer for a bunch of things. It will search for programs, files, things in your web favorites and web history as well as all your emails. I recommend you give it a try. Type in “Vista” and see what you get. Secondly, you can create peer to peer wireless connections with Vista. You do not need a wireless router or anything special. I need to do some more research and testing. As a side note, a funny thing happened yesterday while the guy was demoing this. The presenter casually said “Let’s see if there are any wireless networks in my range”. He opened his network sharing center and said “There are some networks.” and walked away. The crowd started laughing. He didn’t look closely at the IDs of the networks and someone had created a peer to peer network named “Fukoff”. It was the first in his list in huge bold letters on the screens…. I learned tons of other stuff and I will try to put that in a few more posts.

Posted in | 0 comments

The .Net Runtime

I recently completed this Presentation for FDC. It went pretty well. The title of this presentation is a bit vague so I will explain what it covers. The first section is on how to create custom config setting either in the app.config or the web.config. The first demo uses the settings that are built in with Visual Studio 2005 then the next demo uses a custom section to work with some more advanced settings. The next pieces of the presentation are related to manged vs. unmanaged code and how to handle unmanaged resources safely. Then the presentation jumps into Reflection. The second demo builds on a previous demo and uses reflection to determine what file format to use for application logging. The final section deals with how to invoke unmanaged code from within .Net and also how to wrap your .Net code so it can be used by unmanaged applications. So, there is a melting pot of subject matter. If you have any questions please place some comments on this blog and I will get back to you. Here are the demos and the slides. DotNetRuntime.zip

Posted in | 0 comments

Do not upgrade to new Blogger.Com version if you use Third Party blogging software

I recently upgraded to the new version on Blogger.Com for this blog. I wish I wouldn't have because now I cannot get BlogJet to post anymore. The issue is that in order to use the new Blogger.Com you have to create a Google account to use as your login. Well, apparently the third party blogging apps do not know how to connect using your Google account. If I use my old username and password I get a msg stating that my old account was migrated to a Google account. If use the email address and password of my Google account I simple get an invalid user name and password msg. Very flustrating. I might have to look around for a new blogging engine in order to fix this. I recently upgraded to Vista and Office 2007 and I have tons of stuff to blog about, but I hate using the web interface.

Posted in | 3 comments

Inputs and Outputs

I recently completed this Presentation for FDC.  It went pretty well.  The main part of the demo is how to do file IO and compression.  There is also a bit of regular expressions and network stuff.  The network stuff i had never used.  When it comes to sending data and messages I usually use Web Services.  So, there is a Web Services demo included.  However, my final last ditch effort to get the Web Services demo working with the DeflaterStream failed.  It would not let me pass this stream as a parameter to my web service because it is not serializable.  I will work on that tonight to see if there is a fix.  Here are the demos and the slides.

InputOutput.zip (340 KB)

Posted in | 0 comments

SQL Server 2005 Disk Size Report

I previously blogged about a way to determine the sizes of your tables in a SQL 2005 DB.  That blog entry is still valid and is still useful.  There is a solution to this provided by SQL Server 2005.  The option has to be enabled on the server to be able to use it.  If it is available, you can click on the database, then in the summary window title bar click the “Report” drop down and select “Disk Usage”.  This report will give you the overall disk usage of the DB.  If you scroll down you will see a label named “Disk Usage By Tables”.  If you expand that you can get the table sizes in a grid that is similar to the one I previously blogged about.  So depending on what you need the data for and what security you have on the DB,  using one of my blog entries on this subject you should be able to get the table sizes.

Posted in | 6 comments