Tag | XML Posts

So you're familiar with TDD (test-driven development)... Failing your tests first, then building up your classes to satisfy your tests so they're all "Green"... This is a typical scenario and is pretty straightfoward with .NET. Well now you have to create a WCF service and implement unit testing to ensure you don't break your service when you build out a new version. This is a bit more challenging but you do have some different options: Separate out your service code into a library and run your tests ...
Business Scenario: The client gets some kind of feeds that writes into a process table of their client processing system. The data is stored directly as the raw XML file inside a SQL data column. The XML could store multiple enrollment information for the same member. We need to use this info to determine whether a member is eligible, then insert into a staging table. The staging table is then used as a feed to drive a report that generates an image for each claim and sent off to the different provider. ...
[16th Dec 2009 – have spotted a small final missing } in the Office XML sample code. Will get that updated with any other changes ] The UK MSDN Flash developer newsletter contains great short technical articles written by UK developers both inside Microsoft and in the broader developer community. This eBook pulls together these great articles in one place. There are thirteen articles in this second edition covering Python, Inversion of Control, Behavior Driven Development, Silverlight and more. You ...
Background Sending email has long been easy to do with the .NET Framework. There really hasn’t been a facility for checking email though. I recently had a need to be able to check email with and send a response with Bombali (a monitoring tool). I went searching for examples or a solution I could use. I found a few articles on this from a few years ago including the .NET POP3 MIME Client. I never found anything that was free and I never found anything that was easy to configure. Those who know me ...
For copying and pasting source from Visual Studio into my blog posts, I have found CopySourceAsHtml to be very helpful. For those that are not familiar with it, CopySourceAsHtml integrates nicely with Visual Studio by adding a context menu item, which allows you to easily copy source code from your source files. All of the HTML formatting is handled by the add in. As far as I’m aware, there is currently no official release of CopySourceAsHtml for Visual Studio 2010. The good news, however, is that ...
A few things I've learned in the past few days on SELECT {something} FOR XML AUTO, ELEMENTS Use subquery to denormalize data so that they can be grouped under the same parent element. Do not use synonym to get to your linked server. If you want any elements to be named properly, use full linked server syntax and alias the table/subquery. I'll add more as I learn them ...
It looked like we should look a bit about LINQ fundamentals before we actually get into the core programming for our Silverlight twitter application. So we’ll look into LINQ for a few more posts, then we will proceed with our usual Silverlight stuff. Line INtegrated Query allows us to use Query language to select data from almost any type of data sources like XML, SQL, Objects, etc.... For more information about LINQ, visit this page, I don’t want to get deep into the details. You can get the sample ...
Just a small bit of code, I've been playing around with converting some Xml* code to Linq to Xml code, and pretty successfully achieved everything I wanted, one thing missing was the ability to retrieve an XElement ignoring case. First - I'd like mention that yes I know Xml is case sensitive - and this is a bad thing to do - but I needed to do it due to some wierdness in the input xml... Anyhews, below is the extension method I wrote to deal with this.. public static class XElementExtensions { /// ...
UPDATE: There has been an updated version posted which resolves the Rules editing problem mentioned below. Way to go TFS team! A TFS 1010 Beta 2 version of the TFS Power tools has been released as announced by Brian Harry. I've been trying out the Process Template Editor (PTE) and have had some issues with this Beta release. First, the connection dialogue when working with Work Items doesn’t quite function correctly. The work around is to type in the fully qualified URL to the Team Project Collection ...
One of the single most influential cost factors for software projects is code readability and understandability - and the most important factor for readability in turn lies in the adherence to Coding Style Guidelines. To enforce such guidelines, Microsoft has provided a free tool which checks a given set of source code files against a given set of style and consistency rules: MS StyleCop. The tool comes with quite a lot of predefined rules - however, they mirror the coding practice at MS and not ...
In the further adventures of OOXML we have been looking at different approaches to tagging content in a Word template to be programmatically replaced. Initially we looked at simple in-line text as a user defined tagging system. The problem is that this is very error prone. The user has to enter the tag exactly the same every time. On top of that if the user backspaces while typing the tag or spell check flags the tag then the tag will be split into multiple tags. This is less than desirable. Content ...
I've been working with XML for several years now but I've never been entirely sure that I fully understand all there is to know about namespaces. Of course namespaces are central to how document instances are defined by BizTalk, so I certainly had some understanding. However, it's quite easy to just "get by" without a complete understanding because of the inteli-sense and other helpful features provided by tools like Visual Studio and XML Spy. If I'd had only notepad in which to create the XSDs and ...
[I haven’t done QandAs for a long while – very remiss of me.] Anyway, I have been asked this one so many times lately that I felt a more public answer was needed. The short answer is: Mostly. Certainly it is good enough to get work done. The longer answer is below… History In the first version of Entity Framework (which came with .NET Framework 3.5 SP1), the Entity Framework Designer was… bad. I mean very bad. I mean dumbly bad. We had a decent enough runtime but the design surface just wasn’t up ...
I've almost finished my first Umbraco project, which is probably the most awesome CMS I've ever seen. In case you've been under a rock (which, after having rooted around this thing, I am starting to feel like), Umbraco is a brilliant, ingenious, pure-XML-powered .NET CMS - sorry to say, but much better than DotNetNuke, and fully validates with XHTML 1.1 due to it's XML nature. It supports nested master pages, Intellisense with Visual Studio, custom user controls, XSLT rendering, Web Services and ...
Business scenario: We have an XML file (HIPAA 837) saved as a XML data column in a table and we need to go through each row and get different information on different nodes and output to a table. The real reason of this design lies in with how the claim system is designed, which I will not try to explain here. Approach: Using Common Table Expression (CTE) to get all the necessary info so that the data can be joined later. Use ROW_NUMBER() to make sure the information comes from the correct line. ...
WCF Service Testing: A challenge for a WCF service developer is to know whether the service developed by him is interoperable with other applications made in different technologies. Often People will write sample windows applications to check whether WCF service else we tend to use dynamic Web service invocation tools which can put up a request to a WCF service and show you the result set. One such tool is SOAP UI. I had a requirement where my WCF service should communicate with Java clients. Once ...
This took a lot of google foo and twiddling, so I figured I would post this. That, and I fully expect I'll be scratching my head a few weeks from now and wondering where I put my sample XML ;) The configuration file below assumes that you have included the bins from the following folders included with the NHibernate download (I use 2.1.1): <Your NHibernate install frolder>\Required_For_La... <Your NHibernate install frolder>\Required_Bins\*... And here's the App config ...
Versioning your database is as important as versioning your code. How much time do we waste currently before we are even productive when we have to fix or enhance something in a database? RoundhousE versions your database how you want. The recommended way is to version based on source control, but that may not be your solution. But for a moment let’s pretend it is. Why would versioning your database based on source control be a big help? What happens if you get a prod fix (or work order) to fix a ...
When an itinerary is created using the itinerary designer you can deploy the Itinerary in different ways. Listed some of them and also I created a app which is basically derived from ESBImportUtil to do the deployment : ESBImportUtil.exe You can use ESBImportUtil.exe utility located at C:\Program Files\Microsoft BizTalk ESB Toolkit 2.0\Bin. Ex: ESBImportUtil.exe /f: onewayitinerary.xml /c: deployed /o Power Shell Script Check out the Itinerary sample in the C:\projects\microsoft.pract... ...
I noticed the problem yesterday and spent the whole day on this. Some of this is documented, some not yet. The problems: When building web applications with TFS's team build (we have 2005) the _PublishedWebsites directory does not contain some expected items: 1) Satellite Assemblies & their directories plus the wrong culture assembly is in the bin directory, 2) Assemblies which are needed as late-bound references may be missing, and 3) some normal assemblies also missing. The solution: 1) Satellite ...
The Windows Azure team announced availability of the November 2009 CTP of Windows Azure along with new Tooling for Visual studio and an improved Development Fabric as well as samples. The official announcement is given below, straight from the horses’ mouth. Today we released several new features for Windows Azure through the Windows Azure Tools and SDK. This release adds support for Visual Studio 2010 Beta 2 and VWD Express 2010 Beta 2. What’s New · Service Model UI:A redesigned and significantly ...
This week I introduced RoundhousE and it’s getting quite a stir. Let’s take a look at the configuration. We are going to focus on the MSBuild/NAnt task configuration for now because the console isn’t yet complete. The console will actually have at least this much if not more (we’ve talked about how to use it to create the migration scripts and not just run them). Because we like to be able to infer things, we have determined that there are only two required items. Thus – the minimal configuration: ...
I just started the appetites with my last post on RoundhousE. RoundhousE itself has a migration sample to help you get familiar with how it works. You can get to that by using a subversion client to download the source. When you download the RoundhousE source from SVN and run build.bat, you get a code_drop folder. Go in there and look at the deployment folder for a sample run. Prerequisites: Locally installed (and running) SQL Server 2008 Run That Bad Boy When you get into the code_drop folder, take ...
When doing software development the lean/agile way, you don't have much requirement documents produced upfront - and right so, because they tend to become outdated and useless within a couple of days, after the 'real' development phase of a project has started. However, a developer might occasionally write down some informal specs on the fly while he's coding. Personally, I often do this, when I'm implementing a feature that spans more than some minutes of programming time and is somewhat more complex. ...
I have been converting my current client’s development environment to a VPC instead of taking over my main machine as we did to get the project kicked off. I decided to go with Windows Virtual PC now that it has RTMed, but quite a bit has changed. Once I had Windows 7 installed and VS 2008 configured, I started looking for a multiple monitor solution for VPCs. In the past, I had just lived with the limitation of running virtual and not getting the benefit of dual monitors. This time I wanted something ...
Tomorrow night I’ll be at RockNUG presenting LINQ to SQL. Yes, LINQ to SQL. Again. In the last 2 years I have presented LINQ to SQL numerous times at various user groups and code camps. Why do I keep getting asked to present LINQ to SQL? Isn’t LINQ to SQL dead? Answer: No. LINQ to SQL is not dead! This confusion all started back in October 2008 with a seemingly innocuous post on the ADO.NET team blog discussing the emphasis that Microsoft was going to put into the Entity Framework going forward. ...
In a project that I completed a few years ago I had need to programatically zip an xml file for use as an email attachment. This specific implementation was a part of a BizTalk Adapter written in VB.Net, but the code library used to carry out the zip process was a freely available C# library that can be used in any .Net code for zipping purposes. The library used was called SharpZipLib. The .Net SharpZipLib library (formally NZipLib) supports Zip as well as GZip format and comes with C# source code ...
Today a colleague ask me to help. On his system all ReSharper menus are grayed out. Also the Visual Studio Add-In Manager does not show this add-in. He tried: a new installation: without success, running with administrative privilegeg: without success, looking in event- and application-logs: no entries. After searching a little bit with old buddy google we found this message: Wild World of Visual Studio -- Mysterious Component We downloaded and installed the latest Microsoft Core XML Services (MSXML) ...
Hey all. I wanted to let you know who was slated for the next interview - Javier Lozano. Javier is a .NET consultant in Des Moines, Iowa. He's an ASP.NET MVP and MCSD specializing in ASP.NET, system architecture, and training. Javier is also a co-founder of the Iowa .NET Users Group. On his blog you can find posts on ASP.NET, architecture, design patterns, .NET, XML and Indigo (WCF). Javier enjoys giving back to the community by speaking at user groups, local/regional .NET events, being active in ...
Hey all. I wanted to let you know who was slated for the next interview - Javier Lozano. Javier is a .NET consultant in Des Moines, Iowa. He's an ASP.NET MVP and MCSD specializing in ASP.NET, system architecture, and training. Javier is also a co-founder of the Iowa .NET Users Group. On his blog you can find posts on ASP.NET, architecture, design patterns, .NET, XML and Indigo (WCF). Javier enjoys giving back to the community by speaking at user groups, local/regional .NET events, being active in ...
Hey all. I wanted to let you know who was slated for the next interview - Javier Lozano. Javier is a .NET consultant in Des Moines, Iowa. He's an ASP.NET MVP and MCSD specializing in ASP.NET, system architecture, and training. Javier is also a co-founder of the Iowa .NET Users Group. On his blog you can find posts on ASP.NET, architecture, design patterns, .NET, XML and Indigo (WCF). Javier enjoys giving back to the community by speaking at user groups, local/regional .NET events, being active in ...
StarterKits for Silverlight and the Expression Tools Lately I’ve seen some tweets passing by with links to various StarterKits. I’ve decided to "Bing” around a little and find out what these people were talking about. There are quite a few StarterKits available on various topics. I’ve listed a few below, old and new ones, that I find relevant to my fields of interest: Silverlight and the Expression Blend, Design and Web. Building a Zune Website with Expression Blend 3 StarterKit In this lab you will ...
If you are using a template document and replacing text programmatically using the Office Open XML SDK 2 API you will need a way to identify the target to be replaced. One option is to use a Content Control and setting the tag value the same for all of the controls that need to be substituted with a single value. After some trial and error and a lot of digging through the DocumentReflector I came up with the following LINQ query to get a list of all blocks with the same tag name. var blocks = from ...
This code snippet will show you on how to create a simple xml file in Visual Studio 10 Beta 2. Step 1: Add a namespace to your code behind System.Xml and System.Text Step 2: In your event/method to create an xml file //Create a path were to save the xml file String path = Server.MapPath(@”FolderName... //Instantiate an XmlWriterSettings var xmlWrite = new XmlWriterSettings(); //And other Declaration xmlWrite.Indent = true; xmlWrite.OmitXmlDeclaration = true; xmlWrite.Encoding = Encoding.ASCII; ...
I am practicing Test Driven Development (TDD) now for some two years or so, and soon this technique of writing software felt so natural, that I hardly could imagine doing it another way or even imagine a reason why I should do so. But on the other hand, I know that not questioning something anymore and not being self-critical from time to time is a certain recipe for running into a disaster sooner or later. So I asked myself: What makes TDD such a natural way of writing software? and What are your ...
Augusta Code Camp Nov. 7th Augusta has been kind enough to schedule me to speak at their code camp. I’ll be sharing what every C# developer needs to know about VB XML data types and in a separate session, discussing Windows Mobile development. The list of speakers includes many of “the usual suspects”, so if you can find a way to join us, you are bound to have a good time while learning lots of new things and how to do some old things better. Bill J ...
While I was planning to write about the same topic and have the draft ready in my Windows Live Writer waiting to complete, I found an interesting question in StackOVerflow and couldn’t just resist to answer: ORM/Persistence layer Advice The question starts with: I'm starting a new project and I'm looking around for either a very good ORM or for a non-SQL-based persistence layer. Then follows up with a REALLY GOOD summary of what he believes about each known ORM he knew out of his own findings and ...
When passwords are set to expire after a certain number of days in Active Directory, the remote users suffer because they do not get a notification like the local users do that their password is going to expire. Eventually, it becomes too late for them to change their passwords and they get locked out. I found this out recently and did not believe that there was no built in support for this. I started researching and indeed, there was no built in support. The solution was to email the users, either ...
WCF REST Starter Kit Preview 2 contains not only tools for creating REST services. It include rich set of client tools, that allow to do HTTP-requests and process service response in more convenient way. I create small overview of it basic features. We’ll create a simple WPF desktop client for Yahoo Shopping Web Services. Our client sill search products by the keyword. Details of Search API is available here, but information about GET-request format and service URI is enough. For example, if we want ...
I was working on this application which runs on the PC and gets information about the windows mobile device which is connected to the PC over active sync. Now there are a couple of ways in which you can do this: 1) Create a PC app which gets all the information using RAPI api's and displays it. 2) Create two binaries, one for the PC and one for the WinMob device. The PC app launches the WinMob app remotely using RAPI API's, the WinMob app runs and writes all the information it can gather into a file ...
Javascript Intellisense I read this interesting artilce when trying to enable intellisense for my Javascript file. Don miss this as its very useful. Its similar to what we do for VB or C# for intellisense i.e XML documentation. Same concept applies for JavaScript also. This will work in Visual Studio 2008 as there is an enahncement for this. Thanks, Thani ...
If you haven’t heard of Office Open XML don’t be surprised. I hadn’t until a couple of months ago. In short it is a standardization of the Office document models which allows for more flexible development methods. You no longer need to have an instance of your target Office application running on a server in order to generate Word, Excel or PowerPoint documents. This is also the reason that all of the Office file extensions have a “x” suffix these days. Office Open XML files are actually zip files. ...
I spoke last weekend at the Orlando SQL Saturday on the topic of SQL Server and the xml data type. I was somewhat concerned that my session would draw little attendees for several reasons. First, my session was in the last timeslot of the day, from 4:00 PM to 5:00 PM. Second, I was up against some tough competition. The organizers of the event had brought in Joe Celko to speak, and he was speaking at the same time I was. Buck Woody from Microsoft was also speaking, discussing the new Resource Governor ...
There is nothing earth shattering here. I was just putting together a set of snippets to make life a little easier while developing SharePoint and Office Open XML projects. My search for information crossed a lot of different sites. MSDN has a number of articles about all the features of creating and managing snippets. Below is a compilation of the basics around creating these little helpers. Hopefully it is a little more detailed in the whys then MSDN content. Creating A Snippet File Snippet files ...
Für das Monitoring der BizTalk Anwendungen wird das Tool Business Activity Monitoring (BAM) mit BizTalk mitgeliefert. Folgendes sollte die BAM Lösung in meinem Fall können: Tracken von Transaktionen über mehrere Orchestrationen Speichern von Originaldokumenten im XML Format Einsehen der Einträge mit Hilfe des BAM Portal Eine gute Übersicht zu BAM bietet das Buch "Professional BizTalk Server 2006" von Darren Jefford, Kevin B. Smith und Ewan Fairweather. (Amazon.de) Ich entschied mich für die Methode ...
Yesterday working in a demo about WCF-REST Starter Kit (http://www.asp.net/downloa... i had a little issue to make a query to a XML Structure that includes a xml namespace (aka xmlns), the trick is very simple to get the value from each element in the structure, you should pass the XName in Elements method including the XNamespace This is my XML structure <ItemInfoList xmlns:i="http://www.w3.org/... - <ItemInfo> <EditLink>http://loca... ...
I think that the Gang of Four should consider my design pattern recommendations for inclusion in their codified list. And while I have seen ALL of these patterns shipped to production in real life, it doesn't mean that these are by any means the only ones that scream for inclusion. Anyone got any others? The Duct Tape Pattern Its versatility is unmatched – any two bits of code from any two systems can co-operate with the use of this simple pattern. Need a piece of data from an XML document to display ...
Recently on the MSDN forums a question was raised about how to re-style the Commerce Server catalogue when using Commerce Server 2009 within a SharePoint environment. Those who are familiar with SharePoint and web-parts may have reasonable knowledge around the use of XSLT and apply a style sheet to the web parts parameters, however out –of-the-box this becomes a little challenging for people new to the product. To demonstrate how to achieve a basic XSLT transformation, I will demonstrate splitting ...
I've been working a LOT lately trying to get a release out for a client.  I will be back in the next couple of days with my feedback on Houston Techfest, a blog on an application of Open XML SDK 2.0, and more...
I’d like to provide you with a SilverBullet™, a small snippet of Silverlight, a class or namespace hidden in the silverlight .NET framework, to help you out in times of need. It’s not to learn, but something to keep in your pocket. Just remember it’s there and you’re safe. Occasionally it’s required to use an Rss or an Atom feed in your projects. Just to show some news, or the latest update on the stock exchange. Working with these, often large, chucks of xml directly can be a pain. In Silverlight ...