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
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.
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:
- Create a message type
- Create a contract
- Create a queue
- 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.
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.
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).
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.
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 :-(
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."
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.
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!
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.
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 

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.
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.
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>
Just some info that reached me via email, but I think will be useful for everyone.
MSDE will not be supported on Vista. In most cases you can best migrate to SQL Express.
- Please upgrade your MSDE applications to SQL Server 2005 Express Edition (SQL Express) at the earliest opportunity, if Windows Vista compatibility is essential for their businesses.
- MSDE mainstream support (on Operating System releases before Windows Vista) will continue until April 8, 2008 (extended support until April 8, 2013). Also, no new MSDE redistributions will allowed after June 30, 2007. As ISV, you can sign up for royalty-free redistribution rights for SQL Express.
- Like MSDE, SQL Express is free to download, deploy, and redistribute. There are several significant benefits to upgrading MSDE applications to SQL Express. Benefits include increased maximum data base size of 4 GB, removal of the workload governor, a free, integrated management tool (SQL Server Management Studio Express), SQL Server 2005 Reporting Services and importantly serviceability with Windows update.
- Technical guidance and migration resources are available at www.microsoft.com/sql/express.
- Microsoft is working on a whitepaper which will clearly articulate when to use SQL Server Express and when to use SQL Server Everywhere.
- For now – SQL Express Everywhere is a lightweight in-proc database (a set of dlls that an ISV can embed in an application, <2MB in size). It provides the SQL programmability model (ado.net, oledb provider) and one can use SQL Server Management studio to administer. It is therefore ideal for single user desktop applications or mobile applications that need a local data store (up to 4GB in database size).
- To keep its lightweight nature, some of the database features like stored procedures are not supported by SQL Server Everywhere. If the ISV needs a local datastore that needs these rich features, they should use SQL Express.
- Here are some links for additional information:
o www.microsoft.com/sql/everywhere (there is a brief comparison of express and everywhere here) o www.microsoft.com/sql/express
Microsoft and Citrix have released a press release stating that they will be working together closely to use WANScaler technology to improve Application Access and Address Branch Office Complexity.
Citrix acquired WANScaler technology recently, adding WAN Optimization to their Application Delivery Strategy, by the take over of Orbital Data.
MRA Group is EMEA Gold Partner for both NetScalar as well as WANScaler technology.
|