by
Maurice via
Maurice de Beijer
on
8/13/2009 5:26:44 PM
Recently I started using ASP.NET MVC for a real project. SO far I had been reluctant to use ASP.NET MVC as it meant giving up on the post back model that so many of the available ASP.NET controls depend on. Yet a lot of people I know and respect where saying good things about ASP.NET MVC so I decided to try it out on a small but real project. Well the project isn’t finished yet but I am a convert Using ASP.NET MVC is much nicer that I expected it to be. Sure the post back mo ... [ read more ]
|
by
Maurice via
Maurice de Beijer
on
8/13/2009 12:40:20 PM
I am working on a new ASP.NET MVC app and like so many other applications out there I need to log any errors should they occur. recently I heard about ELMAH Error Logging Modules and Handlers for ASP.NET through this blog post of Scott Hanselman. So as using en existing and proven solution is always better that reinventing the wheel I decided to try ELMAH and see how easy it is to get started. Well I can only say I am positively amazed at how easy it is. S ... [ read more ]
|
|
by
Maurice via
Maurice de Beijer
on
7/3/2009 8:12:54 PM
The question of what Windows Workflow Foundation version 4 means for developers currently developing using WF recently came up. As I mentioned before WF 4 is a complete rewrite and doesn’t use any of the existing WF 3 classes. The design of WF 4 is even quite different from the design of WF 3. So are WF 3 developers completely left in the dark and have to start from scratch? And what about their existing applications, will they still run on .NET 4 or are they stuck in .N ... [ read more ]
|
|
by
Maurice via
Maurice de Beijer
on
6/30/2009 4:34:38 PM
A recent article I wrote for the MSDN website just went live. Read is here .
|
by
Maurice via
Maurice de Beijer
on
6/30/2009 1:51:03 PM
Passing parameters into a workflow is similar in WF4 as it was in WF3. In both case a Dictionary<string, object> is passed in when creating the workflow instance object. Alternatively when using the WF4 WorkflowInvoker you can pass it into the Invoke() method. This is quite simple but I have never been a fan of the very loose coupling here. basically on the outside you have to create a dictionary with as key something inside of the workflow. No compile time checking. No improvement ... [ read more ]
|
|
by
Maurice via
Maurice de Beijer
on
6/22/2009 1:18:11 PM
As you may have heard Windows Workflow Foundation 4 is not an upgrade from Windows Workflow Foundation 3 (or 3.5). The version numbers might suggest that the previous version was quite mature but in fact it refers to the version of the .NET framework. In fact Windows Workflow Foundation 3 was the first version and 3.5 added only very few features and some bug fixes. And as WF 4 is a complete rewrite we should approach it as a new product and forget just about everything we already know about WF ... [ read more ]
|
|
by
Maurice via
Maurice de Beijer
on
4/27/2009 8:57:46 AM
Using the declarative DomainDataSource that is part of the upcoming Silverlight 3 RIA services makes it quite easy to work with data. All you need to do is add a DomainDataSource control to the the XAML, point it to the generated DomainContext class (in this case NorthwindContext) and tell it which method to use to load the data from the web service(in this case LoadCustomers). Next add a DataGrid to display the data and you are good to go. < UserControl xmlns:dataControls ... [ read more ]
|
|
by
Maurice via
Maurice de Beijer
on
4/7/2009 2:23:46 PM
The View – Model – ViewModel design pattern, also known as MVVM, is getting more popular these days. I have found it extremely easy to use when developing very different applications and have used the design pattern recently in both ASP.NET, WPF and Silverlight applications. However easy as it might be is seems to confuse people as I have seen some terrible examples where people make a complete mess of things. Josh Smith did an excellent screen cast for Pixel8 on using MVVM with WPF, you ca ... [ read more ]
|
|
by
Maurice via
Maurice de Beijer
on
3/11/2009 4:25:00 AM
Attached is are the samples and slides I used for my intro into WCF talk yesterday at the VB Central meeting in the Netherlands.
Download samples
Enjoy!
www.TheProblemSolver.nl Wiki.WindowsWorkflowFoundation.eu
Now also on twitter at http://twitter.com/mauricedb
|
|
by
Maurice via
Maurice de Beijer
on
3/7/2009 11:08:09 AM
Last week lots of MVP, myself included, where in Redmond visiting Microsoft on our yearly MVP pilgrimage. The MVP Summit is always a great event. Not only do we get to talk to the MS team members who actually design and build all the software we love and use but we also get to meet each other. And with MVP’s being located around the world that is kind of rare as well. Despite this being a great event I still have very mixed feelings about this last MVP summit. The problem isn’t the events it ... [ read more ]
|
|
by
Maurice via
Maurice de Beijer
on
2/25/2009 8:11:13 AM
Roy Osherove has just released SilverUnit, a unit testing framework for Silverlight code. I haven't tried this yet but it certainly looks really interesting as you can start running your Silverlight unit tests inside of MS Test or NUnit. And kind cool to hear this is written in VB You can find more information and download SilverUnit from CodePlex here. Enjoy! www.TheProblemSolver.nl Wiki.WindowsWorkflowFoundation.eu
|
|
by
Maurice via
Maurice de Beijer
on
1/6/2009 12:02:05 PM
When developing Silverlight line of business (LOB) applications we often need to get at some data from a database. There are various ways to do so. One option that is easy to get started with with is creating an ADO.NET Entity Data Model (EDM) and exposing that entity model using an ADO.NET Data Service. Getting started The first thing we need to create is an ASP.NET Web Application. This is basically going to act as a container for our Data Service and our Silverlight LOB app ... [ read more ]
|
|
by
Maurice via
Maurice de Beijer
on
11/18/2008 1:50:52 PM
In my previous post I created a horizontally scrolling ListBox. Nice but sometimes I want to have the items wrap around. Sort of a multi column flow ListBox. Turns out this was quite a bit harder because unlike WPF Silverlight didn’t have a WrapPanel. However the Silverlight Toolkit , recently released does contain the required WrapPanel, So remember the code was like this: Partial Public Class Page Inherits UserControl Public Sub ... [ read more ]
|
|
by
Maurice via
Maurice de Beijer
on
11/2/2008 9:58:31 AM
The PDC wasn't all hard work, we sure had some fun too . As always there where a number of product group dinners. This year the C#, VB and F# product groups joined up and had a dinner together. I am at the right bottom, check Anders sitting at the left back end of the table. Lots of other team members and MVP's where there and we had a great time! The party this year was at Universal Studio which is always a nice place to go to. Before we went there was another product gro ... [ read more ]
|
|
by
Maurice via
Maurice de Beijer
on
11/1/2008 10:17:52 AM
Want to download and watch all PDC content? Then there are a couple of ways to get at them. The official way if to go through the session agenda at the conference site. See https://sessions.microsoftpdc.com/public/timeline.aspx . You see all sessions but it takes a bit of work. Another nice way is through Channel 9 by using the following feed: http://channel9.msdn.com/posts/pdc2008/RSS/?tag=videos . But the best as far as I am concerned is using the list compiled by Greg Duncan. Check this ... [ read more ]
|
|
by
Maurice via
Maurice de Beijer
on
10/20/2008 12:42:51 PM
I am pretty excited about the news, a few weeks old by now, that Microsoft is going to include jQuery with ASP.NET. For those who do ASP.NET development and have never taken a look at jQuery: you really should do so as it is a great tool to use for client side scripting! One of the cool things Microsoft is adding is Intellisense support, something that makes using jQuery a lot nicer! But why wait until Microsoft release the updated jQuery file with the extra comments? If you want ... [ read more ]
|
|
by
Maurice via
Maurice de Beijer
on
10/13/2008 5:02:22 PM
Great new and a little unexpected so soon after the release of RC0. See here: http://www.microsoft.com/presspass/press/2008/oct08/10-13Silverlight2PR.mspx for the full story. The download will be available tomorrow from http://www.microsoft.com/silverlight/ . Enjoy! www.TheProblemSolver.nl Wiki.WindowsWorkflowFoundation.eu
|
|
by
Maurice via
Maurice de Beijer
on
9/22/2008 12:23:06 PM
Part 1 Part 2 Part 3 Part 4 In the previous blog posts we made sure we could have multiple versions of the same workflow running side by side. This ability is one of the more powerful concepts of WF and a real must have for long running business applications. A quick recap. Always version your assemblies by giving them a strong name. Make sure the runtime can find each version of the assembly by pointing the CLR to the right version using the configuration\runtimeassemblyBinding\de ... [ read more ]
|
|
by
Maurice via
Maurice de Beijer
on
8/20/2008 7:04:54 AM
.NET Reflector, by Lutz Roeder, must be one of the most useful tools I have when developing .NET code. Usually it is the first thing I install right after Visual Studio not even waiting until I need it because I know I will. So the big news is that Red Gate, makers of the Ants profiler and lots of other tools, are taking over from Lutz Roeder and will continue developing .NET Reflector. Interesting move and I hope this means a bright future for the .NET Reflector. Read more about this here ... [ read more ]
|
|
by
Maurice via
Maurice de Beijer
on
8/19/2008 10:32:52 AM
Want to know what is new in the .NET 3.5 SP1 framework or Visual Studio 2008 SP1? Then check out the presentations and labs here: http://www.microsoft.com/downloads/details.aspx?FamilyID=355C80E9-FDE0-4812-98B5-8A03F5874E96&displaylang=en Overview The .NET Framework 3.5 Enhancements Training Kit includes presentations, hands-on labs, demos, and event materials. This content is designed to help you learn how to utilize the .NET 3.5 Enhancement features including: ASP.NET MVC, ... [ read more ]
|
|
by
Maurice via
Maurice de Beijer
on
8/7/2008 7:47:58 AM
Steve Lasker just announced that SQL Server Compact 3.5 service pack 1 is released, read his announcement here . They added support for the entity framework, great stuff. And another neat feature is native 64 bits support. No longer do you need to target X86 and use WoW [:0]. Great if you are using my SQL Server Compact Workflow Persistence Service . Enjoy!
|
|
by
Maurice via
Maurice de Beijer
on
6/4/2008 3:59:58 PM
I just heard about a pretty nasty "bug" with ClickOnce. Well it isn't an actual bug but still a nasty problem to run into. The problem is actually with the certificate used to sign a ClickOnce installer. When you create a new ClickOnce installer Visual Studio will automatically generate the required certificate for you. And the intention was that this was only a temporary certificate and that a developer would replace it with a real one. Now it turns out that most people, includ ... [ read more ]
|
|
by
Maurice via
Maurice de Beijer
on
5/26/2008 8:54:39 AM
One of the nice new features in Visual Basic 9 are lambda expressions. They where actually added as one of the underlying pieces for LINQ. But besides enabling LINQ you can use them in all sorts of places. One of the places they really help me is in places where I previously needed to declare a delegate and use that. Take for example the following code where I use the ThreadPool to do some work: Private Sub btnStart_Click() Handles btnStart.Click
ThreadPool.QueueUserWorkItem( Address ... [ read more ]
|
|
by
Maurice via
Maurice de Beijer
on
5/20/2008 12:31:34 PM
There are several options for validating properties on a custom activity. Besides the possibility of using an ActivityValidator as described here we can also use the ValidationOptionAttribute. Now the ValidationOptionAttribute isn't useful all the time and only for a limited set of properties. First of all the limited set of properties. This will only work for dependency properties defined with DependencyPropertyOptions.Metadata. This makes them metadata and they cannot be changed a ... [ read more ]
|
by
Maurice via
Maurice de Beijer
on
5/20/2008 10:32:18 AM
The current version of SQL Server Compact has no support for 64 bits computing. While this may seem a problem if you want to deploy you application on a 64 bits version of Windows it really isn't most of the time. In fact if you change your assembly from the default AnyCPU to x86 compatible it will work just fine using Windows On Windows (WOW). But even better there will soon be a native 64bits version of SQL Compact. This isn't in the beta version that is distibrited ... [ read more ]
|
|
by
Maurice via
Maurice de Beijer
on
5/16/2008 9:05:00 AM
VS2008 SP1 Beta is quite a package. By default the installation downloads the packages as needed and when needed. Now that is just fine if you only need to install a single machine. But when you need to install multiple, possibly virtual, machines like I have to it just wastes a lot of bandwidth and time . Fortunately there is a solution and it can be found here in the blog post by Heath Stewart. Enjoy!
|
|
by
Maurice via
Maurice de Beijer
on
5/15/2008 6:06:52 PM
By default every custom workflow activity shows the same icon. And using an icon that help understand what the activity actually does makes life so much easier for the user of your activity. And remember he is a developer so some day he might just return the favor The default looks like this. So changing the icon isn't hard there are just a few steps that might catch you if you aren't careful. This is what my demo project looks like: A ... [ read more ]
|
by
Maurice via
Maurice de Beijer
on
5/15/2008 11:45:00 AM
When I tried I received the following very helpful System.ServiceModel.ProtocolException with Message="The remote server returned an unexpected response: (407) Proxy Authentication Required ( The ISA Server requires authorization to fulfill the request. Access to the Web Proxy filter is denied. )." And this in turn contained an inner exception of type System.Net.WebException and Message="The remote server returned an error: (407) Proxy Authentication Required.". ... [ read more ]
|
|
by
Maurice via
Maurice de Beijer
on
5/14/2008 2:19:16 PM
For some reason a lot of people seem to think that only a single WorkflowRuntime object can be created in an AppDomain. And it isn't just the average Joe out there who seems to think so, no even book authors describe this behavior as the Workflow Foundation book I am reading now does so. Just to set the record straight I will shout this out once more: You can have multiple WorkflowRuntime objects in a single .NET AppDomain Now I know where this perception comes f ... [ read more ]
|
by
Maurice via
Maurice de Beijer
on
5/14/2008 9:41:23 AM
The ReplicatorActivity is one of the more interesting Workflow Foundation activities to work with when you have a collection of data and want to iterate over each item. Basically just think of it as a For Each statement in regular code. To demonstrate the behavior I have created a very small workflow that looks like this in the designer: Or in case you prefer the XOML like this: < SequentialWorkflowActivity x:Class = " WorkflowConsoleApplication5.Workflow1 "
... [ read more ]
|
|
by
Maurice via
Maurice de Beijer
on
4/16/2008 11:49:59 PM
Visual Studio visualizers are pretty cool and can help you quite a bit when debugging but you need to develop them and that just ads to the workload. So how about having someone else do it? Well Microsoft added a few visualizers to VS2008 and VS2008 but they are pretty much limited to text, html and XML data. Luckily some people liked the idea of using visualizers and actually decided to take it to the next level with project Mole . Its a really great viewer to inspect your d ... [ read more ]
|
|
by
Maurice via
Maurice de Beijer
on
4/10/2008 6:11:29 PM
As I mentioned previously I was working in a Workflow Persistence Service using SQL Server Compact as the back end store. Now this might not be the best persistence store to use in every application but it has a number of advantages. One of the main advantages is ClickOnce deployment. In the case of the standard SqlWorkflowPersistenceService you need to have SQL Server installed and running and create the database, with a name of your choosing, using two scripts. Not a big problem but someth ... [ read more ]
|
|
by
Maurice via
Maurice de Beijer
on
4/9/2008 12:27:47 PM
As I previously mentioned having the LINQ DataContext create the database if it doesn't exist yet is a cool feature but it isn't perfect. The problem I just ran into was while using the |DataDirectory| macro, something the SqlCeConnection understands and will replace with the directory specified. Well it turns out the LINQ DataContext isn't that smart when checking if the database exists. Apparently it checks if the database file exists without expanding the |DataDirectory| so i ... [ read more ]
|
by
Maurice via
Maurice de Beijer
on
4/9/2008 10:19:06 AM
LINQ to SQL has a really nice feature when making sample and demos in the ability to create the database if it doesn't exist yet. It also has a function called DatabaseExists() to check if a database exists. Both are defined on the DataContext class. string connectionString
= @"Data Source=.\sqlexpress;Initial Catalog=MyNewDatabase;Integrated Security=True" ;
MyNewDatabase context = new MyNewDatabase (connectionString);
if (!context.DatabaseExists())
context.C ... [ read more ]
|
|
by
Maurice via
Maurice de Beijer
on
3/22/2008 12:40:02 PM
Sometimes you need to the complete public key of an assembly instead of the public key token. For example when you want to use the InternalsVisibleTo attribute when the target assembly is signed. The easiest way of doing so is using the Strong Name Tool or sn.exe with the –Tp parameter. So from .NET 2.0 command prompt do:
sn -Tp <<your assembly>>
And if you want to add an Open .NET 2.0 SDK Command Prompt here shortcut menu option to the Windows Explorer check this ... [ read more ]
|
|
by
Maurice via
Maurice de Beijer
on
3/19/2008 7:48:23 PM
One of the new, and pretty cool, Windows Workflow Foundation features is the ReceiveActivity that unleashes the power of Windows Communication Foundation to Windows Workflow Foundation. Getting started with a ReceiveActivity is quite simple as long as you start with a sequential Workflow Service Library.
The new service host for Windows Communication Foundation services makes life good as it means you can test a workflow without creating a host application or resorting to IIS.
But some ... [ read more ]
|
|
by
Maurice via
Maurice de Beijer
on
3/6/2008 7:29:38 AM
By default Edit and Continue (EnC) is disabled when you create a new ASP.NET Web Application using Visual Studio 2005. Not sure why this is because EnC is a really nice feature to have and can be a big time saver.
You will notice this when you try to edit the source while debugging and receive the following error message:
Edit and Continue
Changes are not allowed when the debugger has been attached to an already running process or the code being debugged was optimized at build or run ti ... [ read more ]
|
|
by
Maurice via
Maurice de Beijer
on
2/13/2008 2:10:56 PM
You probably heard that Visual Studio 2008 lets you select the target framework version so you can use it to compile .NET 2.0 applications. I suspect you also heard about all the new cool features VB 9 includes like stuff like LINQ etc. Just in case you didn't make sure you read up on Overview of Visual Basic 9.0 by Erik Meijer, Amanda Silver, and Paul Vick.
And you probably assumed all those cool new features would only work if you where targeting the 3.5 framework, I know I did . Wel ... [ read more ]
|
|
by
Maurice via
Maurice de Beijer
on
2/11/2008 11:53:50 AM
Looking for more information about VS2008 and .NET 3.5?
I suspect you might just be as there is a ton of new functionality and with the pace of everything coming out it isn't likely that you know it all
To help learn the new stuff Microsoft has put a Visual Studio 2008 and .NET Framework 3.5 training kit together with lots of labs and presentations. Just go through the list and check what you would like to know more about.
You can download the trainings kit from here .
Enjoy!
... [ read more ]
|
|
by
Maurice via
Maurice de Beijer
on
2/6/2008 8:04:17 PM
Using a ReceiveActivity is a great way of exposing a workflow via a WCF proxy.
Get started by creating a new project based upon "Sequential Workflow Service Library". This is found in the WCF projects node instead of the Worflow projects node!
Create a service interface, mine is nice and simple and add a few ReceiveActivity to the workflow and hoop up the service interface to the activities. No big deal so far and we can test things by just pressing F5 and having the WCF Test Cl ... [ read more ]
|
|
by
Maurice via
Maurice de Beijer
on
12/11/2007 7:39:13 AM
Setting Option Strict Off can be a very useful thing in Visual Basic but having project template depend on it being this way certainly isn't a good thing
Unfortunately this is the case with the WPF project template for VB and the result could be a compile error in a new project depending on your default setting of Option Strict. Not a big deal as the error is easy to correct but still a bit of a nuisance. Fortunately the error isn't hard to correct and requires only a single code c ... [ read more ]
|
|
by
Maurice via
Maurice de Beijer
on
12/10/2007 10:42:21 AM
Using COM to automate Word from your Visual Basic application isn't very hard. Just did a sample for a friend and decided to share it. Not that the sample is very complicated or anything, quite the opposite in fact. But it does show how easy it is to get started
The sample code below shows how to construct a minimal document, insert a bookmark and, at a later moment, replace the empty bookmark with some text.
Imports Microsoft.Office.Interop.Word
Module Module1
... [ read more ]
|
|
by
Maurice via
Maurice de Beijer
on
11/27/2007 9:36:02 AM
If you are using Visual Studio 2008 in combination with Visual SourceSafe (VSS) you might be experiencing some problems. These are because the updated VS2008 support for VSS didn't ship with VS2008 as it was supposed to. There is however a CTP with the VS2008/VSS integration you can download that should fix the problems for now.
More details and a link to the CTP download here: http://blogs.msdn.com/richardb/archive/2007/11/19/vs-2008-users-remember-to-download-the-sourcesafe-ctp.asp ... [ read more ]
|
|
by
Maurice via
Maurice de Beijer
on
8/31/2007 7:25:00 AM
I just got bitten by this one. Turns out you cannot change the folder structure of an application deployed using ClickOnce after it has been deployed. Now all I did was add a new folder, something that is quite common! If I had been renaming existing folders I might be able to understand this but with a new folder containing 1 new XML file? No not really and I think this should be allowed. Anyway Microsoft acknowledges this as a bug, see http://support.microsoft.com/kb/911792/en-us for ... [ read more ]
|
|
by
Maurice via
Maurice de Beijer
on
8/24/2007 9:39:00 AM
Resource files are great for storing strings that need to be translated and Visual Studio makes it real easy to add resource files and edit them. However something that isn’t immediately obvious is how to go about adding a carriage return in a resource string. If you press enter VS just takes you to the next row in the grid. The trick is to use shift enter instead of just enter and you get a new line in the same resource string. Of course you still need to resize the row to see the whole line ... [ read more ]
|
|
by
Maurice via
Maurice de Beijer
on
8/23/2007 9:19:00 AM
This morning I spend some time tracking down a ConfigurationErrorsException in an application I am working on. The application ran just fine if I started it but when running unit tests I would receive a ConfigurationErrorsException. Kind of weird as these test ran fine last week. Turns out there was a change in the application settings that where user scoped. And as these settings are stored under the current user they ended up in a somewhat hidden location, in my case “C:\Documents and Setting ... [ read more ]
|
|
by
Maurice via
Maurice de Beijer
on
7/3/2007 3:06:45 PM
Caching can be a great way of increasing the performance of an application. I often use the HttpRuntime.Cache just for this purpose, even in WinForm applications as it is fast and easy to use. However as usual there is a tradeoff. In the case of caching the catch is memory consumption. Instead of querying or calculating some data again just keep all results around in the hope they are used again. But that uses up memory and while coding you probably have a fast machine with plenty of memory the ... [ read more ]
|
|
by
Maurice via
Maurice de Beijer
on
7/2/2007 9:56:46 AM
Dear Maurice de Beijer,
Congratulations! We are pleased to present you with the 2007 Microsoft® MVP Award!
The Microsoft MVP Award is our way of saying thank you and to honor and support the significant contributions you make to communities worldwide. As a recipient of Microsoft's Most Valuable Professional award, you join an elite group of technical community leaders from around the world who foster the free and objective exchange of knowledge by actively sharing your real world expert ... [ read more ]
|
|
by
Maurice via
Maurice de Beijer
on
6/2/2007 1:18:00 PM
Recently Carl Franklin and Richard Campbell recorded a DotNetRocks interview with Frans Bouma . Now I listen to most DNR episodes during my commutes in the car but I think I will repeat this one a couple of times. Frans is a really nice and bright guy so it usually pays to listen to what he has to say. And we had a lot of fun together last year when we did the Visual Basic versus C# session. For what it is worth, if you are looking into ORM products his LLBLGen Pro is certainly worth a lo ... [ read more ]
|
|
by
Maurice via
Maurice de Beijer
on
5/25/2007 7:28:02 PM
Microsoft just released the news that the Professional Developers Conference 2007 (PDC) is canceled and will be rescheduled at a later date. As a reason they give that there are too many products being released at the end of this year. According to the announcement the PDC, focused on future technologies, should be held at a later date that is better timed for future technologies. No date is given though.
Read the announcement at: http://msdn2.microsoft.com/en-us/events/bb288534.aspx .
Gue ... [ read more ]
|
by
Maurice via
Maurice de Beijer
on
5/25/2007 6:24:00 PM
Yes that seems to be the case. Cory just reported that Miguel reported that the new JavaScript compiler that comes with Silverlight is written in VB. And Paul Vick just confirmed that it was the case and that the next VB compiler after VB9 (the so called VBx) will also be written in VB as well. Nice to see that Microsoft is starting to use VB more for these kinds of things.
Enjoy VB!
|
|
by
Maurice via
Maurice de Beijer
on
5/24/2007 3:24:00 PM
Then you really need to take a look at the TextFieldParser class. And if you never run into it that might be because it is tucked away in the Microsoft.VisualBasic.FileIO namespace, not exactly the first place I tend to start looking. But it parses either delimited or fixed with files. It has loads of options like setting the delimiter characters or specifying whether the data is enclosed in quotes or not. A real useful class to gave lying around given the number of questions I hear about readi ... [ read more ]
|
|
by
Maurice via
Maurice de Beijer
on
5/23/2007 9:00:00 AM
Well in that case you might want to check out these videos. There are 8 of them at the moment and they show how to do the most common tasks. These videos are created by Beth Massi of the Visual Basic team so all the code is in VB but even if you are a C# developer they are real useful! Update: It is kind of useful to include the link so here it is http://msdn2.microsoft.com/en-us/vbasic/bb466226.aspx . Recommended!
|
|
by
Maurice via
Maurice de Beijer
on
4/3/2007 11:47:29 AM
This seems to be one of those issues that keeps on confusing people and not surprisingly really.
When you set the DataFormatString on a bound field to something, say "{0:N2}" for a numeric field it seems the data is ignored. One way of fixing this is by selecting the "" link and turning the item into a template. There is however a better way and that is setting the HtmlEncode flag to false. This is actually caused because the value is Html encoded before the data formatting is done, I pre ... [ read more ]
|
|
by
Maurice via
Maurice de Beijer
on
3/27/2007 8:58:28 PM
If you read this post by Paul Andrew you can see we are getting an invitation to come to Microsoft for some additional training. Well it sounds interesting but I guess I won’t be crossing the ocean for this one. But it’s a pity that these kind of event are usually held in Redmond en never on other continents. Come on guys, we do a lot of work in Europe, Asia or for that matter everywhere else on the planet. So why don't you schedule some of these events somewhere more accessible to the rest o ... [ read more ]
|
|
by
Maurice via
Maurice de Beijer
on
3/26/2007 9:09:41 AM
During my VSTO - No Pain No Gain presentation last week I mentioned that the Microsoft PSS VSTO 2005 Client TroubleShooter is still real useful even though it hasn't been updated for VSTO 2005 SE. But I did fail to provide the listeners with the URL where you can download it. Well here is: http://www.microsoft.com/downloads/details.aspx?FamilyID=c9fb6a54-8069-4918-a6f9-e744928dfac3&displaylang=en
You can download the slides (in Dutch) and samples here .
Enjoy!
Maur ... [ read more ]
|
by
Maurice via
Maurice de Beijer
on
3/26/2007 9:03:38 AM
Last week I did a presentation in Bunnik for the SDN on VSTO. The title was VSTO - No Pain No Gain. The presentation went quite well and I think a lot of people learned about some of the hardships of developing VSTO applications and how to get around them. Just remember VSTO is real cool but de dependence of the team on Office and the fact the they have to ship both with Visual Studio and Office, who are on a very different shipping schedule, presents some unique challenges. Still a very cool ... [ read more ]
|
|
by
Maurice via
Maurice de Beijer
on
3/19/2007 11:32:45 AM
Steve Lasker has compiled a FAQ with questions and answers people might have about using the ADO.NET Synch Services. You can find the FAQ on his blog at http://blogs.msdn.com/stevelasker/archive/2007/03/18/QAforOCS_2D00_SyncServicesForAdoNet.aspx
And if your question isn't there just email him so he can add the question.
Enjoy!
Maurice de Beijer
www.TheProblemSolver.nl
wiki.WindowsWorkflowFoundation.eu/
|
|
by
Maurice via
Maurice de Beijer
on
3/15/2007 8:46:31 PM
SO I didn't blog about the last few days at the MVP summit. That isn't because we didn't hear any new information, in fact we heard plenty of it but most of it is under NDA so I cannot comment on it quite yet. But what I can say is that there are some cool things coming . Not that all our problems are going to be fixed, no the powers that be are going to leave some, and probably introduce some new ones in the process , but some of my headaches are being addresses.
And of course LINQ is ... [ read more ]
|
|
by
Maurice via
Maurice de Beijer
on
3/11/2007 4:16:12 PM
One of the things I always disliked is that unit testing was only available in the enterprise VS2005 SKU, just like professional developers don't need or use unit testing. Yeah right, that is one of the hallmarks of a professional coder is you ask me. So I, amongst others, complained about this to Microsoft and it appears we have some influence because they have decided we are right and the next version of Visual Studio will include unit testing in the professional SKU as well. Well what can ... [ read more ]
|
|
by
Maurice via
Maurice de Beijer
on
3/7/2007 9:32:07 AM
So I have been a bit quite these last few weeks. Well a small side trip to Rome was part of the reason . This is a HDR picture taken at night in the Forum. The picture is actually created from three small JPEG's I will redo it with the original RAW images when I get them from my girlfriend who is sort of monopolizing my EOS .
See http://picasaweb.google.com/maurice.de.beijer/2007Rome for some more pictures.
But more importantly I have been preparing for the MVP Summit ... [ read more ]
|
by
Maurice via
Maurice de Beijer
on
3/7/2007 9:14:01 AM
So it isn't officially called Service Pack 2 but it is still the long awaited VS2005 updated for running on Vista. I haven't tried it myself yet as I am not running on Vista yet, that will happen later this year when I get a new notebook.
You can download the SP from http://www.microsoft.com/downloads/details.aspx?FamilyId=90E2942D-3AD1-4873-A2EE-4ACC0AACE5B6&displaylang=en or read the release notes at http://support.microsoft.com/?kbid=929470 .
Enjoy!
Maurice de B ... [ read more ]
|
|
by
Maurice via
Maurice de Beijer
on
2/20/2007 10:31:12 AM
Just in case this slipped by
Check http://www.microsoft.com/technet/prodtechnol/sql/2005/downloads/servicepacks/sp2.mspx for all the details and the downloads.
Enjoy!
Maurice de Beijer
www.TheProblemSolver.nl
wiki.WindowsWorkflowFoundation.eu/
Share this post: email it! | bookmark it! | digg it! | live it!
|
by
Maurice via
Maurice de Beijer
on
2/20/2007 10:18:50 AM
Reflector by Lutz Roeder is probably the tool I use most often when developing .NET code, well just after Visual Studio 2005 anyway. And now there is a new version, 5, out. Still free, still excellent. Highly recommended.
Download from http://www.aisto.com/roeder/dotnet
To check for new features: http://www.aisto.com/roeder/paper/reflector5.ppt
Enjoy!
Maurice de Beijer
www.TheProblemSolver.nl
wiki.WindowsWorkflowFoundation.eu/
Share this post: email ... [ read more ]
|
|
by
Maurice via
Maurice de Beijer
on
2/19/2007 3:48:15 PM
SQL CLR is pretty cool and lets you quickly do lots of things that are hard, if not impossible, to code in TSQL. But if you want to create generic code you sometimes need to know the context that the code is running under. The problem I had was creating a generic table update trigger and knowing the table that was updated.
During the execution of an update trigger you can get your hands on the new data using the Inserted temporary table so the data is there but there is no way of knowing ... [ read more ]
|
by
Maurice via
Maurice de Beijer
on
2/19/2007 8:49:39 AM
SQL Server CLR integration is pretty cool allowing me to write .NET code and have it execute in SQL Server, for example as a stored procedure. Not that I would want to write every stored procedure using .NET code but for some of them it sure is a lot easier.
To enable it you need to reconfigure SQL Server a bit though. You need to enable CLR integration using the sp_configure sproc. Just don’t forget to execute a Reconfigure when done.
Just use:
sp_configure 'clr enabled', 1 go ... [ read more ]
|
|
by
Maurice via
Maurice de Beijer
on
2/16/2007 6:55:17 PM
If you are using Actions Panes in a VSTO Excel add-in you might have seen the following behavior. You create an new ActionPane, derived from UserControl, and add it to the Workbook ActionsPane.Controls collection. It shows up nicely so you think you are done.
Now the user creates a new Spreadsheet using File/New. Note that the ActionsPane disappears and remains hidden until the user reactivates it using View/Task Pane or Ctrl+F1.
So how do you automatically display the TaskPane when ... [ read more ]
|
|
by
Maurice via
Maurice de Beijer
on
2/14/2007 7:06:12 PM
Something I often see in code is that parts of it are contained in the following construct: #If DEBUG Then ' Some code #End If
Nothing wrong with that but often the code is the complete function body leaving an empty function in release mode. Now the JIT optimizer will make short work of it so there isn't a big performance penalty but why make it go through these steps in the first place.
Another way way of doing so is using the Diagnostics.Conditional attribute. This can be appl ... [ read more ]
|
|
by
Maurice via
Maurice de Beijer
on
2/8/2007 12:00:40 PM
In C# they have a thing called relaxed delegates that allow you to create an event handler with all parameter types as object and still be able to bind them to an event. Nice
In VB we don't have the same thing, the parameters must match exactly. So the following piece of code doesn’t work
Imports System.Reflection
Imports System.Windows.Forms
Module Module1
Sub Main()
Dim demo As New EventDemo
demo.HookEvent()
... [ read more ]
|
|
by
Maurice via
Maurice de Beijer
on
2/7/2007 12:05:09 PM
Mark Blomsma (A fellow Dutch C# MVP) has just published an interesting article about integrating the Amazon Mechanical Turk into a Windows Workflow Foundation.
Read the article here: http://developer.amazonwebservices.com/connect/entry.jspa?entryID=635&ref=featured
Enjoy!
Maurice de Beijer
www.TheProblemSolver.nl
wiki.WindowsWorkflowFoundation.eu/
Share this post: email it! | bookmark it! | digg it! | live it!
|
by
Maurice via
Maurice de Beijer
on
2/7/2007 9:09:48 AM
Its always nice to see that people enjoy utilities I wrote. One of those ParseLocals is something I wrote years ago for work in Visual FoxPro and checks the current source file for missing variable declarations. Guess people are still using it because I had a few emails about it recently. Kurt Graßl and Peter Crabtree mailed me with some changes that I have included in the current source.
You can download if from: http://www.theproblemsolver.nl/downloads_vfp.htm#ParseLocals
Enjoy! ... [ read more ]
|
|
by
Maurice via
Maurice de Beijer
on
2/1/2007 7:30:01 PM
If you want to run Visual Studio 2005 on Windows Vista you might want to take a close look at the following two lists. They list some of the issues you might run into. In other words, make sure you can live without.
Check for running with elevated administrator permissions at http://msdn2.microsoft.com/en-us/vstudio/aa964140.aspx and additionally for running with normal user permissions at http://msdn2.microsoft.com/en-us/vstudio/aa972193.aspx .
Take good care :-)
Maur ... [ read more ]
|
|
by
Maurice via
Maurice de Beijer
on
1/28/2007 3:07:26 PM
Marcel de Vries is doing some interesting work creating WF input and output activities using WCF instead of plain web services. If you want to take a look a the code you can find it at CodePlex, to be exact at http://www.codeplex.com/WCFWorkflow .
See his blog here and here for more details about the project.
Enjoy!
Maurice de Beijer
www.TheProblemSolver.nl
wiki.WindowsWorkflowFoundation.eu/
Share this post: email it! | bookmark it! | digg it ... [ read more ]
|
|
by
Maurice via
Maurice de Beijer
on
1/17/2007 7:06:15 PM
The Patterns and Practices group have just finished and shipped the Web Client Software Factory. If you haven't looked into software factories before this is a great place to get started, and even if you don't use it in your daily work just studying it will be a great experience.
This software factory make good use of several design pattern. Among the more interesting to be aware of are the View-Presenter and the Service Locator. If nothing else learning these will improve your software ... [ read more ]
|
|
by
Maurice via
Maurice de Beijer
on
1/16/2007 8:27:55 AM
If you are using a WCF client make sure you either Close() or Dispose() the client when you are done. I failed to do so and got bitten by a big memory leak I was using a NetMsmqBinding and forgot to close the client when done. By itself the code worked just fine, no leaks or nothing. But then the same piece of code got called from inside another NetMsmqBinding server during the reception of a message and it generated a memory leak big time. Of course I should have Disposed() the client but th ... [ read more ]
|
|
by
Maurice via
Maurice de Beijer
on
1/15/2007 3:21:13 PM
Is your solution plagued by a large number of assemblies that need to be loaded? Well ILMerge will merge them together into one single assembly. A single assembly is so much easier to distribute after all
Download it here . Or read more about it over here .
One interesting thing is that the readme says " It does not yet support Rotor or Mono ". Now how often does Microsoft use the not yet in combination with Mono? Interesting thought!
Enjoy!
Maurice de Beijer ... [ read more ]
|
by
Maurice via
Maurice de Beijer
on
1/15/2007 3:19:42 PM
I am probably the last person to discover this but only today I discovered the Stopwatch type in the System.Diagnostics namespace. Real nice when you want to determine how long a certain action took
Stopwatch timer = Stopwatch .StartNew();
timer.Start();
// Do some stuff you want to time.
timer.Stop();
Console .WriteLine(timer.Elapsed.ToString());
Use the Stopwatch.IsHighResolution to check if the timer is using high resolution of not.
Enjoy!
... [ read more ]
|
|
by
Maurice via
Maurice de Beijer
on
1/10/2007 5:09:15 PM
If you want Google to index your web site properly having a sitemap is a big bonus. Unfortunately a Google Sitemap is not the same thing as a ASP.NET sitemap. And that is a bit of a shame because you are quite likely to have the latter around. Well both are XML based files so converting from one to the other can’t be all that hard right? Right! and best of all you don’t even need to do it yourself because Bertrand Le Roy has already done it for us. See http://weblogs.asp.net/bleroy/archive/200 ... [ read more ]
|
by
Maurice via
Maurice de Beijer
on
1/10/2007 5:08:22 PM
Turns out I forgot to include one of the utility functions use in my previous two blog posts at and at . The code is the GetAllActivities() function in the WorkflowUtils class.
This is the missing method:
Public Shared Function GetAllActivities( ByVal root As Activity) As List( Of Activity)
Dim result As New List( Of Activity)
Dim i As Integer = 0
Dim current As Activity
result.Add(root)
While i ... [ read more ]
|
|
by
Maurice via
Maurice de Beijer
on
1/7/2007 7:06:31 PM
Yesterday I showed in my previous blog post the minimal code required to create an image from a workflow definition. As I mentioned the most interesting reason for doing so is showing the status of an executing workflow in a sort of monitoring web site. So the next step is to add the ExecutionStatus of each activity to the image. The following image is an example of the result.
This can be done using an IDesignerGlyphProvider in the WorkflowView type. The WorkflowView i ... [ read more ]
|
|
by
Maurice via
Maurice de Beijer
on
1/6/2007 8:00:53 PM
I have been experimenting a bit with hosting the workflow designer. Unfortunately the sample provided, while it works is kind of hard to get started with if you are not already familiar with the way designers work in Visual Studio. So I decided to create the minimal code to create an image of a workflow, something quite useful if you are going to with an ASP.NET site to monitor you workflows. One caveat to be aware of is that the code needs to run under a thread with an STA ApartmentState. If ... [ read more ]
|
by
Maurice via
Maurice de Beijer
on
1/6/2007 9:50:15 AM
If you are interested in the future of VB, or .NET in general because this is equally true for C#, you might want to read the blog post by Scott Wisniewski. In this blog post he describes how extension methods will work in VB 9 and what the benefit for the average developer will be. Of course extension methods are also a big part of LINQ so if you want to understand how LINQ works you need to understand extension methods too.
Its and interesting blog post you can find here .
En ... [ read more ]
|
|
by
Maurice via
Maurice de Beijer
on
1/4/2007 7:19:23 PM
If you are using the VBC command line compiler for visual basic, for example when building ASP.NET web sites, you may want to download this hotfix.
See http://blogs.msdn.com/vbteam/archive/2007/01/03/visual-studio-2005-sp1-and-visual-basic-2005-command-line-compiler-vbc-exe-hotfix-released.aspx for all the details.
Enjoy!
Maurice de Beijer
www.TheProblemSolver.nl
wiki.WindowsWorkflowFoundation.eu/
Share this post: email it! | bookmark it! | digg ... [ read more ]
|
|