The mysteries of software development and networking... RSS 2.0



 Thursday, November 16, 2006

I have the pleasure of being part of project which has started using Visual Studio Team Suite and Team Foundation Server.

I love the smooth integration of source control and issue management. It's fantastic, no more buggy add-ins! Perhaps coolest of all is the ability to move files and retain version history. No more crazy work-arounds.

Thursday, November 16, 2006 4:32:07 PM (Eastern Standard Time, UTC-05:00)  #    Comments [0] -
General

The Dutch launch for Windows Vista, Office 2007 and Exchange 2007 is scheduled for the 28th of November 2006.

Read more on: http://www.microsoft.com/netherlands/evenementen/klaarvoorhetnieuwewerken/default.aspx (in Dutch)

Thursday, November 16, 2006 9:41:51 AM (Eastern Standard Time, UTC-05:00)  #    Comments [0] -
General | Vista
 Wednesday, November 15, 2006

Here is the sample SQL script to create a simple queue in SQL Server 2005:


-- Needed to send messages!
CREATE MASTER KEY ENCRYPTION BY PASSWORD = 'MyPassword';
GO

-- All messages need to be typed.
CREATE MESSAGE TYPE
[//DEVELOP-ONE.COM/schemas/Test/XmlMessage]
VALIDATION = VALID_XML;
GO

-- Create a contract
CREATE CONTRACT
[//DEVELOP-ONE.COM/schemas/Test/BasicXmlQueueContract]
( [//DEVELOP-ONE.COM/schemas/Test/XmlMessage]
SENT BY ANY
) ;
GO

-- Create a queue which is turned on and which retains
-- messages in the database.
CREATE QUEUE BasicXmlQueue
WITH STATUS=ON, RETENTION=ON;
GO

-- Create the service needed to send messages.
CREATE SERVICE [//DEVELOP-ONE.COM/Sql/Services/Test/BasicXmlService]
ON QUEUE [dbo].[BasicXmlQueue]
([//DEVELOP-ONE.COM/schemas/Test/BasicXmlQueueContract]) ;
GO

-- Create a stored procedure to send a message
CREATE PROCEDURE SendXMLMessage
@MessageContent XML
AS
BEGIN

DECLARE @dialog_handle UNIQUEIDENTIFIER;

BEGIN DIALOG CONVERSATION @dialog_handle
FROM SERVICE [//DEVELOP-ONE.COM/Sql/Services/Test/BasicXmlService]
TO SERVICE '//DEVELOP-ONE.COM/Sql/Services/Test/BasicXmlService'
ON CONTRACT [//DEVELOP-ONE.COM/schemas/Test/BasicXmlQueueContract] ;


SEND ON CONVERSATION @dialog_handle
MESSAGE TYPE [//DEVELOP-ONE.COM/schemas/Test/XmlMessage]
(@MessageContent) ;

-- return dialog_handle
SELECT @dialog_handle ;

END ;
GO

CREATE PROCEDURE ReceiveXMLMessage
@Timeout int
AS
BEGIN
DECLARE @tempTable as TABLE(
conversation_handle UNIQUEIDENTIFIER,
message_body XML) ;

WAITFOR( RECEIVE TOP (1)
conversation_handle,
message_body
FROM BasicXmlQueue
INTO @tempTable ), TIMEOUT @Timeout;

DECLARE @conversation_handle as UNIQUEIDENTIFIER;

SELECT TOP (1) @conversation_handle = conversation_handle
FROM @tempTable ;

IF ( @conversation_handle IS NOT NULL )
BEGIN
-- remove message from queue without sending an End Of Conversation message.
END CONVERSATION @conversation_handle WITH CLEANUP ;
END

-- return the message body
select message_body from @tempTable;

END ;
GO

Wednesday, November 15, 2006 9:31:38 AM (Eastern Standard Time, UTC-05:00)  #    Comments [0] -
SQL

Microsoft Developer Division has started DevDiv Hotfix Public Availability Pilot Program. This is a program where hotfixes are made available to the general public. The fixes are not as ruggedly tested as a Service Pack, but if you happen to run into a specific problem the fix may just be the solution for you.

Go to: https://connect.microsoft.com/content/content.aspx?ContentID=3705&wa=wsignin1.0&siteid=210

As of now there are 7 hotfixes available.

Wednesday, November 15, 2006 9:08:08 AM (Eastern Standard Time, UTC-05:00)  #    Comments [0] -
General

SQL Server 2005 introduces Service Broker, an extensive mechanism for supporting asynchronous messaging with SQL Server.

The very heart of Service Broker is the new SQL Server object: QUEUE. To utilize just the queue you still have to go through the service broker and do all the extensive stuff which you may or may not need.

The minimum steps you need to create a queue are:

  1. Create a message type
  2. Create a contract
  3. Create a queue
  4. Create a service

Make sure there is a master encryption key available in your database, otherwise the message won't get send.

I've created stored procedures for sending en receiving messages. Works quite well. I'll post some SQL code later.

 

Wednesday, November 15, 2006 8:04:20 AM (Eastern Standard Time, UTC-05:00)  #    Comments [0] -
General | SQL
 Tuesday, November 14, 2006

I just created a new virtual machine image and installed .NET Framework 3.0 and the Windows Workflow Foundation extension for Visual Studio 2005. Pretty smooth install, the 2.9MB download for the .NET Framework turned out to be just a bootstrapper which in turn downloaded another 30MB. Don't you just love high speed Internet, it only took 25 seconds.

Tuesday, November 14, 2006 5:02:26 PM (Eastern Standard Time, UTC-05:00)  #    Comments [0] -
General | WF

I just was wondering, so I looked it up. Tech-Ed 2007 will be held on June 4-8, 2007 in Orlando at the Orange County Convention Center (OCCC).

Tuesday, November 14, 2006 1:40:33 PM (Eastern Standard Time, UTC-05:00)  #    Comments [0] -
General
 Friday, November 10, 2006

XML Schema's can be used to validate XML. This is a powerful, yet performance intensive task. During development and testing the validation provides useful insight in tracking problems. Once the system is stable this is less of an issue (unless 'anonymous' people can access your service).

The Service Broker documentation in SQL Server 2005 says the following about schema's:

"If the conversation uses XML messages, create a schema for each XML message. You use schemas during development, testing, and troubleshooting. When your service is in production, you may decide to remove schema validation from your message types, to improve performance."

Kinda makes sense.

 

Friday, November 10, 2006 9:40:25 AM (Eastern Standard Time, UTC-05:00)  #    Comments [0] -
General
 Wednesday, November 08, 2006

Internet Explorer 7.0 is now an update that comes through you Windows Update. I love IE7.0, but updating all my Virtual PC images is a pain :-(

 

Wednesday, November 08, 2006 10:01:04 AM (Eastern Standard Time, UTC-05:00)  #    Comments [0] -
General

Copied from www.netfx3.com:

"The .NET Framework 3.0 has officially been released!  You can download the .NET Framework 3.0 components here:

Note, if you are using Windows Vista the .NET Framework 3.0 Runtime Components are installed by default.

The Readme for the released version of the .NET Framework 3.0 is available here.  If you have a previous CTP installed, please be sure to review the uninstall instructions.   If you have questions about installing the .NET Framework 3.0, please post your questions to the .NET Framework Setup Forum."

Wednesday, November 08, 2006 9:57:40 AM (Eastern Standard Time, UTC-05:00)  #    Comments [0] -
General

I just received a copy of my book (MCTS Self-Paced Training Kit (Exam 70-529): Microsoft .NET Framework 2.0 Distributed Application Development) through the mail.

Had to check on Amazon, yes they're shipping right now :-)

 

Updated:
A friend just noticed that my book is also on Microsoft Learning: http://www.microsoft.com/MSPress/books/authors/auth9984.aspx.

Wednesday, November 08, 2006 9:51:45 AM (Eastern Standard Time, UTC-05:00)  #    Comments [0] -
General

On MSDN there is a page with all the Visual Studio Release information. Go to: http://msdn.microsoft.com/vstudio/support/servicing/shipped_releases/

Wednesday, November 08, 2006 9:49:03 AM (Eastern Standard Time, UTC-05:00)  #    Comments [0] -
General

I just did some research on Visual Studio and Vista. Here is what I found:

It seems Visual Studio 2002 and 2003 will not be supported on Vista. Visual Studio 2005 will need Service Pack 1 to run on Vista, but is expected to have a list of known issues and workarounds.

Visual Studio 'Orcas' will be the tool you need to develop WPF applications.

Visual Studio 6.0 will be supported on Vista.

The recommended approach for maintaining .NET 1.0 and 1.1 applications on the Vista platform is to run Visual Studio 2002/2003 in a VirtualPC environment.

I guess from the various responses on the Internet this last point is causing some controversy, but really, this is the way to go. Why waste energy on supporting legacy software when you need to be making better newer versions? I just wish there was a version of VirtualPC which I could use to create a 'VirtualApp'. A tool, just like VirtualPC, setup with it's own OS, but excellent host integration, which I can setup to run exactly one application. Booting the application may take a little longer, but 100% backwards compatability can be guaranteed!

Wednesday, November 08, 2006 9:47:25 AM (Eastern Standard Time, UTC-05:00)  #    Comments [0] -
General | Vista
 Thursday, November 02, 2006

When using Visual Studio 2005 or Team Explorer to connect to your Team Foundation Server for the first time, you get to option to provide alternate credentials.

After doing this, there is no clear way to reset those credentials. There are two solutions:

a) Run 'ClearCreds.exe' which is part of the Visual Studio 2005 SDK.

b) Go to 'Start|Run' and enter 'control userpasswords', next go tabpage advanced and choose  manage passwords, now remove the server which is your Team Foundation Server.

Thursday, November 02, 2006 5:27:29 AM (Eastern Standard Time, UTC-05:00)  #    Comments [0] -
General
 Wednesday, October 18, 2006

I'm very pleased to announce that the first book with my name on the cover is now available through Amazon.com!

Just click the image :-)

Wednesday, October 18, 2006 9:52:24 AM (Eastern Standard Time, UTC-05:00)  #    Comments [0] -
C# | General
 Monday, September 25, 2006

Matthew Cochran wrote an excellent article explaining how to implement the provider pattern: http://www.c-sharpcorner.com/UploadFile/rmcochran/providerPattern08102006110013AM/providerPattern.aspx

Monday, September 25, 2006 2:22:01 PM (Eastern Standard Time, UTC-05:00)  #    Comments [0] -
C#
 Monday, September 11, 2006

At the end of the month I'll be doing another session for the Maine Developer Network.
Hope to see you there!

Topic       : Implementing application logic in .NET 2.0

Speaker     : Mark Blomsma

Date        : September 27th

Time        : 10:00 - 12:00

Location    : Harlow Building in the AMHI campus, Augusta, Maine, USA.

Description : This session will be about implementing business logic in .NET 2.0.
We'll look at and discuss various architectural issues and how to implement design
patterns to help create a blueprint of our application. We'll look at choosing and
implementing an exception handling strategy and we'll look at various ways data can
flow through our application.
Monday, September 11, 2006 8:25:06 AM (Eastern Standard Time, UTC-05:00)  #    Comments [0] -
C# | General
 Sunday, September 10, 2006

They're out!

MSDN subscribers can download Windows Vista via http://msdn.microsoft.com/.

If you're running Windows XP and want to try out the .NET Framework 3.0 RC1, then get the bits at http://msdn.microsoft.com/windowsvista/downloads/products/getthebeta/default.aspx

The .NET Framework download is available for everyone. Not just MSDN subscribers.

Sunday, September 10, 2006 11:15:37 AM (Eastern Standard Time, UTC-05:00)  #    Comments [0] -
C# | General | Vista | WF | WPF
 Tuesday, September 05, 2006

When I need to have my code write files to a unique folder, I often use the following trick.

string folderName = someRoot + @"\" + username + @"\" + DateTime.Now.Ticks.ToString();

As long as I'm not writing code which runs multiple threads this will pretty much guarantee me of a unique folder name and it looks nicer than a Guid as a folder name. 

Tuesday, September 05, 2006 3:23:21 PM (Eastern Standard Time, UTC-05:00)  #    Comments [0] -
C# | General

I'm working on a ASP.NET 2.0 web application right now, which uses a Visual FoxPro database. I want the database to sit in the App_Data folder of my web application and I also want my connection string to use a relative path to access my database.

I found that SQL Express supports this, but the documentation suggests that it'll only work for the AttachDB value in a SQL Express connection string. Luckily this is not true. As shown in the sample below. The "|DataDirectory|" element can be used to point to the App_Data folder of your webapplication. I assume this will work for any database connection string.

<connectionStrings>

<add name="Develop-One.Framework.Properties.Settings.ConnectionString"

connectionString="Provider=VFPOLEDB.1;Data Source=|DataDirectory|UserData"

providerName="System.Data.OleDb"/>

</connectionStrings>

Tuesday, September 05, 2006 3:15:48 PM (Eastern Standard Time, UTC-05:00)  #    Comments [0] -
C# | General
About
This blog is run by Mark Blomsma.
© Copyright 2008
Develop-One
Sign In
Statistics
Total Posts: 337
This Year: 81
This Month: 0
This Week: 1
Comments: 94
All Content © 2008, Develop-One
DasBlog theme 'Business' created by Christoph De Baene (delarou)